Documentation ¶
Index ¶
- type Service
- func (s *Service) ListNotifications(ctx context.Context, r *v1.ListNotificationsRequest) (*v1.NotificationList, error)
- func (s *Service) PutInstance(ctx context.Context, i *v1.AppInstance) (*empty.Empty, error)
- func (s *Service) Register(server *grpc.Server)
- func (s *Service) RegisterGateway(ctx context.Context, mux *runtime.ServeMux, bind string, ...) error
- func (s *Service) RemoveInstance(ctx context.Context, r *v1.RemoveInstanceRequest) (*empty.Empty, error)
- func (s *Service) RemoveToken(ctx context.Context, r *v1.RemoveTokenRequest) (*empty.Empty, error)
- func (s *Service) Send(ctx context.Context, r *v1.SendRequest) (*empty.Empty, error)
- func (s *Service) SendAll(ctx context.Context, r *v1.SendAllRequest) (*empty.Empty, error)
- func (s *Service) SendMulticast(ctx context.Context, r *v1.SendMulticastRequest) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { v1.UnimplementedNotificationServiceServer *zap.Logger FirestoreClient *firestore.Client MessagingClient *messaging.Client // CollectionPrefix is used to define Firestore collection prefixes. // This is useful when there would be conflict with already existing collections CollectionPrefix string // contains filtered or unexported fields }
Service is the implementation of the Notification API
func New ¶
func New(ctx context.Context, projectID string, logger *zap.Logger, collectionPrefix string) (*Service, error)
New returns a new Service with configured firebase services
func (*Service) ListNotifications ¶
func (s *Service) ListNotifications(ctx context.Context, r *v1.ListNotificationsRequest) (*v1.NotificationList, error)
func (*Service) PutInstance ¶
func (*Service) RegisterGateway ¶
func (s *Service) RegisterGateway(ctx context.Context, mux *runtime.ServeMux, bind string, opts []grpc.DialOption) error
RegisterGateway registers this service to the provided http mux
func (*Service) RemoveInstance ¶
func (*Service) RemoveToken ¶
func (*Service) SendMulticast ¶
Click to show internal directories.
Click to hide internal directories.