gatewayapi

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 Protocol string = "gatewayapi"

Variables

This section is empty.

Functions

This section is empty.

Types

type GoodResponse

type GoodResponse struct {
	Ids []int `json:"ids"`
}

type Message

type Message struct {
	Message    string      `json:"message"`
	Recipients []Recipient `json:"recipients"`
	Usereref   string      `json:"userref"`
	Sender     string      `json:"sender"`
}

type MessageWithSender

type MessageWithSender struct {
	Message
	Sender string `json:"sender"`
}

type Recipient

type Recipient struct {
	Msisdn string `json:"msisdn"`
}

type SmsGatewayapi

type SmsGatewayapi struct {
	SmsGatewayapiConfig

	http_request.WithHttpClient
	// contains filtered or unexported fields
}

func New

func New() *SmsGatewayapi

func (*SmsGatewayapi) Config

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

func (*SmsGatewayapi) Init

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

func (*SmsGatewayapi) Send

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

type SmsGatewayapiConfig

type SmsGatewayapiConfig struct {
	sms.ProviderBase
	URL    string `validate:"required,url"`
	TOKEN  string `validate:"required" mask:"true"`
	SENDER string
}

Jump to

Keyboard shortcuts

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