smsru

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOk                   = 100
	CodeInvalidRoute         = 150
	CodeInvalidPhone         = 202
	CodeForeignPhone         = 214
	CodePhoneDayLimit        = 230
	CodePhoneSameMinuteLimit = 231
	CodePhoneSameDayLimit    = 232
	CodePhoneCodeSpamLimit   = 233
)
View Source
const Protocol string = "smsru"

Variables

This section is empty.

Functions

This section is empty.

Types

type Smsru

type Smsru struct {
	SmsruConfig
	http_request.WithHttpClient
}

func New

func New() *Smsru

func (*Smsru) Config

func (s *Smsru) Config() interface{}

func (*Smsru) Init

func (s *Smsru) Init(cfg config.Config, log logger.Logger, vld validator.Validator, configPath ...string) error

func (*Smsru) Send

func (s *Smsru) Send(ctx op_context.Context, message string, recipient string, smsID ...string) (*sms.ProviderResponse, error)

type SmsruConfig

type SmsruConfig struct {
	sms.ProviderBase
	URL    string `validate:"required,url"`
	API_ID string `validate:"required" mask:"true"`
	TEST   int
}

Jump to

Keyboard shortcuts

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