cmd

package
v0.0.0-...-934ba9c Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Overview

Package cmd provides CLI commands for OSAPI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type ServerManager

type ServerManager interface {
	cli.Lifecycle
	// GetAgentHandler returns agent handler for registration.
	GetAgentHandler(jobClient jobclient.JobClient) []func(e *echo.Echo)
	// GetNodeHandler returns node handler for registration.
	GetNodeHandler(jobClient jobclient.JobClient) []func(e *echo.Echo)
	// GetJobHandler returns job handler for registration.
	GetJobHandler(jobClient jobclient.JobClient) []func(e *echo.Echo)
	// GetHealthHandler returns health handler for registration.
	GetHealthHandler(
		checker health.Checker,
		startTime time.Time,
		version string,
		metrics health.MetricsProvider,
	) []func(e *echo.Echo)
	// GetMetricsHandler returns Prometheus metrics handler for registration.
	GetMetricsHandler(metricsHandler http.Handler, path string) []func(e *echo.Echo)
	// GetAuditHandler returns audit handler for registration.
	GetAuditHandler(store audit.Store) []func(e *echo.Echo)
	// RegisterHandlers registers a list of handlers with the Echo instance.
	RegisterHandlers(handlers []func(e *echo.Echo))
}

ServerManager responsible for Server operations.

type TokenGenerator

type TokenGenerator interface {
	Generate(
		signingKey string,
		roles []string,
		subject string,
		permissions []string,
	) (string, error)
}

TokenGenerator generates signed JWT tokens.

type TokenValidator

type TokenValidator interface {
	Validate(
		tokenString string,
		signingKey string,
	) (*authtoken.CustomClaims, error)
}

TokenValidator parses and validates JWT tokens.

Jump to

Keyboard shortcuts

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