v1

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLogin                   = consoleerrors.CreateConsoleError("LoginHandler")
	ErrUnexpectedSigningMethod = errors.New("unexpected signing method")
)
View Source
var (
	ErrGithub        = consoleerrors.CreateConsoleError("LatestReleaseHandler")
	ErrFailedToFetch = errors.New("repositoryError")
)
View Source
var ErrValidation8021xConfig = dto.NotValidError{Console: consoleerrors.CreateConsoleError("8021xConfigAPI")}
View Source
var ErrValidationDevices = dto.NotValidError{Console: consoleerrors.CreateConsoleError("ProfileAPI")}
View Source
var ErrValidationDomains = dto.NotValidError{Console: consoleerrors.CreateConsoleError("DomainsAPI")}
View Source
var ErrValidationProfile = dto.NotValidError{Console: consoleerrors.CreateConsoleError("ProfileAPI")}
View Source
var ErrValidationWifiConfig = dto.NotValidError{Console: consoleerrors.CreateConsoleError("WifiConfigsAPI")}

Functions

func ErrorResponse

func ErrorResponse(c *gin.Context, err error)

func NewAmtRoutes

func NewAmtRoutes(handler *gin.RouterGroup, d devices.Feature, amt amtexplorer.Feature, e export.Exporter, l logger.Interface)

func NewCIRACertRoutes

func NewCIRACertRoutes(handler *gin.RouterGroup, l logger.Interface, cfg *config.Config)

func NewCIRACertRoutesWithReader

func NewCIRACertRoutesWithReader(handler *gin.RouterGroup, l logger.Interface, certReader CertReader, cfg *config.Config)

NewCIRACertRoutesWithReader creates routes with a custom cert reader (for testing).

func NewCIRAConfigRoutes

func NewCIRAConfigRoutes(handler *gin.RouterGroup, t ciraconfigs.Feature, l logger.Interface, cfg *config.Config)

func NewDeviceRoutes

func NewDeviceRoutes(handler *gin.RouterGroup, t devices.Feature, l logger.Interface)

func NewDomainRoutes

func NewDomainRoutes(handler *gin.RouterGroup, t domains.Feature, l logger.Interface)

func NewIEEE8021xConfigRoutes

func NewIEEE8021xConfigRoutes(handler *gin.RouterGroup, t ieee8021xconfigs.Feature, l logger.Interface)

func NewProfileRoutes

func NewProfileRoutes(handler *gin.RouterGroup, t profiles.Feature, l logger.Interface)

func NewServerRoutes added in v1.31.0

func NewServerRoutes(handler *gin.RouterGroup, cfg *config.Config)

NewServerRoutes registers server-level capability endpoints. These expose how Console was started so clients can adapt their UI (e.g. show/hide the CIRA tab).

func NewWirelessConfigRoutes

func NewWirelessConfigRoutes(handler *gin.RouterGroup, t wificonfigs.Feature, l logger.Interface)

func RepositoryError

func RepositoryError(status string) error

Types

type CertReader

type CertReader interface {
	ReadCert() ([]byte, error)
}

CertReader defines the interface for reading certificate files.

type DomainCountResponse

type DomainCountResponse struct {
	Count int          `json:"totalCount"`
	Data  []dto.Domain `json:"data"`
}

type FileCertReader

type FileCertReader struct {
	Path string
}

FileCertReader reads certificates from the filesystem.

func (*FileCertReader) ReadCert

func (f *FileCertReader) ReadCert() ([]byte, error)

ReadCert reads the certificate from the configured file path.

type LoginRoute

type LoginRoute struct {
	Config   *config.Config
	Verifier *oidc.IDTokenVerifier
}

func NewLoginRoute

func NewLoginRoute(configData *config.Config) *LoginRoute

NewVersionRoute creates a new version route

func (LoginRoute) JWTAuthMiddleware

func (lr LoginRoute) JWTAuthMiddleware() gin.HandlerFunc

JWTAuthMiddleware accepts either the Authorization header (REST clients) or the session cookie (browser). The header wins, so REST clients are unchanged.

func (LoginRoute) Login

func (lr LoginRoute) Login(c *gin.Context)

Login checks configured credentials and returns a JWT token for basic auth

func (LoginRoute) Logout added in v1.40.1

func (lr LoginRoute) Logout(c *gin.Context)

Logout expires the session cookies. Public, so an already-expired session can still clear its own. Not revocation: the JWT stays valid until it expires.

type OData

type OData struct {
	Top   int  `form:"$top,default=25"`
	Skip  int  `form:"$skip"`
	Count bool `form:"$count"`
}

type VersionRoute

type VersionRoute struct {
	Config *config.Config
}

func NewVersionRoute

func NewVersionRoute(configData *config.Config) *VersionRoute

NewVersionRoute creates a new version route

func (VersionRoute) FetchLatestRelease

func (vr VersionRoute) FetchLatestRelease(c *gin.Context, repo string) (*github.Release, error)

FetchLatestRelease fetches the latest release information from GitHub API

func (VersionRoute) LatestReleaseHandler

func (vr VersionRoute) LatestReleaseHandler(c *gin.Context)

LatestReleaseHandler is the Gin handler function to check for the latest release

type WirelessConfigRoutes

type WirelessConfigRoutes struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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