routes

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathPrefix = "/api/v1"
)

Variables

View Source
var (
	ErrStore  = errors.New("store error")
	ErrRoutes = errors.New("error in routes")
)
View Source
var (
	ErrConditionParameter = errors.New("error in condition parameter")
	ErrConditionExclusive = errors.New("exclusive condition present")
)

Functions

func RegisterSpanEvent added in v0.0.3

func RegisterSpanEvent(span trace.Span, serverID, conditionID, conditionKind, event string)

Types

type Option

type Option func(*Routes)

Option type sets a parameter on the Routes type.

func WithAuthMiddleware

func WithAuthMiddleware(authMW *ginauth.MultiTokenMiddleware) Option

WithAuthMiddleware sets the auth middleware on the routes type.

func WithConditionDefinitions

func WithConditionDefinitions(defs rctypes.Definitions) Option

WithConditionDefinitions sets the supported condition types.

func WithFleetDBClient added in v0.1.12

func WithFleetDBClient(client fleetdb.FleetDB) Option

WithFleetDBClient sets the client communicating with fleet db.

func WithLogger

func WithLogger(logger *logrus.Logger) Option

WithLogger sets the logger on the routes type.

func WithStore

func WithStore(repository store.Repository) Option

WithStore sets the storage repository on the routes type.

func WithStreamBroker

func WithStreamBroker(broker events.Stream) Option

WithStreamBroker sets the event stream broker.

type Routes

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

Routes type sets up the conditionorc API router routes.

func NewRoutes

func NewRoutes(options ...Option) (*Routes, error)

NewRoutes returns a new conditionorc API routes with handlers registered.

func (*Routes) Routes

func (r *Routes) Routes(g *gin.RouterGroup)

Jump to

Keyboard shortcuts

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