standard

package
v0.0.0-...-fe8a609 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumlessConfig

type EnumlessConfig struct{}

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

func (*EnumlessConfig) Enums

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

Enums returns an empty map

type Logger

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

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

func (*Logger) Log

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

Log maps to the service loggers Logger.Print function

func (*Logger) Logf

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

Logf maps to the service loggers Logger.Printf function

func (*Logger) SetLogger

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

SetLogger maps the specified logger to the Log* helper methods

type QuerylessConfig

type QuerylessConfig struct{}

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

func (*QuerylessConfig) Get

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

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

func (*QuerylessConfig) QueryFields

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

QueryFields returns an empty list of Query fields

func (*QuerylessConfig) Set

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

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

type Standard

type Standard struct {
	Logger
	Templater
}

Standard implements the Logger and Templater parts of the Service interface

type Templater

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

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

func (*Templater) GetTemplate

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

GetTemplate attempts to retrieve the template identified with id

func (*Templater) SetTemplateFile

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

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

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

Jump to

Keyboard shortcuts

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