sms

package
v0.0.0-...-b79fb73 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OUT = "out"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimiter

type RateLimiter interface {
	// Wait blocks until the limiter permits an event to happen.
	Wait(ctx context.Context) error
}

type Response

type Response struct {
}

type Sender

type Sender interface {
	Start() error
	Send(id uint32, sender, phone, text string) error
	BindSubmitSmResponseHandler(handler func(id, status uint32, smscId string))
	BindDeliverSmHandler(handler func(smscId string, status string))
}

func NewSender

func NewSender(smppClient SmppClient) Sender

type SmppClient

type SmppClient interface {
	Connect() error
	Disconnect()
	Reconnect() error
	IsConnected() bool
	SendMessage(id uint32, from, phone, text string) error
	BindSubmitSmResponseHandler(handler func(id, status uint32, smscId string))
	BindDeliverSmHandler(handler func(smscId string, status string))
	ReadPacket() error
}

func NewClient

func NewClient(smscIp string, smscPort int, smscAccount, smscPassword string, smscEnqLnkIntrvl, tps int) SmppClient

type TransceiverWrapper

type TransceiverWrapper interface {
	Unbind() error
	Close()
	SetNextId(id uint32)
	Read() (smpp.Pdu, error)
	SubmitSmEncoded(sourceAddr, destinationAddr string, shortMessage []byte, params *smpp.Params) (seq uint32, err error)
	DeliverSmResp(seq uint32, status smpp.CMDStatus) error
}

type TransceiverWrapperFactory

type TransceiverWrapperFactory interface {
	GetTransceiver(host string, port int, eli int, bindParams smpp.Params) (TransceiverWrapper, error)
}

Jump to

Keyboard shortcuts

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