ctrl

package
v0.1.45 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController added in v0.1.35

type BaseController struct{}

BaseController exported

func (BaseController) Delete added in v0.1.43

func (bc BaseController) Delete(c *gin.Context, t db.Table, p ...db.Table)

Supports single and multiple deletes. Supports endpoints with nested resources in path. t is the type of the resource, or resources, to be deleted. p are the common parent resources' types, if any. Ordered as they appear in endpoint's path. c holds url and query params, dictates which specific resources are to be found and delete. Resources can implement custom logic in the Scope method to determine, whether o not, to abort Delete based on the parent resources finding result. Child resources can also implement custom logic in the BeforeDelete method to impose addtional constraints based on the requesting user UID and parent resources. BeforeDelete can also return a flag to abort Delete altogether.

func (BaseController) Fetch added in v0.1.39

func (bc BaseController) Fetch(c *gin.Context, t db.Table, p ...db.Table)

Supports endpoints with nested resources in path. t is the type of resources to be fetches. p are the common parent resources, if any. Ordered as they appear in endpoint's path. c holds url and query params, dictates which specific resources are to be fetched. Resources can implement custom logic in the Scope method to impose addtional constraints based on the requesting user UID and parent resources.

func (BaseController) Find added in v0.1.39

func (bc BaseController) Find(c *gin.Context, t db.Table, p ...db.Table)

Supports endpoints with nested resources in path. t is the resource type to be found. p are the parent resources' types, if any. Ordered as they appear in endpoint's path. c holds url and query params, dictates which specific resource is to be found. Resources can implement custom logic in the Scope method to impose addtional constraints based on the requesting user UID and parent resources.

type JwtController

type JwtController struct{}

JwtController exported

func (JwtController) Get

func (ctrl JwtController) Get(c *gin.Context)

Get exported

Jump to

Keyboard shortcuts

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