Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string
Debug bool
InsecureHTTP bool
AuthDisabled bool
TLSCertFile string
TLSKeyFile string
WellKnownDisabled bool
TokenURL string
Tracer opentracing.Tracer
}
Config defines the config options for the API server.
func (*Config) WithDefaultFlags ¶
WithDefaultFlags creates a Config with default address ':8080'
type Routes ¶
type Routes struct {
*gin.Engine
AddOrUpdateConfigItem struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
CreateCluster struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
CreateInfrastructureAccount struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
CreateOrUpdateNodePool struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
DeleteCluster struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
DeleteConfigItem struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
DeleteNodePool struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
GetCluster struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
GetInfrastructureAccount struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
ListClusters struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
ListInfrastructureAccounts struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
ListNodePools struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
UpdateCluster struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
UpdateInfrastructureAccount struct {
*gin.RouterGroup
Auth gin.HandlerFunc
}
}
Routes defines all the routes of the Server service.
type Server ¶
type Server struct {
Routes *Routes
Title string
Version string
// contains filtered or unexported fields
}
Server defines the Server service.
func (*Server) ConfigureRoutes ¶
func (s *Server) ConfigureRoutes()
ConfigureRoutes starts the internal configureRoutes methode.
func (*Server) Run ¶
Run runs the Server. It will listen on either HTTP or HTTPS depending on the config passed to NewServer.
func (*Server) RunWithSigHandler ¶
RunWithSigHandler runs the Server server with SIGTERM handling automatically enabled. The server will listen for a SIGTERM signal and gracefully shutdown the web server. It's possible to optionally pass any number shutdown functions which will execute one by one after the webserver has been shutdown successfully.
type Service ¶
type Service interface {
Healthy() bool
AddOrUpdateConfigItem(ctx *gin.Context, params *config_items.AddOrUpdateConfigItemParams) *api.Response
CreateCluster(ctx *gin.Context, params *clusters.CreateClusterParams) *api.Response
CreateInfrastructureAccount(ctx *gin.Context, params *infrastructure_accounts.CreateInfrastructureAccountParams) *api.Response
CreateOrUpdateNodePool(ctx *gin.Context, params *node_pools.CreateOrUpdateNodePoolParams) *api.Response
DeleteCluster(ctx *gin.Context, params *clusters.DeleteClusterParams) *api.Response
DeleteConfigItem(ctx *gin.Context, params *config_items.DeleteConfigItemParams) *api.Response
DeleteNodePool(ctx *gin.Context, params *node_pools.DeleteNodePoolParams) *api.Response
GetCluster(ctx *gin.Context, params *clusters.GetClusterParams) *api.Response
GetInfrastructureAccount(ctx *gin.Context, params *infrastructure_accounts.GetInfrastructureAccountParams) *api.Response
ListClusters(ctx *gin.Context, params *clusters.ListClustersParams) *api.Response
ListInfrastructureAccounts(ctx *gin.Context) *api.Response
ListNodePools(ctx *gin.Context, params *node_pools.ListNodePoolsParams) *api.Response
UpdateCluster(ctx *gin.Context, params *clusters.UpdateClusterParams) *api.Response
UpdateInfrastructureAccount(ctx *gin.Context, params *infrastructure_accounts.UpdateInfrastructureAccountParams) *api.Response
}
Service is the interface that must be implemented in order to provide business logic for the Server service.