render

package
v0.0.0-...-acc84cd Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b int) int

func AddDefaultData

func AddDefaultData(td *at.TemplateData, r *http.Request) *at.TemplateData

AddDefaultData adds data for all templates

func ConstructCron

func ConstructCron(b *types.NewBackupDTO) string

func CreateTemplateCache

func CreateTemplateCache() (map[string]*template.Template, error)

CreateTemplateCache creates a template cache as a map

func DayName

func DayName(d int) string

func EqualWithZeroAndNoValue

func EqualWithZeroAndNoValue(c int, v interface{}) bool

func FormatDate

func FormatDate(t time.Time, f string) string

func GetBackupJob

func GetBackupJob(b *at.NewBackupDTO, jobs []at.SmallJob) at.SmallJob

func GetThemes

func GetThemes() []string

func HumanDate

func HumanDate(t time.Time) string

HumanDate returns time in YYYY-MM-DD format

func HumanFrequency

func HumanFrequency(b *at.NewBackupDTO) string

func HumanTimezonedDate

func HumanTimezonedDate(t time.Time, tz string) string

func Iterate

func Iterate(count int) []int

Iterate returns a slice of ints, starting at 1, going to count

func MonthName

func MonthName(d int) string

func NewRenderer

func NewRenderer(a *config.AppConfig)

NewRenderer sets the config for the template package

func Template

func Template(w http.ResponseWriter, r *http.Request, tmpl string, td *at.TemplateData) error

Template renders templates using html/template

func TimezonedDate

func TimezonedDate(t time.Time, tz string) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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