Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNotificatorServiceServer(s grpc.ServiceRegistrar, srv NotificatorServiceServer)
- type GetNotificationsRequest
- func (*GetNotificationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotificationsRequest) GetCategories() []notifications.NotificationCategory
- func (x *GetNotificationsRequest) GetIncludeRead() bool
- func (x *GetNotificationsRequest) GetPagination() *database.PaginationRequest
- func (*GetNotificationsRequest) ProtoMessage()
- func (x *GetNotificationsRequest) ProtoReflect() protoreflect.Message
- func (x *GetNotificationsRequest) Reset()
- func (m *GetNotificationsRequest) Sanitize() error
- func (x *GetNotificationsRequest) String() string
- func (m *GetNotificationsRequest) Validate() error
- func (m *GetNotificationsRequest) ValidateAll() error
- type GetNotificationsRequestMultiError
- type GetNotificationsRequestValidationError
- func (e GetNotificationsRequestValidationError) Cause() error
- func (e GetNotificationsRequestValidationError) Error() string
- func (e GetNotificationsRequestValidationError) ErrorName() string
- func (e GetNotificationsRequestValidationError) Field() string
- func (e GetNotificationsRequestValidationError) Key() bool
- func (e GetNotificationsRequestValidationError) Reason() string
- type GetNotificationsResponse
- func (*GetNotificationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotificationsResponse) GetNotifications() []*notifications.Notification
- func (x *GetNotificationsResponse) GetPagination() *database.PaginationResponse
- func (*GetNotificationsResponse) ProtoMessage()
- func (x *GetNotificationsResponse) ProtoReflect() protoreflect.Message
- func (x *GetNotificationsResponse) Reset()
- func (m *GetNotificationsResponse) Sanitize() error
- func (x *GetNotificationsResponse) String() string
- func (m *GetNotificationsResponse) Validate() error
- func (m *GetNotificationsResponse) ValidateAll() error
- type GetNotificationsResponseMultiError
- type GetNotificationsResponseValidationError
- func (e GetNotificationsResponseValidationError) Cause() error
- func (e GetNotificationsResponseValidationError) Error() string
- func (e GetNotificationsResponseValidationError) ErrorName() string
- func (e GetNotificationsResponseValidationError) Field() string
- func (e GetNotificationsResponseValidationError) Key() bool
- func (e GetNotificationsResponseValidationError) Reason() string
- type MarkNotificationsRequest
- func (*MarkNotificationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MarkNotificationsRequest) GetAll() bool
- func (x *MarkNotificationsRequest) GetIds() []uint64
- func (*MarkNotificationsRequest) ProtoMessage()
- func (x *MarkNotificationsRequest) ProtoReflect() protoreflect.Message
- func (x *MarkNotificationsRequest) Reset()
- func (m *MarkNotificationsRequest) Sanitize() error
- func (x *MarkNotificationsRequest) String() string
- func (m *MarkNotificationsRequest) Validate() error
- func (m *MarkNotificationsRequest) ValidateAll() error
- type MarkNotificationsRequestMultiError
- type MarkNotificationsRequestValidationError
- func (e MarkNotificationsRequestValidationError) Cause() error
- func (e MarkNotificationsRequestValidationError) Error() string
- func (e MarkNotificationsRequestValidationError) ErrorName() string
- func (e MarkNotificationsRequestValidationError) Field() string
- func (e MarkNotificationsRequestValidationError) Key() bool
- func (e MarkNotificationsRequestValidationError) Reason() string
- type MarkNotificationsResponse
- func (*MarkNotificationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MarkNotificationsResponse) GetUpdated() uint64
- func (*MarkNotificationsResponse) ProtoMessage()
- func (x *MarkNotificationsResponse) ProtoReflect() protoreflect.Message
- func (x *MarkNotificationsResponse) Reset()
- func (m *MarkNotificationsResponse) Sanitize() error
- func (x *MarkNotificationsResponse) String() string
- func (m *MarkNotificationsResponse) Validate() error
- func (m *MarkNotificationsResponse) ValidateAll() error
- type MarkNotificationsResponseMultiError
- type MarkNotificationsResponseValidationError
- func (e MarkNotificationsResponseValidationError) Cause() error
- func (e MarkNotificationsResponseValidationError) Error() string
- func (e MarkNotificationsResponseValidationError) ErrorName() string
- func (e MarkNotificationsResponseValidationError) Field() string
- func (e MarkNotificationsResponseValidationError) Key() bool
- func (e MarkNotificationsResponseValidationError) Reason() string
- type NotificatorServiceClient
- type NotificatorServiceServer
- type NotificatorService_StreamClient
- type NotificatorService_StreamServer
- type Params
- type Server
- func (s *Server) GetNotifications(ctx context.Context, req *GetNotificationsRequest) (*GetNotificationsResponse, error)
- func (s *Server) GetPermsRemap() map[string]string
- func (s *Server) MarkNotifications(ctx context.Context, req *MarkNotificationsRequest) (*MarkNotificationsResponse, error)
- func (s *Server) RegisterServer(srv *grpc.Server)
- func (s *Server) Stream(req *StreamRequest, srv NotificatorService_StreamServer) error
- type StreamRequest
- func (*StreamRequest) Descriptor() ([]byte, []int)deprecated
- func (*StreamRequest) ProtoMessage()
- func (x *StreamRequest) ProtoReflect() protoreflect.Message
- func (x *StreamRequest) Reset()
- func (m *StreamRequest) Sanitize() error
- func (x *StreamRequest) String() string
- func (m *StreamRequest) Validate() error
- func (m *StreamRequest) ValidateAll() error
- type StreamRequestMultiError
- type StreamRequestValidationError
- func (e StreamRequestValidationError) Cause() error
- func (e StreamRequestValidationError) Error() string
- func (e StreamRequestValidationError) ErrorName() string
- func (e StreamRequestValidationError) Field() string
- func (e StreamRequestValidationError) Key() bool
- func (e StreamRequestValidationError) Reason() string
- type StreamResponse
- func (*StreamResponse) Descriptor() ([]byte, []int)deprecated
- func (m *StreamResponse) GetData() isStreamResponse_Data
- func (x *StreamResponse) GetJobEvent() *notifications.JobEvent
- func (x *StreamResponse) GetJobGradeEvent() *notifications.JobGradeEvent
- func (x *StreamResponse) GetMailerEvent() *mailer.MailerEvent
- func (x *StreamResponse) GetNotificationCount() int32
- func (x *StreamResponse) GetRestart() bool
- func (x *StreamResponse) GetSystemEvent() *notifications.SystemEvent
- func (x *StreamResponse) GetUserEvent() *notifications.UserEvent
- func (*StreamResponse) ProtoMessage()
- func (x *StreamResponse) ProtoReflect() protoreflect.Message
- func (x *StreamResponse) Reset()
- func (m *StreamResponse) Sanitize() error
- func (x *StreamResponse) String() string
- func (m *StreamResponse) Validate() error
- func (m *StreamResponse) ValidateAll() error
- type StreamResponseMultiError
- type StreamResponseValidationError
- func (e StreamResponseValidationError) Cause() error
- func (e StreamResponseValidationError) Error() string
- func (e StreamResponseValidationError) ErrorName() string
- func (e StreamResponseValidationError) Field() string
- func (e StreamResponseValidationError) Key() bool
- func (e StreamResponseValidationError) Reason() string
- type StreamResponse_JobEvent
- type StreamResponse_JobGradeEvent
- type StreamResponse_MailerEvent
- type StreamResponse_SystemEvent
- type StreamResponse_UserEvent
- type UnimplementedNotificatorServiceServer
- func (UnimplementedNotificatorServiceServer) GetNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error)
- func (UnimplementedNotificatorServiceServer) MarkNotifications(context.Context, *MarkNotificationsRequest) (*MarkNotificationsResponse, error)
- func (UnimplementedNotificatorServiceServer) Stream(*StreamRequest, NotificatorService_StreamServer) error
- type UnsafeNotificatorServiceServer
Constants ¶
const ( NotificatorService_GetNotifications_FullMethodName = "/services.notificator.NotificatorService/GetNotifications" NotificatorService_MarkNotifications_FullMethodName = "/services.notificator.NotificatorService/MarkNotifications" NotificatorService_Stream_FullMethodName = "/services.notificator.NotificatorService/Stream" )
Variables ¶
var ( ErrFailedRequest = common.I18nErr(codes.InvalidArgument, &common.TranslateItem{Key: "errors.NotificatorService.ErrFailedRequest"}, nil) ErrFailedStream = common.I18nErr(codes.InvalidArgument, &common.TranslateItem{Key: "errors.NotificatorService.ErrFailedStream"}, nil) )
var File_services_notificator_notificator_proto protoreflect.FileDescriptor
var NotificatorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "services.notificator.NotificatorService", HandlerType: (*NotificatorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNotifications", Handler: _NotificatorService_GetNotifications_Handler, }, { MethodName: "MarkNotifications", Handler: _NotificatorService_MarkNotifications_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _NotificatorService_Stream_Handler, ServerStreams: true, }, }, Metadata: "services/notificator/notificator.proto", }
NotificatorService_ServiceDesc is the grpc.ServiceDesc for NotificatorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PermsRemap = map[string]string{
"NotificatorService/GetNotifications": "Any",
"NotificatorService/MarkNotifications": "Any",
"NotificatorService/Stream": "Any",
}
Functions ¶
func RegisterNotificatorServiceServer ¶
func RegisterNotificatorServiceServer(s grpc.ServiceRegistrar, srv NotificatorServiceServer)
Types ¶
type GetNotificationsRequest ¶
type GetNotificationsRequest struct { Pagination *database.PaginationRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` IncludeRead *bool `protobuf:"varint,2,opt,name=include_read,json=includeRead,proto3,oneof" json:"include_read,omitempty"` Categories []notifications.NotificationCategory `` /* 131-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetNotificationsRequest) Descriptor
deprecated
func (*GetNotificationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNotificationsRequest.ProtoReflect.Descriptor instead.
func (*GetNotificationsRequest) GetCategories ¶
func (x *GetNotificationsRequest) GetCategories() []notifications.NotificationCategory
func (*GetNotificationsRequest) GetIncludeRead ¶
func (x *GetNotificationsRequest) GetIncludeRead() bool
func (*GetNotificationsRequest) GetPagination ¶
func (x *GetNotificationsRequest) GetPagination() *database.PaginationRequest
func (*GetNotificationsRequest) ProtoMessage ¶
func (*GetNotificationsRequest) ProtoMessage()
func (*GetNotificationsRequest) ProtoReflect ¶
func (x *GetNotificationsRequest) ProtoReflect() protoreflect.Message
func (*GetNotificationsRequest) Reset ¶
func (x *GetNotificationsRequest) Reset()
func (*GetNotificationsRequest) Sanitize ¶ added in v0.9.4
func (m *GetNotificationsRequest) Sanitize() error
func (*GetNotificationsRequest) String ¶
func (x *GetNotificationsRequest) String() string
func (*GetNotificationsRequest) Validate ¶
func (m *GetNotificationsRequest) Validate() error
Validate checks the field values on GetNotificationsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetNotificationsRequest) ValidateAll ¶
func (m *GetNotificationsRequest) ValidateAll() error
ValidateAll checks the field values on GetNotificationsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetNotificationsRequestMultiError, or nil if none found.
type GetNotificationsRequestMultiError ¶
type GetNotificationsRequestMultiError []error
GetNotificationsRequestMultiError is an error wrapping multiple validation errors returned by GetNotificationsRequest.ValidateAll() if the designated constraints aren't met.
func (GetNotificationsRequestMultiError) AllErrors ¶
func (m GetNotificationsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetNotificationsRequestMultiError) Error ¶
func (m GetNotificationsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetNotificationsRequestValidationError ¶
type GetNotificationsRequestValidationError struct {
// contains filtered or unexported fields
}
GetNotificationsRequestValidationError is the validation error returned by GetNotificationsRequest.Validate if the designated constraints aren't met.
func (GetNotificationsRequestValidationError) Cause ¶
func (e GetNotificationsRequestValidationError) Cause() error
Cause function returns cause value.
func (GetNotificationsRequestValidationError) Error ¶
func (e GetNotificationsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetNotificationsRequestValidationError) ErrorName ¶
func (e GetNotificationsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetNotificationsRequestValidationError) Field ¶
func (e GetNotificationsRequestValidationError) Field() string
Field function returns field value.
func (GetNotificationsRequestValidationError) Key ¶
func (e GetNotificationsRequestValidationError) Key() bool
Key function returns key value.
func (GetNotificationsRequestValidationError) Reason ¶
func (e GetNotificationsRequestValidationError) Reason() string
Reason function returns reason value.
type GetNotificationsResponse ¶
type GetNotificationsResponse struct { Pagination *database.PaginationResponse `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` Notifications []*notifications.Notification `protobuf:"bytes,2,rep,name=notifications,proto3" json:"notifications,omitempty"` // contains filtered or unexported fields }
func (*GetNotificationsResponse) Descriptor
deprecated
func (*GetNotificationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNotificationsResponse.ProtoReflect.Descriptor instead.
func (*GetNotificationsResponse) GetNotifications ¶
func (x *GetNotificationsResponse) GetNotifications() []*notifications.Notification
func (*GetNotificationsResponse) GetPagination ¶
func (x *GetNotificationsResponse) GetPagination() *database.PaginationResponse
func (*GetNotificationsResponse) ProtoMessage ¶
func (*GetNotificationsResponse) ProtoMessage()
func (*GetNotificationsResponse) ProtoReflect ¶
func (x *GetNotificationsResponse) ProtoReflect() protoreflect.Message
func (*GetNotificationsResponse) Reset ¶
func (x *GetNotificationsResponse) Reset()
func (*GetNotificationsResponse) Sanitize ¶ added in v0.9.4
func (m *GetNotificationsResponse) Sanitize() error
func (*GetNotificationsResponse) String ¶
func (x *GetNotificationsResponse) String() string
func (*GetNotificationsResponse) Validate ¶
func (m *GetNotificationsResponse) Validate() error
Validate checks the field values on GetNotificationsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetNotificationsResponse) ValidateAll ¶
func (m *GetNotificationsResponse) ValidateAll() error
ValidateAll checks the field values on GetNotificationsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetNotificationsResponseMultiError, or nil if none found.
type GetNotificationsResponseMultiError ¶
type GetNotificationsResponseMultiError []error
GetNotificationsResponseMultiError is an error wrapping multiple validation errors returned by GetNotificationsResponse.ValidateAll() if the designated constraints aren't met.
func (GetNotificationsResponseMultiError) AllErrors ¶
func (m GetNotificationsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetNotificationsResponseMultiError) Error ¶
func (m GetNotificationsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetNotificationsResponseValidationError ¶
type GetNotificationsResponseValidationError struct {
// contains filtered or unexported fields
}
GetNotificationsResponseValidationError is the validation error returned by GetNotificationsResponse.Validate if the designated constraints aren't met.
func (GetNotificationsResponseValidationError) Cause ¶
func (e GetNotificationsResponseValidationError) Cause() error
Cause function returns cause value.
func (GetNotificationsResponseValidationError) Error ¶
func (e GetNotificationsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetNotificationsResponseValidationError) ErrorName ¶
func (e GetNotificationsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetNotificationsResponseValidationError) Field ¶
func (e GetNotificationsResponseValidationError) Field() string
Field function returns field value.
func (GetNotificationsResponseValidationError) Key ¶
func (e GetNotificationsResponseValidationError) Key() bool
Key function returns key value.
func (GetNotificationsResponseValidationError) Reason ¶
func (e GetNotificationsResponseValidationError) Reason() string
Reason function returns reason value.
type MarkNotificationsRequest ¶
type MarkNotificationsRequest struct { Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` All *bool `protobuf:"varint,2,opt,name=all,proto3,oneof" json:"all,omitempty"` // contains filtered or unexported fields }
func (*MarkNotificationsRequest) Descriptor
deprecated
func (*MarkNotificationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use MarkNotificationsRequest.ProtoReflect.Descriptor instead.
func (*MarkNotificationsRequest) GetAll ¶
func (x *MarkNotificationsRequest) GetAll() bool
func (*MarkNotificationsRequest) GetIds ¶
func (x *MarkNotificationsRequest) GetIds() []uint64
func (*MarkNotificationsRequest) ProtoMessage ¶
func (*MarkNotificationsRequest) ProtoMessage()
func (*MarkNotificationsRequest) ProtoReflect ¶
func (x *MarkNotificationsRequest) ProtoReflect() protoreflect.Message
func (*MarkNotificationsRequest) Reset ¶
func (x *MarkNotificationsRequest) Reset()
func (*MarkNotificationsRequest) Sanitize ¶ added in v0.9.4
func (m *MarkNotificationsRequest) Sanitize() error
func (*MarkNotificationsRequest) String ¶
func (x *MarkNotificationsRequest) String() string
func (*MarkNotificationsRequest) Validate ¶
func (m *MarkNotificationsRequest) Validate() error
Validate checks the field values on MarkNotificationsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*MarkNotificationsRequest) ValidateAll ¶
func (m *MarkNotificationsRequest) ValidateAll() error
ValidateAll checks the field values on MarkNotificationsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarkNotificationsRequestMultiError, or nil if none found.
type MarkNotificationsRequestMultiError ¶
type MarkNotificationsRequestMultiError []error
MarkNotificationsRequestMultiError is an error wrapping multiple validation errors returned by MarkNotificationsRequest.ValidateAll() if the designated constraints aren't met.
func (MarkNotificationsRequestMultiError) AllErrors ¶
func (m MarkNotificationsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MarkNotificationsRequestMultiError) Error ¶
func (m MarkNotificationsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MarkNotificationsRequestValidationError ¶
type MarkNotificationsRequestValidationError struct {
// contains filtered or unexported fields
}
MarkNotificationsRequestValidationError is the validation error returned by MarkNotificationsRequest.Validate if the designated constraints aren't met.
func (MarkNotificationsRequestValidationError) Cause ¶
func (e MarkNotificationsRequestValidationError) Cause() error
Cause function returns cause value.
func (MarkNotificationsRequestValidationError) Error ¶
func (e MarkNotificationsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (MarkNotificationsRequestValidationError) ErrorName ¶
func (e MarkNotificationsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (MarkNotificationsRequestValidationError) Field ¶
func (e MarkNotificationsRequestValidationError) Field() string
Field function returns field value.
func (MarkNotificationsRequestValidationError) Key ¶
func (e MarkNotificationsRequestValidationError) Key() bool
Key function returns key value.
func (MarkNotificationsRequestValidationError) Reason ¶
func (e MarkNotificationsRequestValidationError) Reason() string
Reason function returns reason value.
type MarkNotificationsResponse ¶
type MarkNotificationsResponse struct { Updated uint64 `protobuf:"varint,1,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*MarkNotificationsResponse) Descriptor
deprecated
func (*MarkNotificationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use MarkNotificationsResponse.ProtoReflect.Descriptor instead.
func (*MarkNotificationsResponse) GetUpdated ¶
func (x *MarkNotificationsResponse) GetUpdated() uint64
func (*MarkNotificationsResponse) ProtoMessage ¶
func (*MarkNotificationsResponse) ProtoMessage()
func (*MarkNotificationsResponse) ProtoReflect ¶
func (x *MarkNotificationsResponse) ProtoReflect() protoreflect.Message
func (*MarkNotificationsResponse) Reset ¶
func (x *MarkNotificationsResponse) Reset()
func (*MarkNotificationsResponse) Sanitize ¶ added in v0.9.4
func (m *MarkNotificationsResponse) Sanitize() error
func (*MarkNotificationsResponse) String ¶
func (x *MarkNotificationsResponse) String() string
func (*MarkNotificationsResponse) Validate ¶
func (m *MarkNotificationsResponse) Validate() error
Validate checks the field values on MarkNotificationsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*MarkNotificationsResponse) ValidateAll ¶
func (m *MarkNotificationsResponse) ValidateAll() error
ValidateAll checks the field values on MarkNotificationsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarkNotificationsResponseMultiError, or nil if none found.
type MarkNotificationsResponseMultiError ¶
type MarkNotificationsResponseMultiError []error
MarkNotificationsResponseMultiError is an error wrapping multiple validation errors returned by MarkNotificationsResponse.ValidateAll() if the designated constraints aren't met.
func (MarkNotificationsResponseMultiError) AllErrors ¶
func (m MarkNotificationsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MarkNotificationsResponseMultiError) Error ¶
func (m MarkNotificationsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MarkNotificationsResponseValidationError ¶
type MarkNotificationsResponseValidationError struct {
// contains filtered or unexported fields
}
MarkNotificationsResponseValidationError is the validation error returned by MarkNotificationsResponse.Validate if the designated constraints aren't met.
func (MarkNotificationsResponseValidationError) Cause ¶
func (e MarkNotificationsResponseValidationError) Cause() error
Cause function returns cause value.
func (MarkNotificationsResponseValidationError) Error ¶
func (e MarkNotificationsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (MarkNotificationsResponseValidationError) ErrorName ¶
func (e MarkNotificationsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (MarkNotificationsResponseValidationError) Field ¶
func (e MarkNotificationsResponseValidationError) Field() string
Field function returns field value.
func (MarkNotificationsResponseValidationError) Key ¶
func (e MarkNotificationsResponseValidationError) Key() bool
Key function returns key value.
func (MarkNotificationsResponseValidationError) Reason ¶
func (e MarkNotificationsResponseValidationError) Reason() string
Reason function returns reason value.
type NotificatorServiceClient ¶
type NotificatorServiceClient interface { // @perm: Name=Any GetNotifications(ctx context.Context, in *GetNotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsResponse, error) // @perm: Name=Any MarkNotifications(ctx context.Context, in *MarkNotificationsRequest, opts ...grpc.CallOption) (*MarkNotificationsResponse, error) // @perm: Name=Any Stream(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (NotificatorService_StreamClient, error) }
NotificatorServiceClient is the client API for NotificatorService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNotificatorServiceClient ¶
func NewNotificatorServiceClient(cc grpc.ClientConnInterface) NotificatorServiceClient
func NewTestNotificatorServiceClient ¶
func NewTestNotificatorServiceClient(srv NotificatorServiceServer) (NotificatorServiceClient, context.Context, context.CancelFunc)
type NotificatorServiceServer ¶
type NotificatorServiceServer interface { // @perm: Name=Any GetNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error) // @perm: Name=Any MarkNotifications(context.Context, *MarkNotificationsRequest) (*MarkNotificationsResponse, error) // @perm: Name=Any Stream(*StreamRequest, NotificatorService_StreamServer) error // contains filtered or unexported methods }
NotificatorServiceServer is the server API for NotificatorService service. All implementations must embed UnimplementedNotificatorServiceServer for forward compatibility
type NotificatorService_StreamClient ¶
type NotificatorService_StreamClient interface { Recv() (*StreamResponse, error) grpc.ClientStream }
type NotificatorService_StreamServer ¶
type NotificatorService_StreamServer interface { Send(*StreamResponse) error grpc.ServerStream }
type Server ¶
type Server struct { NotificatorServiceServer // contains filtered or unexported fields }
func (*Server) GetNotifications ¶
func (s *Server) GetNotifications(ctx context.Context, req *GetNotificationsRequest) (*GetNotificationsResponse, error)
func (*Server) GetPermsRemap ¶
func (*Server) MarkNotifications ¶
func (s *Server) MarkNotifications(ctx context.Context, req *MarkNotificationsRequest) (*MarkNotificationsResponse, error)
func (*Server) RegisterServer ¶
func (*Server) Stream ¶
func (s *Server) Stream(req *StreamRequest, srv NotificatorService_StreamServer) error
type StreamRequest ¶
type StreamRequest struct {
// contains filtered or unexported fields
}
func (*StreamRequest) Descriptor
deprecated
func (*StreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.
func (*StreamRequest) ProtoMessage ¶
func (*StreamRequest) ProtoMessage()
func (*StreamRequest) ProtoReflect ¶
func (x *StreamRequest) ProtoReflect() protoreflect.Message
func (*StreamRequest) Reset ¶
func (x *StreamRequest) Reset()
func (*StreamRequest) Sanitize ¶ added in v0.9.4
func (m *StreamRequest) Sanitize() error
func (*StreamRequest) String ¶
func (x *StreamRequest) String() string
func (*StreamRequest) Validate ¶
func (m *StreamRequest) Validate() error
Validate checks the field values on StreamRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*StreamRequest) ValidateAll ¶
func (m *StreamRequest) ValidateAll() error
ValidateAll checks the field values on StreamRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamRequestMultiError, or nil if none found.
type StreamRequestMultiError ¶
type StreamRequestMultiError []error
StreamRequestMultiError is an error wrapping multiple validation errors returned by StreamRequest.ValidateAll() if the designated constraints aren't met.
func (StreamRequestMultiError) AllErrors ¶
func (m StreamRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StreamRequestMultiError) Error ¶
func (m StreamRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StreamRequestValidationError ¶
type StreamRequestValidationError struct {
// contains filtered or unexported fields
}
StreamRequestValidationError is the validation error returned by StreamRequest.Validate if the designated constraints aren't met.
func (StreamRequestValidationError) Cause ¶
func (e StreamRequestValidationError) Cause() error
Cause function returns cause value.
func (StreamRequestValidationError) Error ¶
func (e StreamRequestValidationError) Error() string
Error satisfies the builtin error interface
func (StreamRequestValidationError) ErrorName ¶
func (e StreamRequestValidationError) ErrorName() string
ErrorName returns error name.
func (StreamRequestValidationError) Field ¶
func (e StreamRequestValidationError) Field() string
Field function returns field value.
func (StreamRequestValidationError) Key ¶
func (e StreamRequestValidationError) Key() bool
Key function returns key value.
func (StreamRequestValidationError) Reason ¶
func (e StreamRequestValidationError) Reason() string
Reason function returns reason value.
type StreamResponse ¶
type StreamResponse struct { NotificationCount int32 `protobuf:"varint,1,opt,name=notification_count,json=notificationCount,proto3" json:"notification_count,omitempty"` Restart *bool `protobuf:"varint,2,opt,name=restart,proto3,oneof" json:"restart,omitempty"` // Types that are assignable to Data: // // *StreamResponse_UserEvent // *StreamResponse_JobEvent // *StreamResponse_JobGradeEvent // *StreamResponse_SystemEvent // *StreamResponse_MailerEvent Data isStreamResponse_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*StreamResponse) Descriptor
deprecated
func (*StreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.
func (*StreamResponse) GetData ¶
func (m *StreamResponse) GetData() isStreamResponse_Data
func (*StreamResponse) GetJobEvent ¶
func (x *StreamResponse) GetJobEvent() *notifications.JobEvent
func (*StreamResponse) GetJobGradeEvent ¶ added in v0.9.4
func (x *StreamResponse) GetJobGradeEvent() *notifications.JobGradeEvent
func (*StreamResponse) GetMailerEvent ¶ added in v0.9.4
func (x *StreamResponse) GetMailerEvent() *mailer.MailerEvent
func (*StreamResponse) GetNotificationCount ¶
func (x *StreamResponse) GetNotificationCount() int32
func (*StreamResponse) GetRestart ¶
func (x *StreamResponse) GetRestart() bool
func (*StreamResponse) GetSystemEvent ¶
func (x *StreamResponse) GetSystemEvent() *notifications.SystemEvent
func (*StreamResponse) GetUserEvent ¶
func (x *StreamResponse) GetUserEvent() *notifications.UserEvent
func (*StreamResponse) ProtoMessage ¶
func (*StreamResponse) ProtoMessage()
func (*StreamResponse) ProtoReflect ¶
func (x *StreamResponse) ProtoReflect() protoreflect.Message
func (*StreamResponse) Reset ¶
func (x *StreamResponse) Reset()
func (*StreamResponse) Sanitize ¶ added in v0.9.4
func (m *StreamResponse) Sanitize() error
func (*StreamResponse) String ¶
func (x *StreamResponse) String() string
func (*StreamResponse) Validate ¶
func (m *StreamResponse) Validate() error
Validate checks the field values on StreamResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*StreamResponse) ValidateAll ¶
func (m *StreamResponse) ValidateAll() error
ValidateAll checks the field values on StreamResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamResponseMultiError, or nil if none found.
type StreamResponseMultiError ¶
type StreamResponseMultiError []error
StreamResponseMultiError is an error wrapping multiple validation errors returned by StreamResponse.ValidateAll() if the designated constraints aren't met.
func (StreamResponseMultiError) AllErrors ¶
func (m StreamResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StreamResponseMultiError) Error ¶
func (m StreamResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StreamResponseValidationError ¶
type StreamResponseValidationError struct {
// contains filtered or unexported fields
}
StreamResponseValidationError is the validation error returned by StreamResponse.Validate if the designated constraints aren't met.
func (StreamResponseValidationError) Cause ¶
func (e StreamResponseValidationError) Cause() error
Cause function returns cause value.
func (StreamResponseValidationError) Error ¶
func (e StreamResponseValidationError) Error() string
Error satisfies the builtin error interface
func (StreamResponseValidationError) ErrorName ¶
func (e StreamResponseValidationError) ErrorName() string
ErrorName returns error name.
func (StreamResponseValidationError) Field ¶
func (e StreamResponseValidationError) Field() string
Field function returns field value.
func (StreamResponseValidationError) Key ¶
func (e StreamResponseValidationError) Key() bool
Key function returns key value.
func (StreamResponseValidationError) Reason ¶
func (e StreamResponseValidationError) Reason() string
Reason function returns reason value.
type StreamResponse_JobEvent ¶
type StreamResponse_JobEvent struct {
JobEvent *notifications.JobEvent `protobuf:"bytes,4,opt,name=job_event,json=jobEvent,proto3,oneof"`
}
type StreamResponse_JobGradeEvent ¶ added in v0.9.4
type StreamResponse_JobGradeEvent struct {
JobGradeEvent *notifications.JobGradeEvent `protobuf:"bytes,7,opt,name=job_grade_event,json=jobGradeEvent,proto3,oneof"`
}
type StreamResponse_MailerEvent ¶ added in v0.9.4
type StreamResponse_MailerEvent struct {
MailerEvent *mailer.MailerEvent `protobuf:"bytes,6,opt,name=mailer_event,json=mailerEvent,proto3,oneof"`
}
type StreamResponse_SystemEvent ¶
type StreamResponse_SystemEvent struct {
SystemEvent *notifications.SystemEvent `protobuf:"bytes,5,opt,name=system_event,json=systemEvent,proto3,oneof"`
}
type StreamResponse_UserEvent ¶
type StreamResponse_UserEvent struct {
UserEvent *notifications.UserEvent `protobuf:"bytes,3,opt,name=user_event,json=userEvent,proto3,oneof"`
}
type UnimplementedNotificatorServiceServer ¶
type UnimplementedNotificatorServiceServer struct { }
UnimplementedNotificatorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedNotificatorServiceServer) GetNotifications ¶
func (UnimplementedNotificatorServiceServer) GetNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error)
func (UnimplementedNotificatorServiceServer) MarkNotifications ¶
func (UnimplementedNotificatorServiceServer) MarkNotifications(context.Context, *MarkNotificationsRequest) (*MarkNotificationsResponse, error)
type UnsafeNotificatorServiceServer ¶
type UnsafeNotificatorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotificatorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificatorServiceServer will result in compilation errors.