notification

package
v0.0.0-...-dd01cb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDBRepository

type MongoDBRepository struct {
	// contains filtered or unexported fields
}

func NewMongoDBRepo

func NewMongoDBRepo(session *mgo.Session) *MongoDBRepository

func (*MongoDBRepository) Create

func (*MongoDBRepository) LoadNoti

func (r *MongoDBRepository) LoadNoti(ctx context.Context, userID string) ([]*types.PushNotification, error)

type RepoProvider

type RepoProvider interface {
	Create(ctx context.Context, noti *types.PushNotification) error
	LoadNoti(ctx context.Context, userID string) ([]*types.PushNotification, error)
}

type Service

type Service struct {
	Repo RepoProvider
}

func NewService

func NewService(repo RepoProvider) *Service

func (*Service) CreateNotificaion

func (s *Service) CreateNotificaion(ctx context.Context, postID string, userIDs []string, mess string) error

func (*Service) LoadNotiUser

func (s *Service) LoadNotiUser(ctx context.Context, userID string) ([]*types.PushNotification, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL