providers

package
v0.0.0-...-4c15c94 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email interface {
	SendSignInCode(email string, code string) error
}

type GoogleStorage

type GoogleStorage struct{}

func (*GoogleStorage) DownloadFile

func (s *GoogleStorage) DownloadFile(bucket, fileName string) ([]byte, error)

func (*GoogleStorage) UploadFile

func (s *GoogleStorage) UploadFile(file multipart.File, bucket, object string) error

type Provider

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

func NewProvider

func NewProvider() *Provider

func (*Provider) Email

func (p *Provider) Email() Email

func (*Provider) GormClient

func (p *Provider) GormClient() *gorm.DB

func (*Provider) Logger

func (p *Provider) Logger() *zap.SugaredLogger

func (*Provider) SMS

func (p *Provider) SMS() SMS

func (*Provider) Storage

func (p *Provider) Storage() Storage

type SMS

type SMS interface {
	SendSMSCode(phone, code string) error
}

type SandGridEmail

type SandGridEmail struct{}

func (*SandGridEmail) SendSignInCode

func (s *SandGridEmail) SendSignInCode(email, code string) error

type Storage

type Storage interface {
	UploadFile(file multipart.File, bucket, object string) error
	DownloadFile(bucket, fileName string) ([]byte, error)
}

type TwilioClient

type TwilioClient struct {
}

func (*TwilioClient) SendSMSCode

func (t *TwilioClient) SendSMSCode(phone, code string) error

Jump to

Keyboard shortcuts

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