sms

package
v0.0.0-...-2cadb06 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSmsLimiterService

func NewSmsLimiterService(cmd redis.Cmdable, svc SmsService) ratelimit.Limiter

Types

type FailOverService

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

func (FailOverService) Send

func (f FailOverService) Send(ctx context.Context, tplId string, args []string, numbers ...string) error

type LimiterService

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

func (LimiterService) Send

func (l LimiterService) Send(ctx context.Context, tplId string, args []string, numbers ...string) error

type MemoryService

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

func (*MemoryService) Send

func (m *MemoryService) Send(ctx context.Context, tplId string, args []string, numbers ...string) error

type SmsService

type SmsService interface {
	Send(ctx context.Context, tplId string, args []string, numbers ...string) error
}

func NewFailOverService

func NewFailOverService(logger *zap.Logger, svcs []SmsService) SmsService

func NewLimiterService

func NewLimiterService(svc SmsService, limiter ratelimit.Limiter, logger *zap.Logger) SmsService

func NewMemoryService

func NewMemoryService(l *zap.Logger) SmsService

func NewTencentSmsService

func NewTencentSmsService(client *sms.Client, appId string, signature string) SmsService

type TencentSmsService

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

func (TencentSmsService) Send

func (s TencentSmsService) Send(ctx context.Context, tplId string, args []string, numbers ...string) error

Jump to

Keyboard shortcuts

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