kavenegar

package
v0.0.0-...-65fcbcb Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: BSD-2-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIToken     string   `yaml:"api_token"`
	PhoneNumbers []string `yaml:"phone_numbers"`
}

Retrieving required data from 'kavenegar' sections of config.yaml.

type KaveNegar

type KaveNegar struct {
	Config
	HTTPClient *http.Client // The HTTP client to send requests on.
}

Creating the KaveNegar to contain provider data.

func NewKaveNegar

func NewKaveNegar(config Config) *KaveNegar

KaveNegar creates and returns a new KaveNegar struct.

func (*KaveNegar) Send

func (ns *KaveNegar) Send(message sachet.Message) error

Building the API and call the KaveNegar endpoint to send SMS to the configured receptor from config.yaml.

Jump to

Keyboard shortcuts

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