forms

package
v0.0.0-...-7cbedea Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocaleFromRequest

func LocaleFromRequest(c Parameterizer) string

LocaleFromRequest can handle a Parameterizer (focus in *gin.Context) to return the locale from request

Types

type CheckForm

type CheckForm struct {
	Key string `json:"key"`
	JWT string `json:"jwt"`
}

CheckForm receive data from `POST api/jwt/*/check` endpoint

func NewCheck

func NewCheck() *CheckForm

NewCheck return a CheckForm object

type Parameterizer

type Parameterizer interface {
	Param(string) string
}

Parameterizer can pass a param mapped over string

type PostFormParameterizer

type PostFormParameterizer interface {
	Parameterizer
	PostFormer
}

PostFormParameterizer join Parameterizer and PostFormer

type PostFormer

type PostFormer interface {
	PostForm(string) string
}

PostFormer handle operations of an Post over a form in HTML

type SignForm

type SignForm struct {
	Key  string              `json:"key"`
	Data []jwtservices.Tuple `json:"data"`
}

SignForm receive data from `POST api/jwt/*/sign` endpoint

func NewSign

func NewSign() *SignForm

NewSign return a SignForm object

type SignUpForm

type SignUpForm struct {
	Email          string
	Password       string
	RepeatPassword string
	Agree          bool
	Privacy        bool
	Newsletter     bool
	Locale         string
}

SignUpForm receive data from `POST signup/:locale` endpoint

func NewSignUpForm

func NewSignUpForm() *SignUpForm

NewSignUpForm constructor

func (*SignUpForm) Populate

func (form *SignUpForm) Populate(req PostFormParameterizer)

Populate data with post form

Jump to

Keyboard shortcuts

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