Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckToken ¶
func CheckToken(r *http.Request, tokenValidator gopherpolicy.Validator) *gopherpolicy.Token
CheckToken is a local helper to service the CheckToken functions of the different providers. TODO: refactor when v1 deleted
func NewV2API ¶
func NewV2API(cluster *core.Cluster, tokenValidator gopherpolicy.Validator, auditor audittools.Auditor, timeNow func() time.Time) httpapi.API
NewV2API creates an httpapi.API that serves the Limes v2 API. It also returns the VersionData for this API version which is needed for the version advertisement on "GET /".
Types ¶
type VersionData ¶
type VersionData struct {
Status string `json:"status"`
ID string `json:"id"`
Links []VersionLinkData `json:"links"`
}
VersionData is used by version advertisement API.
type VersionLinkData ¶
type VersionLinkData struct {
URL string `json:"href"`
Relation string `json:"rel"`
Type string `json:"type,omitempty"`
}
VersionLinkData is used by version advertisement API, as part of the VersionData struct.
Click to show internal directories.
Click to hide internal directories.