Documentation
¶
Index ¶
Constants ¶
View Source
const ( NsParam = "ns1" NsCollection = "namespaces" Root = "/" + NsCollection + "/:" + NsParam )
Root - all routes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorized ¶
type Authorized struct {
// Bearer token.
Token string
}
Authorized by k8s bearer token.
type Consistent ¶
type Consistent struct {
}
Consistent (not-partial) request handler.
func (*Consistent) EnsureConsistency ¶
func (c *Consistent) EnsureConsistency(r container.Reconciler, w time.Duration) int
Ensure that the
type RequestHandler ¶
type RequestHandler interface {
// Add routes to the `gin` router.
AddRoutes(*gin.Engine)
// List resources in a REST collection.
List(*gin.Context)
// Get a specific REST resource.
Get(*gin.Context)
}
Web request handler.
type SchemaHandler ¶
type SchemaHandler struct {
// Schema version
Version string
// Schema release.
Release int
// contains filtered or unexported fields
}
Schema (route) handler.
type WebServer ¶
type WebServer struct {
// The optional port. Default: 8080
Port int
// Allowed CORS origins.
AllowedOrigins []string
// Reference to the container.
Container *container.Container
// Handlers
Handlers []RequestHandler
// TLS.
TLS struct {
// Enabled.
Enabled bool
// Certificate path.
Certificate string
// Key path
Key string
}
// contains filtered or unexported fields
}
Web server
Click to show internal directories.
Click to hide internal directories.