Documentation ¶
Index ¶
- func SetRoutes(engine *gin.Engine, datastore interfaces.Datastore, ...) error
- type Handler
- type Handlers
- func (h *Handlers) CreateJSONKey(c *gin.Context)
- func (h *Handlers) CreateRootKey(c *gin.Context)
- func (h *Handlers) DeleteJSONKey(c *gin.Context)
- func (h *Handlers) DeleteRootKey(c *gin.Context)
- func (h *Handlers) ListRootKeys(c *gin.Context)
- func (d *Handlers) ListUsage(c *gin.Context)
- func (h *Handlers) ReadJSONKey(c *gin.Context)
- func (h *Handlers) ReadRootKey(c *gin.Context)
- func (h *Handlers) UpdateJSONKey(c *gin.Context)
- func (h *Handlers) UpdateRootKey(c *gin.Context)
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface { ListRootKeys(c *gin.Context) CreateRootKey(c *gin.Context) UpdateRootKey(c *gin.Context) ReadRootKey(c *gin.Context) DeleteRootKey(c *gin.Context) ReadJSONKey(c *gin.Context) CreateJSONKey(c *gin.Context) UpdateJSONKey(c *gin.Context) DeleteJSONKey(c *gin.Context) ListUsage(c *gin.Context) }
Handler is an interface to the JSON key/val HTTP handler functions.
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers contains all handler functions
func NewHandlers ¶
func NewHandlers(datastore interfaces.Datastore) *Handlers
NewHandlers creates and returns a new instance of `Handlers` with the datastore
func (*Handlers) CreateJSONKey ¶
CreateJSONKey updates a key at the key path. An error is returned if the key already exists.
func (*Handlers) CreateRootKey ¶
CreateRootKey creates a new JSON tree for a rootKey name
func (*Handlers) DeleteJSONKey ¶
DeleteJSONKey deletes a project key at the key path
func (*Handlers) DeleteRootKey ¶
DeleteRootKey deletes the entire rootKey
func (*Handlers) ListRootKeys ¶
ListRootKeys returns the full list of root keys for a project, does not include data for the key
func (*Handlers) ListUsage ¶
ListUsage returns the list of activity logs for a project and endpoint type
func (*Handlers) ReadJSONKey ¶
ReadJSONKey retrieves the data stored at the key path provided by the HTTP path parameters
func (*Handlers) ReadRootKey ¶
ReadRootKey retrieves the root JSON tree
func (*Handlers) UpdateJSONKey ¶
UpdateJSONKey updates a root key at the key path. The key is created if it does not already exist.
func (*Handlers) UpdateRootKey ¶
UpdateRootKey updates the access policies