api

package
v0.0.0-...-3332f53 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package api lists Site Manager's routes.

Index

Constants

View Source
const (
	CreateSiteRouteName      = "createSite"
	GetSiteRouteName         = "getSite"
	DeleteSiteRouteName      = "deleteSite"
	RollSiteRouteName        = "rollSite"
	RegisterSiteRouteName    = "registerSite"
	CreateSiteCredsRouteName = "createSiteCreds"
)

Names of the Site routes. Clients resolve their paths by name with NewSiteRouteResolver.

Variables

This section is empty.

Functions

func NewSiteRouteResolver

func NewSiteRouteResolver() *echo.Echo

NewSiteRouteResolver returns an Echo instance with the Site routes registered by name. Clients resolve a Site route's path with its Reverse method. The resolver never runs the handlers, so they're built without their dependencies.

Types

type RequestHandler

type RequestHandler interface {
	Handle(c echo.Context) error
}

RequestHandler defines the Echo compatible interface all route handlers implement.

type Route

type Route struct {
	Name    string
	Path    string
	Method  string
	Handler RequestHandler
}

Route holds the path, method and handler of one route. Name lets clients resolve the route's path with Echo's Reverse.

func NewSiteRoutes

func NewSiteRoutes(sites crdclientv1.SiteInterface, otpDuration time.Duration, certManager *certmanager.Client) []Route

NewSiteRoutes returns the routes that manage Sites in sites and hand out their credentials. OTPs expire after otpDuration.

func NewSystemRoutes

func NewSystemRoutes(version string) []Route

NewSystemRoutes returns the health, version and metrics routes.

Directories

Path Synopsis
Package handler holds Site Manager's route handlers.
Package handler holds Site Manager's route handlers.

Jump to

Keyboard shortcuts

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