Documentation
¶
Overview ¶
Package api provides a REST API layer for exposing model metadata and transformation state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAPIAddrRequired = errors.New("api address is required when API is enabled")
)
ErrAPIAddrRequired is returned when API is enabled but no address is configured
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled" default:"false"`
Addr string `yaml:"addr" default:":8080" validate:"hostname_port"`
}
Config represents API service configuration
type Service ¶
Service defines the API service interface
func NewService ¶
func NewService(cfg *Config, modelsService models.Service, adminService admin.Service, intervalTypes handlers.IntervalTypesConfig, frontendHandler http.Handler, log logrus.FieldLogger) Service
NewService creates a new API and frontend service
Directories
¶
| Path | Synopsis |
|---|---|
|
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |
|
Package handlers implements the API server interface with request handlers for the CBT API.
|
Package handlers implements the API server interface with request handlers for the CBT API. |
Click to show internal directories.
Click to hide internal directories.