Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSubscriberPB ¶
func GetSubscriberPB(subscriberDB *Subscriber, userPB *account.Account) (*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
JWTSigningKey []byte
}
Options are parameters passed while calling NewSubscriberAPIServer
type Subscriber ¶
type Subscriber struct {
ID uint `gorm:"primary_key"`
Channels []byte `gorm:"type:json"`
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.