Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = api.Module{ Name: "actions", Setup: func(r api.Router) error { return newAPI().setup(r) }, }
Module is the API module for managing actions
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // Name is the name of the action Name string `json:"name" gorm:"primary_key"` // Help is a human-readable help text mainly used // for UI purposes Help string `json:"help"` // Owner is the owner of the action and should // match the owners origin/audience Owner string `json:"owner"` }
Action is an action that can be performed on some resource It is mainly used for AuthZ purposes together with the IAM service of Tierklinik Dobersberg
type Database ¶
type Database interface { // Create creates a new action CreateAction(context.Context, Action) error // GetAction returns the action with the given name GetAction(context.Context, string) (*Action, error) // ListActions lists all available actions ListActions(context.Context) ([]*Action, error) // LitsActionsByOwner returns all actions that belong to a given owner ListActionsByOwner(context.Context, string) ([]*Action, error) // UpdateAction updates an existing action UpdateAction(context.Context, string, *Action) error // DeleteAction deletes an existing action DeleteAction(context.Context, string) error }
Database encapsulates access to actions
func GetDatabase ¶
GetDatabase returns the action database associated with r
Click to show internal directories.
Click to hide internal directories.