Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSubscriberPB ¶
func GetSubscriberPB(userPB *account.Account, channels []string) (*subscriber.Subscriber, error)
GetSubscriberPB creates a proto message from subscriber model
func NewSubscriberAPIServer ¶
func NewSubscriberAPIServer( ctx context.Context, opt *Options, ) (subscriber.SubscriberAPIServer, error)
NewSubscriberAPIServer factory creates a subscriber API server
Types ¶
type Options ¶
type Options struct { SQLDB *gorm.DB Logger grpclog.LoggerV2 ChannelClient channel.ChannelAPIClient AccountClient account.AccountAPIClient PaginationHasher *hashids.HashID AuthAPI auth.API }
Options are parameters passed while calling NewSubscriberAPIServer
type Subscriber ¶
type Subscriber struct { ID uint `gorm:"primaryKey;autoIncrement"` UserID string `gorm:"index;type:varchar(20);not null"` Channel string `gorm:"index;type:varchar(50);not null"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time }
Subscriber is model for subscribers
func (*Subscriber) TableName ¶
func (*Subscriber) TableName() string
TableName returns the name of the table
Click to show internal directories.
Click to hide internal directories.