Documentation
¶
Index ¶
- Constants
- func CheckPrefix(text string) string
- func ClearPhone(text string) string
- func Render(text string, context map[string]string) string
- func ShortUrl(uri string) string
- func ShortUrlsInMessage(text string) string
- type DriverGeneric
- type DriverSkebby
- type IDriver
- type SMSConfiguration
- type SMSProvider
- type SMSSender
Constants ¶
View Source
const ( BASEURL = "https://api.skebby.it/API/v1.0/REST/" TESTURL = "https://httpbin.org/post" MESSAGE_HIGH_QUALITY = "GP" MESSAGE_MEDIUM_QUALITY = "TI" MESSAGE_LOW_QUALITY = "SI" )
Variables ¶
This section is empty.
Functions ¶
func CheckPrefix ¶
func ClearPhone ¶
func ShortUrlsInMessage ¶
Types ¶
type DriverGeneric ¶
type DriverGeneric struct {
// contains filtered or unexported fields
}
func NewDriverGeneric ¶
func NewDriverGeneric(shortURl bool, settings *SMSProvider) *DriverGeneric
type DriverSkebby ¶
type DriverSkebby struct {
// contains filtered or unexported fields
}
func NewDriverSkebby ¶
func NewDriverSkebby(shortURl bool, settings *SMSProvider) *DriverSkebby
type SMSConfiguration ¶
type SMSConfiguration struct { Enabled bool `json:"enabled"` AutoShortUrl bool `json:"auto-short-url"` Providers map[string]*SMSProvider `json:"providers"` }
func NewSMSConfigurationFromFile ¶
func NewSMSConfigurationFromFile(filename string) (*SMSConfiguration, error)
func NewSMSConfigurationFromMap ¶
func NewSMSConfigurationFromMap(m map[string]interface{}) (*SMSConfiguration, error)
func NewSMSConfigurationFromString ¶
func NewSMSConfigurationFromString(text string) (*SMSConfiguration, error)
func (*SMSConfiguration) Provider ¶
func (instance *SMSConfiguration) Provider(name ...string) *SMSProvider
func (*SMSConfiguration) ProviderNames ¶
func (instance *SMSConfiguration) ProviderNames() []string
func (*SMSConfiguration) String ¶
func (instance *SMSConfiguration) String() string
type SMSProvider ¶
type SMSProvider struct { Driver string `json:"driver"` Method string `json:"method"` Endpoint string `json:"endpoint"` Params map[string]string `json:"params"` Headers map[string]string `json:"headers"` }
func (*SMSProvider) Header ¶
func (instance *SMSProvider) Header(name string) string
func (*SMSProvider) Param ¶
func (instance *SMSProvider) Param(name string) string
func (*SMSProvider) String ¶
func (instance *SMSProvider) String() string
Click to show internal directories.
Click to hide internal directories.