Documentation ¶
Index ¶
- Variables
- func RegisterNotificationsServiceServer(s grpc1.Server, srv NotificationsServiceServer)
- type Database
- type Firebase
- type Handler
- type NotificationsServiceClient
- type NotificationsServiceServer
- type SendAppNotificationRequest
- type SendNotificationRequest
- func (*SendNotificationRequest) Descriptor() ([]byte, []int)
- func (m *SendNotificationRequest) GetNotification() []byte
- func (m *SendNotificationRequest) GetUserAddresses() []string
- func (m *SendNotificationRequest) Marshal() (dAtA []byte, err error)
- func (m *SendNotificationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *SendNotificationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SendNotificationRequest) ProtoMessage()
- func (m *SendNotificationRequest) Reset()
- func (m *SendNotificationRequest) Size() (n int)
- func (m *SendNotificationRequest) String() string
- func (m *SendNotificationRequest) Unmarshal(dAtA []byte) error
- func (m *SendNotificationRequest) XXX_DiscardUnknown()
- func (m *SendNotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendNotificationRequest) XXX_Merge(src proto.Message)
- func (m *SendNotificationRequest) XXX_Size() int
- func (m *SendNotificationRequest) XXX_Unmarshal(b []byte) error
- type Server
- type UnimplementedNotificationsServiceServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterNotificationsServiceServer ¶
func RegisterNotificationsServiceServer(s grpc1.Server, srv NotificationsServiceServer)
Types ¶
type Firebase ¶
type Firebase interface {
SendNotificationToUsers(application *types.Application, usersAddresses []string, notification *types.Notification) error
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
NewHandler allows to build a new Handler instance
func (*Handler) HandleSendNotificationRequest ¶
func (h *Handler) HandleSendNotificationRequest(req *SendAppNotificationRequest) error
HandleSendNotificationRequest handles the request to send a new notification
type NotificationsServiceClient ¶
type NotificationsServiceClient interface {
SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
NotificationsServiceClient is the client API for NotificationsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNotificationsServiceClient ¶
func NewNotificationsServiceClient(cc grpc1.ClientConn) NotificationsServiceClient
type NotificationsServiceServer ¶
type NotificationsServiceServer interface {
SendNotification(context.Context, *SendNotificationRequest) (*emptypb.Empty, error)
}
NotificationsServiceServer is the server API for NotificationsService service.
type SendAppNotificationRequest ¶
type SendAppNotificationRequest struct { AppID string UserAddresses []string Notification *types.Notification }
func NewSendAppNotificationRequest ¶
func NewSendAppNotificationRequest(appID string, userAddresses []string, notification *types.Notification) *SendAppNotificationRequest
func (SendAppNotificationRequest) Validate ¶
func (r SendAppNotificationRequest) Validate() error
type SendNotificationRequest ¶
type SendNotificationRequest struct { // UserAddresses represent the addresses of the users to which send the // notification UserAddresses []string `protobuf:"bytes,1,rep,name=user_addresses,json=userAddresses,proto3" json:"user_addresses,omitempty"` // Notification contains the JSON-encoded data of the notification to be sent. Notification []byte `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` }
func (*SendNotificationRequest) Descriptor ¶
func (*SendNotificationRequest) Descriptor() ([]byte, []int)
func (*SendNotificationRequest) GetNotification ¶
func (m *SendNotificationRequest) GetNotification() []byte
func (*SendNotificationRequest) GetUserAddresses ¶
func (m *SendNotificationRequest) GetUserAddresses() []string
func (*SendNotificationRequest) Marshal ¶
func (m *SendNotificationRequest) Marshal() (dAtA []byte, err error)
func (*SendNotificationRequest) MarshalTo ¶
func (m *SendNotificationRequest) MarshalTo(dAtA []byte) (int, error)
func (*SendNotificationRequest) MarshalToSizedBuffer ¶
func (m *SendNotificationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SendNotificationRequest) ProtoMessage ¶
func (*SendNotificationRequest) ProtoMessage()
func (*SendNotificationRequest) Reset ¶
func (m *SendNotificationRequest) Reset()
func (*SendNotificationRequest) Size ¶
func (m *SendNotificationRequest) Size() (n int)
func (*SendNotificationRequest) String ¶
func (m *SendNotificationRequest) String() string
func (*SendNotificationRequest) Unmarshal ¶
func (m *SendNotificationRequest) Unmarshal(dAtA []byte) error
func (*SendNotificationRequest) XXX_DiscardUnknown ¶
func (m *SendNotificationRequest) XXX_DiscardUnknown()
func (*SendNotificationRequest) XXX_Marshal ¶
func (m *SendNotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendNotificationRequest) XXX_Merge ¶
func (m *SendNotificationRequest) XXX_Merge(src proto.Message)
func (*SendNotificationRequest) XXX_Size ¶
func (m *SendNotificationRequest) XXX_Size() int
func (*SendNotificationRequest) XXX_Unmarshal ¶
func (m *SendNotificationRequest) XXX_Unmarshal(b []byte) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (Server) SendNotification ¶
type UnimplementedNotificationsServiceServer ¶
type UnimplementedNotificationsServiceServer struct { }
UnimplementedNotificationsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNotificationsServiceServer) SendNotification ¶
func (*UnimplementedNotificationsServiceServer) SendNotification(ctx context.Context, req *SendNotificationRequest) (*emptypb.Empty, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.