groups

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CTXGroup   = "group"
	CTXUser    = "user"
	CTXGroupID = "group_id"
)

Keys for group releated items stored in the Gin Context

Variables

This section is empty.

Functions

func AddGroup

func AddGroup(c *gin.Context)

AddGroup is a Gin handler function which creates a new group using request payload. This accepts Group model.

func GetGroup

func GetGroup(c *gin.Context)

GetGroup is a Gin handler function which returns the host as a JSON object.

func GetGroups

func GetGroups(c *gin.Context)

GetGroups is a Gin handler function which returns list of Groups This takes lookup parameters and order parameters to filder and sort output data.

func Middleware

func Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes host_id parameter from the Gin Context and fetches host data from the database it will set host data under key host in the Gin Context.

func PatchGroup

func PatchGroup(c *gin.Context)

PatchGroup is a Gin handler function which partially updates a group using request payload. This replaces specified fields in the database, empty "" fields will be removed from the database object. Unspecified fields will be ignored.

func RemoveGroup

func RemoveGroup(c *gin.Context)

RemoveGroup is a Gin handler function which removes a group object from the database

func UpdateGroup

func UpdateGroup(c *gin.Context)

UpdateGroup is a handler function which updates a group using request payload. This replaces all the fields in the database. empty "" fields and unspecified fields will be removed from the database object.

func VariableData

func VariableData(c *gin.Context)

VariableData is Gin handler function which returns host group variables

Types

This section is empty.

Jump to

Keyboard shortcuts

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