shoutrrr: github.com/containrrr/shoutrrr/pkg/services/standard Index | Files

package standard

import "github.com/containrrr/shoutrrr/pkg/services/standard"

Index

Package Files

enumless_config.go queryless_config.go standard.go standard_logger.go standard_templater.go

type EnumlessConfig Uses

type EnumlessConfig struct{}

EnumlessConfig implements the ServiceConfig interface for services that does not use Enum fields

func (*EnumlessConfig) Enums Uses

func (ec *EnumlessConfig) Enums() map[string]types.EnumFormatter

Enums returns an empty map

type Logger Uses

type Logger struct {
    // contains filtered or unexported fields
}

Logger provides the utility methods Log* that maps to Logger.Print*

func (*Logger) Log Uses

func (sl *Logger) Log(v ...interface{})

Log maps to the service loggers Logger.Print function

func (*Logger) Logf Uses

func (sl *Logger) Logf(format string, v ...interface{})

Logf maps to the service loggers Logger.Printf function

func (*Logger) SetLogger Uses

func (sl *Logger) SetLogger(logger *log.Logger)

SetLogger maps the specified logger to the Log* helper methods

type QuerylessConfig Uses

type QuerylessConfig struct{}

QuerylessConfig implements the ServiceConfig interface for services that does not use Query fields

func (*QuerylessConfig) Get Uses

func (qc *QuerylessConfig) Get(string) (string, error)

Get is a dummy function that will return an error if called

func (*QuerylessConfig) QueryFields Uses

func (qc *QuerylessConfig) QueryFields() []string

QueryFields returns an empty list of Query fields

func (*QuerylessConfig) Set Uses

func (qc *QuerylessConfig) Set(string, string) error

Set is a dummy function that will return an error if called

type Standard Uses

type Standard struct {
    Logger
    Templater
}

Standard implements the Logger and Templater parts of the Service interface

type Templater Uses

type Templater struct {
    // contains filtered or unexported fields
}

Templater is the standard implementation of ApplyTemplate using the "text/template" library

func (*Templater) GetTemplate Uses

func (templater *Templater) GetTemplate(id string) (template *template.Template, found bool)

GetTemplate attempts to retrieve the template identified with id

func (*Templater) SetTemplateFile Uses

func (templater *Templater) SetTemplateFile(id string, file string) error

SetTemplateFile creates a new template from the file and assigning it the id

func (*Templater) SetTemplateString Uses

func (templater *Templater) SetTemplateString(id string, body string) error

SetTemplateString creates a new template from the body and assigning it the id

Package standard imports 6 packages (graph) and is imported by 16 packages. Updated 2019-08-02. Refresh now. Tools for package owners.