sms

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSMSAPIServer

func NewSMSAPIServer(ctx context.Context, opt *Options) (sms.SMSAPIServer, error)

NewSMSAPIServer creates a new sms API server

func SenderCredentialProto

func SenderCredentialProto(db *SenderCredential) (*sms.SenderCredential, error)

Types

type Options

type Options struct {
	Logger     grpclog.LoggerV2
	SQLDB      *gorm.DB
	AuthAPI    auth.API
	HTTPClient *http.Client
}

Options contains parameters passed while calling NewSMSAPIServer

type SenderCredential

type SenderCredential struct {
	ID         uint      `gorm:"primaryKey;autoIncrement"`
	ProjectID  string    `gorm:"index;unique;type:varchar(50);not null"`
	Credential []byte    `gorm:"type:json"`
	CreatedAt  time.Time `gorm:"autoCreateTime"`
	UpdatedAt  time.Time `gorm:"autoUpdateTime"`
	DeletedAt  gorm.DeletedAt
}

func SenderCredentialModel

func SenderCredentialModel(pb *sms.SenderCredential) (*SenderCredential, error)

func (*SenderCredential) TableName

func (*SenderCredential) TableName() string

Jump to

Keyboard shortcuts

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