channel

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChannelPB

func GetChannelPB(channelDB *Channel) (*channel.Channel, error)

GetChannelPB gets the proto message equivalence from a channel model

func NewChannelAPIServer

func NewChannelAPIServer(
	ctx context.Context, opt *Options,
) (channel.ChannelAPIServer, error)

NewChannelAPIServer is factory for creating channel APIs

Types

type Channel

type Channel struct {
	Title       string `gorm:"type:varchar(50);not null"`
	Description string `gorm:"type:text;not null"`
	OwnerID     string `gorm:"type:varchar(50);not null"`
	Subscribers int32  `gorm:"type:int(10);not null"`
	gorm.Model
}

Channel is a bulk channel

func GetChannelDB

func GetChannelDB(channelPB *channel.Channel) (*Channel, error)

GetChannelDB gets the database model of a channel proto message

func (*Channel) TableName

func (*Channel) TableName() string

TableName returns the table name of the channel

type Options

type Options struct {
	SQLDBWrites   *gorm.DB
	SQLDBReads    *gorm.DB
	Logger        grpclog.LoggerV2
	JWTSigningKey []byte
}

Options contains parameters required while creating a channel API server

Jump to

Keyboard shortcuts

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