inline

package
v0.0.0-...-74d7545 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CountryOptions = []string{
	"Canada",
	"Mexico",
	"United States",
}

CountryOptions available for demo purposes

Functions

func Routes

func Routes(hlp page.Helper, exec treetop.ViewExecutor)

Routes is the plumbing code for page endpoints, templates and handlers

Types

type FormData

type FormData struct {
	FirstName   string
	LastName    string
	Email       string
	Country     string
	Description string
}

FormData is used to serialize the state of the inline demo form

func (*FormData) MarshalBase64

func (fd *FormData) MarshalBase64() ([]byte, error)

MarshalBase64 encodes struct value for use as cookie value with limited characterset and available space. The struct value is encoded to a JSON byte array, compress and return base 64 encoding.

func (*FormData) SetField

func (fd *FormData) SetField(field, value string)

SetField update struct with form field name

func (*FormData) UnmarshalBase64

func (fd *FormData) UnmarshalBase64(in []byte) error

UnmarshalBase64 assigns fields from a base64 encoded and DEFLATE compressed JSON string

Jump to

Keyboard shortcuts

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