Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterNotificationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNotificationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotificationServiceClient) error
- func RegisterNotificationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNotificationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotificationServiceServer) error
- func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
- type GetNotificationRequest
- func (*GetNotificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotificationRequest) GetId() string
- func (*GetNotificationRequest) ProtoMessage()
- func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message
- func (x *GetNotificationRequest) Reset()
- func (x *GetNotificationRequest) String() string
- func (m *GetNotificationRequest) Validate() error
- func (m *GetNotificationRequest) ValidateAll() error
- type GetNotificationRequestMultiError
- type GetNotificationRequestValidationError
- func (e GetNotificationRequestValidationError) Cause() error
- func (e GetNotificationRequestValidationError) Error() string
- func (e GetNotificationRequestValidationError) ErrorName() string
- func (e GetNotificationRequestValidationError) Field() string
- func (e GetNotificationRequestValidationError) Key() bool
- func (e GetNotificationRequestValidationError) Reason() string
- type GetNotificationResponse
- func (*GetNotificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotificationResponse) GetNotification() *Notification
- func (*GetNotificationResponse) ProtoMessage()
- func (x *GetNotificationResponse) ProtoReflect() protoreflect.Message
- func (x *GetNotificationResponse) Reset()
- func (x *GetNotificationResponse) String() string
- func (m *GetNotificationResponse) Validate() error
- func (m *GetNotificationResponse) ValidateAll() error
- type GetNotificationResponseMultiError
- type GetNotificationResponseValidationError
- func (e GetNotificationResponseValidationError) Cause() error
- func (e GetNotificationResponseValidationError) Error() string
- func (e GetNotificationResponseValidationError) ErrorName() string
- func (e GetNotificationResponseValidationError) Field() string
- func (e GetNotificationResponseValidationError) Key() bool
- func (e GetNotificationResponseValidationError) Reason() string
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)deprecated
- func (x *Notification) GetBody() string
- func (x *Notification) GetCreatedAt() string
- func (x *Notification) GetDestination() string
- func (x *Notification) GetId() string
- func (x *Notification) GetSentAt() string
- func (x *Notification) GetStatus() NotificationStatus
- func (x *Notification) GetSubject() string
- func (x *Notification) GetType() NotificationType
- func (x *Notification) GetUserId() string
- func (*Notification) ProtoMessage()
- func (x *Notification) ProtoReflect() protoreflect.Message
- func (x *Notification) Reset()
- func (x *Notification) String() string
- func (m *Notification) Validate() error
- func (m *Notification) ValidateAll() error
- type NotificationMultiError
- type NotificationServiceClient
- type NotificationServiceServer
- type NotificationStatus
- func (NotificationStatus) Descriptor() protoreflect.EnumDescriptor
- func (x NotificationStatus) Enum() *NotificationStatus
- func (NotificationStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x NotificationStatus) Number() protoreflect.EnumNumber
- func (x NotificationStatus) String() string
- func (NotificationStatus) Type() protoreflect.EnumType
- type NotificationType
- func (NotificationType) Descriptor() protoreflect.EnumDescriptor
- func (x NotificationType) Enum() *NotificationType
- func (NotificationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x NotificationType) Number() protoreflect.EnumNumber
- func (x NotificationType) String() string
- func (NotificationType) Type() protoreflect.EnumType
- type NotificationValidationError
- func (e NotificationValidationError) Cause() error
- func (e NotificationValidationError) Error() string
- func (e NotificationValidationError) ErrorName() string
- func (e NotificationValidationError) Field() string
- func (e NotificationValidationError) Key() bool
- func (e NotificationValidationError) Reason() string
- type SendNotificationRequest
- func (*SendNotificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendNotificationRequest) GetBody() string
- func (x *SendNotificationRequest) GetDestination() string
- func (x *SendNotificationRequest) GetSubject() string
- func (x *SendNotificationRequest) GetType() NotificationType
- func (x *SendNotificationRequest) GetUserId() string
- func (*SendNotificationRequest) ProtoMessage()
- func (x *SendNotificationRequest) ProtoReflect() protoreflect.Message
- func (x *SendNotificationRequest) Reset()
- func (x *SendNotificationRequest) String() string
- func (m *SendNotificationRequest) Validate() error
- func (m *SendNotificationRequest) ValidateAll() error
- type SendNotificationRequestMultiError
- type SendNotificationRequestValidationError
- func (e SendNotificationRequestValidationError) Cause() error
- func (e SendNotificationRequestValidationError) Error() string
- func (e SendNotificationRequestValidationError) ErrorName() string
- func (e SendNotificationRequestValidationError) Field() string
- func (e SendNotificationRequestValidationError) Key() bool
- func (e SendNotificationRequestValidationError) Reason() string
- type SendNotificationResponse
- func (*SendNotificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendNotificationResponse) GetNotification() *Notification
- func (*SendNotificationResponse) ProtoMessage()
- func (x *SendNotificationResponse) ProtoReflect() protoreflect.Message
- func (x *SendNotificationResponse) Reset()
- func (x *SendNotificationResponse) String() string
- func (m *SendNotificationResponse) Validate() error
- func (m *SendNotificationResponse) ValidateAll() error
- type SendNotificationResponseMultiError
- type SendNotificationResponseValidationError
- func (e SendNotificationResponseValidationError) Cause() error
- func (e SendNotificationResponseValidationError) Error() string
- func (e SendNotificationResponseValidationError) ErrorName() string
- func (e SendNotificationResponseValidationError) Field() string
- func (e SendNotificationResponseValidationError) Key() bool
- func (e SendNotificationResponseValidationError) Reason() string
- type UnimplementedNotificationServiceServer
- type UnsafeNotificationServiceServer
Constants ¶
const ( NotificationService_SendNotification_FullMethodName = "/notification.v1.NotificationService/SendNotification" NotificationService_GetNotification_FullMethodName = "/notification.v1.NotificationService/GetNotification" )
Variables ¶
var ( NotificationType_name = map[int32]string{ 0: "NOTIFICATION_TYPE_UNSPECIFIED", 1: "NOTIFICATION_TYPE_EMAIL", 2: "NOTIFICATION_TYPE_SMS", 3: "NOTIFICATION_TYPE_PUSH", } NotificationType_value = map[string]int32{ "NOTIFICATION_TYPE_UNSPECIFIED": 0, "NOTIFICATION_TYPE_EMAIL": 1, "NOTIFICATION_TYPE_SMS": 2, "NOTIFICATION_TYPE_PUSH": 3, } )
Enum value maps for NotificationType.
var ( NotificationStatus_name = map[int32]string{ 0: "NOTIFICATION_STATUS_UNSPECIFIED", 1: "NOTIFICATION_STATUS_PENDING", 2: "NOTIFICATION_STATUS_SENT", 3: "NOTIFICATION_STATUS_FAILED", } NotificationStatus_value = map[string]int32{ "NOTIFICATION_STATUS_UNSPECIFIED": 0, "NOTIFICATION_STATUS_PENDING": 1, "NOTIFICATION_STATUS_SENT": 2, "NOTIFICATION_STATUS_FAILED": 3, } )
Enum value maps for NotificationStatus.
var File_notification_v1_notification_proto protoreflect.FileDescriptor
var NotificationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "notification.v1.NotificationService", HandlerType: (*NotificationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendNotification", Handler: _NotificationService_SendNotification_Handler, }, { MethodName: "GetNotification", Handler: _NotificationService_GetNotification_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "notification/v1/notification.proto", }
NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotificationServiceHandler ¶ added in v1.2.0
func RegisterNotificationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterNotificationServiceHandler registers the http handlers for service NotificationService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNotificationServiceHandlerClient ¶ added in v1.2.0
func RegisterNotificationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotificationServiceClient) error
RegisterNotificationServiceHandlerClient registers the http handlers for service NotificationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NotificationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NotificationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NotificationServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterNotificationServiceHandlerFromEndpoint ¶ added in v1.2.0
func RegisterNotificationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNotificationServiceHandlerFromEndpoint is same as RegisterNotificationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNotificationServiceHandlerServer ¶ added in v1.2.0
func RegisterNotificationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotificationServiceServer) error
RegisterNotificationServiceHandlerServer registers the http handlers for service NotificationService to "mux". UnaryRPC :call NotificationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNotificationServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterNotificationServiceServer ¶
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
Types ¶
type GetNotificationRequest ¶
type GetNotificationRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Request to poll the delivery status of a specific message.
func (*GetNotificationRequest) Descriptor
deprecated
func (*GetNotificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNotificationRequest.ProtoReflect.Descriptor instead.
func (*GetNotificationRequest) GetId ¶
func (x *GetNotificationRequest) GetId() string
func (*GetNotificationRequest) ProtoMessage ¶
func (*GetNotificationRequest) ProtoMessage()
func (*GetNotificationRequest) ProtoReflect ¶
func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message
func (*GetNotificationRequest) Reset ¶
func (x *GetNotificationRequest) Reset()
func (*GetNotificationRequest) String ¶
func (x *GetNotificationRequest) String() string
func (*GetNotificationRequest) Validate ¶
func (m *GetNotificationRequest) Validate() error
Validate checks the field values on GetNotificationRequest 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 (*GetNotificationRequest) ValidateAll ¶
func (m *GetNotificationRequest) ValidateAll() error
ValidateAll checks the field values on GetNotificationRequest 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 GetNotificationRequestMultiError, or nil if none found.
type GetNotificationRequestMultiError ¶
type GetNotificationRequestMultiError []error
GetNotificationRequestMultiError is an error wrapping multiple validation errors returned by GetNotificationRequest.ValidateAll() if the designated constraints aren't met.
func (GetNotificationRequestMultiError) AllErrors ¶
func (m GetNotificationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetNotificationRequestMultiError) Error ¶
func (m GetNotificationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetNotificationRequestValidationError ¶
type GetNotificationRequestValidationError struct {
// contains filtered or unexported fields
}
GetNotificationRequestValidationError is the validation error returned by GetNotificationRequest.Validate if the designated constraints aren't met.
func (GetNotificationRequestValidationError) Cause ¶
func (e GetNotificationRequestValidationError) Cause() error
Cause function returns cause value.
func (GetNotificationRequestValidationError) Error ¶
func (e GetNotificationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetNotificationRequestValidationError) ErrorName ¶
func (e GetNotificationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetNotificationRequestValidationError) Field ¶
func (e GetNotificationRequestValidationError) Field() string
Field function returns field value.
func (GetNotificationRequestValidationError) Key ¶
func (e GetNotificationRequestValidationError) Key() bool
Key function returns key value.
func (GetNotificationRequestValidationError) Reason ¶
func (e GetNotificationRequestValidationError) Reason() string
Reason function returns reason value.
type GetNotificationResponse ¶
type GetNotificationResponse struct {
Notification *Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"`
// contains filtered or unexported fields
}
Response returning the delivery status of the message.
func (*GetNotificationResponse) Descriptor
deprecated
func (*GetNotificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNotificationResponse.ProtoReflect.Descriptor instead.
func (*GetNotificationResponse) GetNotification ¶
func (x *GetNotificationResponse) GetNotification() *Notification
func (*GetNotificationResponse) ProtoMessage ¶
func (*GetNotificationResponse) ProtoMessage()
func (*GetNotificationResponse) ProtoReflect ¶
func (x *GetNotificationResponse) ProtoReflect() protoreflect.Message
func (*GetNotificationResponse) Reset ¶
func (x *GetNotificationResponse) Reset()
func (*GetNotificationResponse) String ¶
func (x *GetNotificationResponse) String() string
func (*GetNotificationResponse) Validate ¶
func (m *GetNotificationResponse) Validate() error
Validate checks the field values on GetNotificationResponse 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 (*GetNotificationResponse) ValidateAll ¶
func (m *GetNotificationResponse) ValidateAll() error
ValidateAll checks the field values on GetNotificationResponse 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 GetNotificationResponseMultiError, or nil if none found.
type GetNotificationResponseMultiError ¶
type GetNotificationResponseMultiError []error
GetNotificationResponseMultiError is an error wrapping multiple validation errors returned by GetNotificationResponse.ValidateAll() if the designated constraints aren't met.
func (GetNotificationResponseMultiError) AllErrors ¶
func (m GetNotificationResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetNotificationResponseMultiError) Error ¶
func (m GetNotificationResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetNotificationResponseValidationError ¶
type GetNotificationResponseValidationError struct {
// contains filtered or unexported fields
}
GetNotificationResponseValidationError is the validation error returned by GetNotificationResponse.Validate if the designated constraints aren't met.
func (GetNotificationResponseValidationError) Cause ¶
func (e GetNotificationResponseValidationError) Cause() error
Cause function returns cause value.
func (GetNotificationResponseValidationError) Error ¶
func (e GetNotificationResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetNotificationResponseValidationError) ErrorName ¶
func (e GetNotificationResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetNotificationResponseValidationError) Field ¶
func (e GetNotificationResponseValidationError) Field() string
Field function returns field value.
func (GetNotificationResponseValidationError) Key ¶
func (e GetNotificationResponseValidationError) Key() bool
Key function returns key value.
func (GetNotificationResponseValidationError) Reason ¶
func (e GetNotificationResponseValidationError) Reason() string
Reason function returns reason value.
type Notification ¶
type Notification struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Type NotificationType `protobuf:"varint,3,opt,name=type,proto3,enum=notification.v1.NotificationType" json:"type,omitempty"`
// The contact destination (email address or phone number)
Destination string `protobuf:"bytes,4,opt,name=destination,proto3" json:"destination,omitempty"`
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
Status NotificationStatus `protobuf:"varint,7,opt,name=status,proto3,enum=notification.v1.NotificationStatus" json:"status,omitempty"`
CreatedAt string `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
SentAt string `protobuf:"bytes,9,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
// contains filtered or unexported fields
}
Notification represents an outbound transactional message.
func (*Notification) Descriptor
deprecated
func (*Notification) Descriptor() ([]byte, []int)
Deprecated: Use Notification.ProtoReflect.Descriptor instead.
func (*Notification) GetBody ¶
func (x *Notification) GetBody() string
func (*Notification) GetCreatedAt ¶
func (x *Notification) GetCreatedAt() string
func (*Notification) GetDestination ¶
func (x *Notification) GetDestination() string
func (*Notification) GetId ¶
func (x *Notification) GetId() string
func (*Notification) GetSentAt ¶
func (x *Notification) GetSentAt() string
func (*Notification) GetStatus ¶
func (x *Notification) GetStatus() NotificationStatus
func (*Notification) GetSubject ¶
func (x *Notification) GetSubject() string
func (*Notification) GetType ¶
func (x *Notification) GetType() NotificationType
func (*Notification) GetUserId ¶
func (x *Notification) GetUserId() string
func (*Notification) ProtoMessage ¶
func (*Notification) ProtoMessage()
func (*Notification) ProtoReflect ¶
func (x *Notification) ProtoReflect() protoreflect.Message
func (*Notification) Reset ¶
func (x *Notification) Reset()
func (*Notification) String ¶
func (x *Notification) String() string
func (*Notification) Validate ¶
func (m *Notification) Validate() error
Validate checks the field values on Notification 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 (*Notification) ValidateAll ¶
func (m *Notification) ValidateAll() error
ValidateAll checks the field values on Notification 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 NotificationMultiError, or nil if none found.
type NotificationMultiError ¶
type NotificationMultiError []error
NotificationMultiError is an error wrapping multiple validation errors returned by Notification.ValidateAll() if the designated constraints aren't met.
func (NotificationMultiError) AllErrors ¶
func (m NotificationMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (NotificationMultiError) Error ¶
func (m NotificationMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type NotificationServiceClient ¶
type NotificationServiceClient interface {
SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*SendNotificationResponse, error)
GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationResponse, error)
}
NotificationServiceClient is the client API for NotificationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
NotificationService abstracts interactions with third-party providers (SendGrid, SNS, etc.)
func NewNotificationServiceClient ¶
func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient
type NotificationServiceServer ¶
type NotificationServiceServer interface {
SendNotification(context.Context, *SendNotificationRequest) (*SendNotificationResponse, error)
GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationResponse, error)
// contains filtered or unexported methods
}
NotificationServiceServer is the server API for NotificationService service. All implementations must embed UnimplementedNotificationServiceServer for forward compatibility.
NotificationService abstracts interactions with third-party providers (SendGrid, SNS, etc.)
type NotificationStatus ¶
type NotificationStatus int32
The delivery state of a scheduled notification.
const ( NotificationStatus_NOTIFICATION_STATUS_UNSPECIFIED NotificationStatus = 0 NotificationStatus_NOTIFICATION_STATUS_PENDING NotificationStatus = 1 NotificationStatus_NOTIFICATION_STATUS_SENT NotificationStatus = 2 NotificationStatus_NOTIFICATION_STATUS_FAILED NotificationStatus = 3 )
func (NotificationStatus) Descriptor ¶
func (NotificationStatus) Descriptor() protoreflect.EnumDescriptor
func (NotificationStatus) Enum ¶
func (x NotificationStatus) Enum() *NotificationStatus
func (NotificationStatus) EnumDescriptor
deprecated
func (NotificationStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use NotificationStatus.Descriptor instead.
func (NotificationStatus) Number ¶
func (x NotificationStatus) Number() protoreflect.EnumNumber
func (NotificationStatus) String ¶
func (x NotificationStatus) String() string
func (NotificationStatus) Type ¶
func (NotificationStatus) Type() protoreflect.EnumType
type NotificationType ¶
type NotificationType int32
How the notification should be delivered to the user.
const ( NotificationType_NOTIFICATION_TYPE_UNSPECIFIED NotificationType = 0 NotificationType_NOTIFICATION_TYPE_EMAIL NotificationType = 1 NotificationType_NOTIFICATION_TYPE_SMS NotificationType = 2 NotificationType_NOTIFICATION_TYPE_PUSH NotificationType = 3 )
func (NotificationType) Descriptor ¶
func (NotificationType) Descriptor() protoreflect.EnumDescriptor
func (NotificationType) Enum ¶
func (x NotificationType) Enum() *NotificationType
func (NotificationType) EnumDescriptor
deprecated
func (NotificationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use NotificationType.Descriptor instead.
func (NotificationType) Number ¶
func (x NotificationType) Number() protoreflect.EnumNumber
func (NotificationType) String ¶
func (x NotificationType) String() string
func (NotificationType) Type ¶
func (NotificationType) Type() protoreflect.EnumType
type NotificationValidationError ¶
type NotificationValidationError struct {
// contains filtered or unexported fields
}
NotificationValidationError is the validation error returned by Notification.Validate if the designated constraints aren't met.
func (NotificationValidationError) Cause ¶
func (e NotificationValidationError) Cause() error
Cause function returns cause value.
func (NotificationValidationError) Error ¶
func (e NotificationValidationError) Error() string
Error satisfies the builtin error interface
func (NotificationValidationError) ErrorName ¶
func (e NotificationValidationError) ErrorName() string
ErrorName returns error name.
func (NotificationValidationError) Field ¶
func (e NotificationValidationError) Field() string
Field function returns field value.
func (NotificationValidationError) Key ¶
func (e NotificationValidationError) Key() bool
Key function returns key value.
func (NotificationValidationError) Reason ¶
func (e NotificationValidationError) Reason() string
Reason function returns reason value.
type SendNotificationRequest ¶
type SendNotificationRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Type NotificationType `protobuf:"varint,2,opt,name=type,proto3,enum=notification.v1.NotificationType" json:"type,omitempty"`
Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"`
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // Optional for SMS/Push
Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
Request to queue an outbound email, text, or push alert.
func (*SendNotificationRequest) Descriptor
deprecated
func (*SendNotificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendNotificationRequest.ProtoReflect.Descriptor instead.
func (*SendNotificationRequest) GetBody ¶
func (x *SendNotificationRequest) GetBody() string
func (*SendNotificationRequest) GetDestination ¶
func (x *SendNotificationRequest) GetDestination() string
func (*SendNotificationRequest) GetSubject ¶
func (x *SendNotificationRequest) GetSubject() string
func (*SendNotificationRequest) GetType ¶
func (x *SendNotificationRequest) GetType() NotificationType
func (*SendNotificationRequest) GetUserId ¶
func (x *SendNotificationRequest) GetUserId() string
func (*SendNotificationRequest) ProtoMessage ¶
func (*SendNotificationRequest) ProtoMessage()
func (*SendNotificationRequest) ProtoReflect ¶
func (x *SendNotificationRequest) ProtoReflect() protoreflect.Message
func (*SendNotificationRequest) Reset ¶
func (x *SendNotificationRequest) Reset()
func (*SendNotificationRequest) String ¶
func (x *SendNotificationRequest) String() string
func (*SendNotificationRequest) Validate ¶
func (m *SendNotificationRequest) Validate() error
Validate checks the field values on SendNotificationRequest 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 (*SendNotificationRequest) ValidateAll ¶
func (m *SendNotificationRequest) ValidateAll() error
ValidateAll checks the field values on SendNotificationRequest 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 SendNotificationRequestMultiError, or nil if none found.
type SendNotificationRequestMultiError ¶
type SendNotificationRequestMultiError []error
SendNotificationRequestMultiError is an error wrapping multiple validation errors returned by SendNotificationRequest.ValidateAll() if the designated constraints aren't met.
func (SendNotificationRequestMultiError) AllErrors ¶
func (m SendNotificationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendNotificationRequestMultiError) Error ¶
func (m SendNotificationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendNotificationRequestValidationError ¶
type SendNotificationRequestValidationError struct {
// contains filtered or unexported fields
}
SendNotificationRequestValidationError is the validation error returned by SendNotificationRequest.Validate if the designated constraints aren't met.
func (SendNotificationRequestValidationError) Cause ¶
func (e SendNotificationRequestValidationError) Cause() error
Cause function returns cause value.
func (SendNotificationRequestValidationError) Error ¶
func (e SendNotificationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SendNotificationRequestValidationError) ErrorName ¶
func (e SendNotificationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SendNotificationRequestValidationError) Field ¶
func (e SendNotificationRequestValidationError) Field() string
Field function returns field value.
func (SendNotificationRequestValidationError) Key ¶
func (e SendNotificationRequestValidationError) Key() bool
Key function returns key value.
func (SendNotificationRequestValidationError) Reason ¶
func (e SendNotificationRequestValidationError) Reason() string
Reason function returns reason value.
type SendNotificationResponse ¶
type SendNotificationResponse struct {
Notification *Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"`
// contains filtered or unexported fields
}
Response after queuing a notification.
func (*SendNotificationResponse) Descriptor
deprecated
func (*SendNotificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendNotificationResponse.ProtoReflect.Descriptor instead.
func (*SendNotificationResponse) GetNotification ¶
func (x *SendNotificationResponse) GetNotification() *Notification
func (*SendNotificationResponse) ProtoMessage ¶
func (*SendNotificationResponse) ProtoMessage()
func (*SendNotificationResponse) ProtoReflect ¶
func (x *SendNotificationResponse) ProtoReflect() protoreflect.Message
func (*SendNotificationResponse) Reset ¶
func (x *SendNotificationResponse) Reset()
func (*SendNotificationResponse) String ¶
func (x *SendNotificationResponse) String() string
func (*SendNotificationResponse) Validate ¶
func (m *SendNotificationResponse) Validate() error
Validate checks the field values on SendNotificationResponse 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 (*SendNotificationResponse) ValidateAll ¶
func (m *SendNotificationResponse) ValidateAll() error
ValidateAll checks the field values on SendNotificationResponse 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 SendNotificationResponseMultiError, or nil if none found.
type SendNotificationResponseMultiError ¶
type SendNotificationResponseMultiError []error
SendNotificationResponseMultiError is an error wrapping multiple validation errors returned by SendNotificationResponse.ValidateAll() if the designated constraints aren't met.
func (SendNotificationResponseMultiError) AllErrors ¶
func (m SendNotificationResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendNotificationResponseMultiError) Error ¶
func (m SendNotificationResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendNotificationResponseValidationError ¶
type SendNotificationResponseValidationError struct {
// contains filtered or unexported fields
}
SendNotificationResponseValidationError is the validation error returned by SendNotificationResponse.Validate if the designated constraints aren't met.
func (SendNotificationResponseValidationError) Cause ¶
func (e SendNotificationResponseValidationError) Cause() error
Cause function returns cause value.
func (SendNotificationResponseValidationError) Error ¶
func (e SendNotificationResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SendNotificationResponseValidationError) ErrorName ¶
func (e SendNotificationResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SendNotificationResponseValidationError) Field ¶
func (e SendNotificationResponseValidationError) Field() string
Field function returns field value.
func (SendNotificationResponseValidationError) Key ¶
func (e SendNotificationResponseValidationError) Key() bool
Key function returns key value.
func (SendNotificationResponseValidationError) Reason ¶
func (e SendNotificationResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedNotificationServiceServer ¶
type UnimplementedNotificationServiceServer struct{}
UnimplementedNotificationServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNotificationServiceServer) GetNotification ¶
func (UnimplementedNotificationServiceServer) GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationResponse, error)
func (UnimplementedNotificationServiceServer) SendNotification ¶
func (UnimplementedNotificationServiceServer) SendNotification(context.Context, *SendNotificationRequest) (*SendNotificationResponse, error)
type UnsafeNotificationServiceServer ¶
type UnsafeNotificationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotificationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationServiceServer will result in compilation errors.