Documentation
¶
Index ¶
- Constants
- Variables
- func NewMiddleware(logger *zerolog.Logger, jwtManager jwt.JWTConsumer) []func(next http.Handler) http.Handler
- func NewMux(a *APIManager, middleware []func(next http.Handler) http.Handler) (http.Handler, error)
- func ProvideLogger(config config.Config) (*zerolog.Logger, error)
- func SetupAPIServer(lifecycle fx.Lifecycle, config config.Config, logger *zerolog.Logger, ...) error
- func SetupCheckpointManager(lifecycle fx.Lifecycle, checkpointManager checkpoint.CheckpointManager, ...) error
- func SetupNodeStateManager(lifecycle fx.Lifecycle, nodeStateManager sharder.NodeStateManager, ...) error
- func SetupOpenTelemetry(lifecycle fx.Lifecycle, config config.Config, logger *zerolog.Logger) error
- type APIManager
- type ApiError
- type BadRequestError
- type InternalServerError
- type InvalidOptionError
- type NotFoundError
- type NotImplementedError
- type Response
- type Status
- type Tenant
- type Tracing
Constants ¶
View Source
const ( HeaderTraceId = "X-B3-TraceId" HeaderTenantId = "Application-Id" )
API header expected keys
Variables ¶
View Source
var WebsiteFS embed.FS
Functions ¶
func NewMiddleware ¶
func ProvideLogger ¶ added in v0.2.0
func SetupAPIServer ¶
func SetupCheckpointManager ¶ added in v0.7.0
func SetupCheckpointManager(lifecycle fx.Lifecycle, checkpointManager checkpoint.CheckpointManager, config config.Config, logger *zerolog.Logger) error
func SetupNodeStateManager ¶ added in v0.7.0
Types ¶
type APIManager ¶
type APIManager struct {
// contains filtered or unexported fields
}
func NewAPIManager ¶
func NewAPIManager(routingMgr tablemgr.RoutingTableManager, tenantStorer tenant.TenantStorer, quotaManager *quota.QuotaManager, jwtManager jwt.JWTConsumer) (*APIManager, error)
type BadRequestError ¶ added in v0.2.0
type BadRequestError struct {
// contains filtered or unexported fields
}
func (*BadRequestError) Error ¶ added in v0.2.0
func (e *BadRequestError) Error() string
func (*BadRequestError) StatusCode ¶ added in v0.2.0
func (e *BadRequestError) StatusCode() int
type InternalServerError ¶ added in v0.2.0
type InternalServerError struct {
Wrapped error
}
func (*InternalServerError) Error ¶ added in v0.2.0
func (e *InternalServerError) Error() string
func (*InternalServerError) StatusCode ¶ added in v0.2.0
func (e *InternalServerError) StatusCode() int
type InvalidOptionError ¶
type InvalidOptionError struct {
Option string
}
InvalidOptionError is returned when an invalid option is passed in
func (*InvalidOptionError) Error ¶
func (e *InvalidOptionError) Error() string
type NotFoundError ¶ added in v0.2.0
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶ added in v0.2.0
func (e *NotFoundError) Error() string
func (*NotFoundError) StatusCode ¶ added in v0.2.0
func (e *NotFoundError) StatusCode() int
type NotImplementedError ¶ added in v0.2.0
type NotImplementedError struct {
}
func (*NotImplementedError) Error ¶ added in v0.2.0
func (e *NotImplementedError) Error() string
func (*NotImplementedError) StatusCode ¶ added in v0.2.0
func (e *NotImplementedError) StatusCode() int
type Response ¶
type Response struct {
Status *Status `json:"status,omitempty" xml:"status,omitempty"`
Tracing *Tracing `json:"tx,omitempty" xml:"tx,omitempty"`
Item interface{} `json:"item,omitempty" xml:"item,omitempty"`
Items interface{} `json:"items,omitempty" xml:"items,omitempty"`
Data interface{} `json:"data,omitempty" xml:"data,omitempty"`
}
func ErrorResponse ¶ added in v0.2.0
func ItemResponse ¶ added in v0.2.0
func ItemResponse(item interface{}) Response
func ItemsResponse ¶ added in v0.2.0
func ItemsResponse(item interface{}) Response
func SimpleResponse ¶ added in v0.2.0
type Tenant ¶ added in v0.2.0
type Tenant struct {
// contains filtered or unexported fields
}
func NewTenantId ¶ added in v0.2.0
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package classification EARS Documentation EARS API Schemes: https BasePath: /ears Version: 1.0.0 Host: qa.gears.comcast.com Consumes: - application/json - application/yaml Produces: - application/json - application/yaml Security: Bearer: SecurityDefinitions: Bearer: In: header Name: Authorization Type: apiKey swagger:meta
|
Package classification EARS Documentation EARS API Schemes: https BasePath: /ears Version: 1.0.0 Host: qa.gears.comcast.com Consumes: - application/json - application/yaml Produces: - application/json - application/yaml Security: Bearer: SecurityDefinitions: Bearer: In: header Name: Authorization Type: apiKey swagger:meta |
Click to show internal directories.
Click to hide internal directories.