html

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OvertimeReportView

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

func NewOvertimeReportView

func NewOvertimeReportView(renderer *Renderer) *OvertimeReportView

func (*OvertimeReportView) ShowAttendanceReport

func (v *OvertimeReportView) ShowAttendanceReport(w http.ResponseWriter, report timesheet.Report)

func (*OvertimeReportView) ShowError

func (v *OvertimeReportView) ShowError(w http.ResponseWriter, err error)

type Renderer

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

Renderer is able to render HTML templates. Templates will be compiled the first time they are requested, and cached thereafter.

func NewRenderer

func NewRenderer() *Renderer

NewRenderer returns a new "Renderer" struct

func (*Renderer) Render

func (v *Renderer) Render(w http.ResponseWriter, template string, data Values)

Render renders the requested template with the given data into w. "template" is suffixed with ".html", and then rendered together with "layout.html".

type RequestReportView

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

func NewRequestReportView

func NewRequestReportView(renderer *Renderer) *RequestReportView

func (*RequestReportView) ShowConfigurationForm

func (v *RequestReportView) ShowConfigurationForm(w http.ResponseWriter)

type Values

type Values map[string]interface{}

Values is an arbitrary tree of data to be passed to template rendering.

Jump to

Keyboard shortcuts

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