api_v2

package
v0.0.0-...-516ef81 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

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 /".

func NewVersionProviderAPI

func NewVersionProviderAPI(cluster *core.Cluster) httpapi.API

NewVersionProviderAPI creates an httpapi.API that serves the version advertisement API.

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.

Jump to

Keyboard shortcuts

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