shorthand

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICallFunc

type APICallFunc func(context *gin.Context, id, key string) (string, api.Result, bool)

APICallFunc : signature of an API call function.

type BeforeRenderingFunc

type BeforeRenderingFunc func(c *gin.Context, page *html.Page, message string, result api.Result, ok bool)

BeforeRenderingFunc : function called after the API call and before the page rendering.

type PageConfigurationFunc

type PageConfigurationFunc func(page *html.Page)

PageConfigurationFunc : function to configure the page if needed.

type RenderOverrideFunc

type RenderOverrideFunc func(c *gin.Context, page *html.Page, message string, result api.Result, ok bool)

RenderOverrideFunc : function to override the page rendering.

type Validation

type Validation struct {
	PageKey           string
	APICall           APICallFunc
	PageConfiguration PageConfigurationFunc
	BeforeRendering   BeforeRenderingFunc
	RenderOverride    RenderOverrideFunc
}

Validation : struct to validate a property without authentication.

func NewValidation

func NewValidation(c *gin.Context) (v *Validation)

NewValidation : returns a new Validation struct.

func (*Validation) Go

func (v *Validation) Go(c *gin.Context)

Go : execute the validation function.

Jump to

Keyboard shortcuts

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