Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Api ¶
type Api struct {
Name string `json:"name"`
Route string `json:"route"`
Backends []string `json:"backends"`
Groups []string `json:"groups"`
// contains filtered or unexported fields
}
func GetApiFromInterface ¶
GetApiFromInterface converts an map[string]interface{} (from tiedot) to a api struct
func (*Api) UpdateFromForm ¶
UpdateFromForm update api from form values
type Consumer ¶
type Consumer struct {
Username string `json:"username"`
ApiKey string `json:"apikey"`
RateLimit map[string]int `json:"ratelimit"`
Groups []string `json:"groups"`
// contains filtered or unexported fields
}
func FindConsumerBy ¶
FindConsumerBy returns consumer matching provided field->value
func FindConsumerByID ¶
func GetConsumerFromInterface ¶
GetConsumerFromInterface converts an map[string]interface{} (from tiedot) to a Consumer struct
func NewConsumer ¶
NewConsumer creates new consumer. It generates an apikey if none is given.
func (*Consumer) UpdateFromForm ¶
UpdateFromForm update consumer from form values
Click to show internal directories.
Click to hide internal directories.