mitake

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr     string
	Username string
	Password string
}

type Driver

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

func New

func New(config *Config, opts ...Option) *Driver

func (*Driver) Send

func (d *Driver) Send(ctx context.Context, req *sms.Request) (*sms.Response, error)

type Option

type Option func(*Driver)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

type Request

type Request struct {
	Dstaddr  string `json:"dstaddr"`
	Smbody   string `json:"smbody"`
	Type     string `json:"type"`
	Encoding string `json:"encoding"`
}

func (*Request) IsRequestExtra

func (r *Request) IsRequestExtra()

type Response

type Response struct {
	MsgID        string `json:"msgid"`
	StatusCode   string `json:"statuscode"`
	AccountPoint string `json:"AccountPoint"`
	Error        string `json:"Error"`
}

func (*Response) IsResponseExtra

func (r *Response) IsResponseExtra()

Jump to

Keyboard shortcuts

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