Documentation ¶
Index ¶
Constants ¶
View Source
const ( ValidationNone = ValidationType("none") ValidationEmail = ValidationType("email") ValidationRegex = ValidationType("regex") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PushoverService ¶
type PushoverService struct {
// contains filtered or unexported fields
}
PushoverService is a service that uses Pushover API to send messages via Pushover.net.
func NewPushoverService ¶
func NewPushoverService(apiToken string) *PushoverService
func (*PushoverService) DeliveryMethod ¶
func (s *PushoverService) DeliveryMethod() string
func (*PushoverService) ValidateReceiver ¶
func (s *PushoverService) ValidateReceiver(ctx context.Context, pushoverUserKey string) error
type SMTPService ¶
func NewSMTPService ¶
func NewSMTPService(hostPort, username, password, fromEmail string, withTLS bool) (*SMTPService, error)
func (*SMTPService) DeliveryMethod ¶
func (s *SMTPService) DeliveryMethod() string
func (*SMTPService) ValidateReceiver ¶
func (s *SMTPService) ValidateReceiver(ctx context.Context, email string) error
type ScriptService ¶
type ScriptService struct { Script string Validation ValidationType Regex *regexp.Regexp }
func NewScriptService ¶
func NewScriptService(script string, validation ValidationType, regex *regexp.Regexp) *ScriptService
func (*ScriptService) DataToEnv ¶
func (s *ScriptService) DataToEnv(data Data) []string
func (*ScriptService) DeliveryMethod ¶
func (s *ScriptService) DeliveryMethod() string
func (*ScriptService) ValidateReceiver ¶
func (s *ScriptService) ValidateReceiver(ctx context.Context, receiver string) error
type ServiceMock ¶
type ServiceMock struct {
ReturnError error
}
func (*ServiceMock) DeliveryMethod ¶
func (s *ServiceMock) DeliveryMethod() string
func (*ServiceMock) ValidateReceiver ¶
func (s *ServiceMock) ValidateReceiver(ctx context.Context, receiver string) error
type URLService ¶
type URLService struct {
// contains filtered or unexported fields
}
func NewURLService ¶
func NewURLService(senderURL, baseURL string) *URLService
func (*URLService) DeliveryMethod ¶
func (s *URLService) DeliveryMethod() string
func (*URLService) ValidateReceiver ¶
func (s *URLService) ValidateReceiver(ctx context.Context, email string) error
type ValidationType ¶
type ValidationType string
Click to show internal directories.
Click to hide internal directories.