Documentation ¶
Index ¶
- func GetConfig(ctx context.Context) *conf.GlobalConfiguration
- func GetMachineID(ctx context.Context) string
- func GetRequestID(ctx context.Context) string
- func WithConfig(ctx context.Context, conf *conf.GlobalConfiguration) context.Context
- func WithMachineID(ctx context.Context, id string) context.Context
- func WithRequestID(ctx context.Context, id string) context.Context
- type API
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
func GetConfig(ctx context.Context) *conf.GlobalConfiguration
GetConfig reads the global configuration from the context.
func GetMachineID ¶
GetMachineID reads the machine ID from the context.
func GetRequestID ¶
GetRequestID reads the request ID from the context.
func WithConfig ¶
WithConfig adds configuration to the context.
func WithMachineID ¶
WithMachineID adds the machine ID to the context.
Types ¶
type API ¶
API the rest api
func NewAPI ¶
func NewAPI(ctx context.Context, apiServerConfig *conf.APIConfiguration, appLogger *logger.AppLogger, db *gorm.DB) *API
NewAPI create a new api instance
func (*API) HealthCheck ¶
HealthCheck endpoint
func (*API) ListenAndServe ¶
ListenAndServe starts the api server
Click to show internal directories.
Click to hide internal directories.