Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterSpanEvent(span trace.Span, serverID, conditionID, conditionKind, event string)
- type Option
- func WithAuthMiddleware(authMW *ginauth.MultiTokenMiddleware) Option
- func WithConditionDefinitions(defs rctypes.Definitions) Option
- func WithFacilityCode(fc string) Option
- func WithFleetDBClient(client fleetdb.FleetDB) Option
- func WithLogger(logger *logrus.Logger) Option
- func WithStore(repository store.Repository) Option
- func WithStreamBroker(broker events.Stream, streamSubjectPrefix string) Option
- type Routes
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 ¶
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 WithFacilityCode ¶
func WithFleetDBClient ¶
WithFleetDBClient sets the client communicating with fleet db.
func WithLogger ¶
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.
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
Routes type sets up the Conditions API router routes.
func (*Routes) Routes ¶
func (r *Routes) Routes(g *gin.RouterGroup)
Routes returns routes for the Conditions API service.
Click to show internal directories.
Click to hide internal directories.