gaction

package
v0.0.0-...-5823538 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetAction           = NewAction(ghttp.MethodGet, empty, false, []string{ghttp.MethodGet})
	PostAction          = NewAction(ghttp.MethodPost, empty, false, []string{ghttp.MethodPost})
	PutAction           = NewAction(ghttp.MethodPut, empty, false, []string{ghttp.MethodPut})
	PatchAction         = NewAction(ghttp.MethodPatch, empty, false, []string{ghttp.MethodPatch})
	DeleteAction        = NewAction(ghttp.MethodDelete, empty, false, []string{ghttp.MethodDelete})
	RestActions         = []*Action{GetAction, PostAction, PutAction, PatchAction, DeleteAction}
	ListAction          = NewAction(list, empty, false, []string{ghttp.MethodGet})
	CreateAction        = NewAction(create, empty, false, []string{ghttp.MethodPost})
	RetrieveAction      = NewAction(retrieve, empty, true, []string{ghttp.MethodGet})
	UpdateAction        = NewAction(update, empty, true, []string{ghttp.MethodPut})
	PartialUpdateAction = NewAction(partialUpdate, empty, true, []string{ghttp.MethodPatch})
	DestroyAction       = NewAction(destroy, empty, true, []string{ghttp.MethodDelete})
	DefaultActionList   = []*Action{ListAction, RetrieveAction, CreateAction, UpdateAction, PartialUpdateAction, DestroyAction}
	DefaultActions      = DefaultActionList
)

Functions

This section is empty.

Types

type Action

type Action struct {
	HandlerName, UrlPath string
	Detail               bool
	Methods              []string
}

func NewAction

func NewAction(handlerName string, urlPath string, detail bool, methods []string) *Action

type ActionGetter

type ActionGetter interface {
	GetActions() Actions
}

type Actions

type Actions []*Action

Jump to

Keyboard shortcuts

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