shoutrrr: github.com/containrrr/shoutrrr/pkg/types Index | Files

package types

import "github.com/containrrr/shoutrrr/pkg/types"

Index

Package Files

enum_formatter.go generator.go params.go queued_sender.go sender.go service.go service_config.go service_opts.go templater.go

type EnumFormatter Uses

type EnumFormatter interface {
    Print(e int) string
    Parse(s string) int
    Names() []string
}

EnumFormatter translate enums between strings and numbers

type Generator Uses

type Generator interface {
    Generate(service Service, props map[string]string, args []string) (ServiceConfig, error)
}

type Params Uses

type Params map[string]string

Params is the string map used to provide additional variables to the service templates

type QueuedSender Uses

type QueuedSender interface {
    Enqueuef(format string, v ...interface{})
    Enqueue(message string)
    Flush(params *map[string]string)
    Service() Service
}

QueuedSender is the interface for a proxied sender that queues messages before sending

type Sender Uses

type Sender interface {
    Send(message string, params *Params) error
}

Sender is the interface needed to implement to send notifications

type Service Uses

type Service interface {
    Sender
    Templater
    Initialize(serviceURL *url.URL, logger *log.Logger) error
}

Service is the public common interface for all notification services

type ServiceConfig Uses

type ServiceConfig interface {
    Get(string) (string, error)
    Set(string, string) error
    QueryFields() []string
    GetURL() *url.URL
    SetURL(*url.URL) error
    Enums() map[string]EnumFormatter
}

ServiceConfig is the common interface for all types of service configurations

type ServiceOpts Uses

type ServiceOpts interface {
    Verbose() bool
    Logger() *log.Logger
    Props() map[string]string
}

ServiceOpts is the interface describing the service options

type Templater Uses

type Templater interface {
    GetTemplate(id string) (template *template.Template, found bool)
    SetTemplateString(id string, body string) error
    SetTemplateFile(id string, file string) error
}

Templater is the interface for the service template API

Package types imports 3 packages (graph) and is imported by 26 packages. Updated 2020-09-21. Refresh now. Tools for package owners.