template

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Templater

type Templater struct {
	Repo  *models.Repo
	MSG   *webhook.Message
	Alert alert_template.Alert
	Time  time.Time
	Data  interface{}
}

Templater takes care of templating our filenames and messages

func NewTemplater

func NewTemplater(r *models.Repo, msg *webhook.Message, alert alert_template.Alert) *Templater

NewTemplater return a new Templater

func (*Templater) Template

func (t *Templater) Template(in string) (string, error)

Template string

func (*Templater) TemplateWithData

func (t *Templater) TemplateWithData(in string, data interface{}) (string, error)

TemplateWithData string and add additional data

type Time

type Time struct {
	Year int
}

Time time info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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