samplemeta

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package samplemeta implements sample type Meta which holds template metadata

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Title string
	// contains filtered or unexported fields
}

Meta holds template metadata

func NewMeta

func NewMeta(status int, ctype string) *Meta

NewMeta returns new initialised Meta struct

func (Meta) ContentType

func (m Meta) ContentType() string

ContentType returns page content type

func (Meta) Error

func (m Meta) Error() error

Error returns page error

func (Meta) Layout

func (m Meta) Layout() string

Layout returns page layout

func (*Meta) SetContentType

func (m *Meta) SetContentType(name string) string

SetContentType - set page content type

func (*Meta) SetError

func (m *Meta) SetError(e error)

SetError sets error by template engine Not for use in templates (see Raise)

func (*Meta) SetLayout

func (m *Meta) SetLayout(name string) string

SetLayout sets page layout

func (*Meta) SetStatus

func (m *Meta) SetStatus(status int) string

SetStatus sets response status

func (*Meta) SetTitle

func (m *Meta) SetTitle(name string) string

SetTitle sets page title

func (Meta) Status

func (m Meta) Status() int

Status returns page status

Jump to

Keyboard shortcuts

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