sms

package
v0.0.0-...-3dab2db Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewTemplateVariablesFromPreparedTemplateVariables = smsapi.NewTemplateVariablesFromPreparedTemplateVariables

Functions

This section is empty.

Types

type ClientResolver

type ClientResolver struct {
	AuthgearYAMLSMSProvider config.SMSProvider
	AuthgearYAMLSMSGateway  *config.SMSGatewayConfig

	AuthgearSecretsYAMLNexmoCredentials        *config.NexmoCredentials
	AuthgearSecretsYAMLTwilioCredentials       *config.TwilioCredentials
	AuthgearSecretsYAMLCustomSMSProviderConfig *config.CustomSMSProviderConfig

	EnvironmentDefaultProvider      config.SMSGatewayEnvironmentDefaultProvider
	EnvironmentDefaultUseConfigFrom config.SMSGatewayEnvironmentDefaultUseConfigFrom

	EnvironmentNexmoCredentials        config.SMSGatewayEnvironmentNexmoCredentials
	EnvironmentTwilioCredentials       config.SMSGatewayEnvironmentTwilioCredentials
	EnvironmentCustomSMSProviderConfig config.SMSGatewayEnvironmentCustomSMSProviderConfig

	SMSDenoHook custom.SMSDenoHook
	SMSWebHook  custom.SMSWebHook
}

func (*ClientResolver) ResolveClient

func (r *ClientResolver) ResolveClient() (smsapi.Client, SMSClientCredentials, error)

type CustomClientCredentials

type CustomClientCredentials struct {
	URL     string
	Timeout *config.DurationSeconds
}

type Logger

type Logger struct{ *log.Logger }

func NewLogger

func NewLogger(lf *log.Factory) Logger

type NexmoClientCredentials

type NexmoClientCredentials struct {
	APIKey    string
	APISecret string
}

type SMSClientCredentials

type SMSClientCredentials interface {
	// contains filtered or unexported methods
}

type SendOptions

type SendOptions = smsapi.SendOptions

type Sender

type Sender struct {
	Logger         Logger
	ClientResolver *ClientResolver
}

func (*Sender) ResolveClient

func (c *Sender) ResolveClient() (smsapi.Client, error)

func (*Sender) Send

func (c *Sender) Send(ctx context.Context, client smsapi.Client, opts smsapi.SendOptions) error

type TwilioClientCredentials

type TwilioClientCredentials struct {
	AccountSID          string
	AuthToken           string
	MessagingServiceSID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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