Documentation
¶
Overview ¶
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func WithAuth(auth Authenticator) func(*Server)
- func WithConfig(cfg *config.Config) func(*Server)
- func WithInventory(inv Inventory) func(*Server)
- type Authenticator
- type ContextKey
- type Inventory
- type Provider
- type Server
- func (s *Server) ConfigureHandler() (http.Handler, error)
- func (s *Server) DeleteV2ClustersName(ctx context.Context, request api.DeleteV2ClustersNameRequestObject) (api.DeleteV2ClustersNameResponseObject, error)
- func (s *Server) DeleteV2ClustersNameNodesNodeId(ctx context.Context, request api.DeleteV2ClustersNameNodesNodeIdRequestObject) (api.DeleteV2ClustersNameNodesNodeIdResponseObject, error)
- func (s *Server) DeleteV2TemplatesNameVersion(ctx context.Context, request api.DeleteV2TemplatesNameVersionRequestObject) (api.DeleteV2TemplatesNameVersionResponseObject, error)
- func (s *Server) GetV2Clusters(ctx context.Context, request api.GetV2ClustersRequestObject) (api.GetV2ClustersResponseObject, error)
- func (s *Server) GetV2ClustersName(ctx context.Context, request api.GetV2ClustersNameRequestObject) (api.GetV2ClustersNameResponseObject, error)
- func (s *Server) GetV2ClustersNameKubeconfigs(ctx context.Context, request api.GetV2ClustersNameKubeconfigsRequestObject) (api.GetV2ClustersNameKubeconfigsResponseObject, error)
- func (s *Server) GetV2ClustersNodeIdClusterdetail(ctx context.Context, request api.GetV2ClustersNodeIdClusterdetailRequestObject) (api.GetV2ClustersNodeIdClusterdetailResponseObject, error)
- func (s *Server) GetV2ClustersSummary(ctx context.Context, request api.GetV2ClustersSummaryRequestObject) (api.GetV2ClustersSummaryResponseObject, error)
- func (s *Server) GetV2Healthz(ctx context.Context, request api.GetV2HealthzRequestObject) (api.GetV2HealthzResponseObject, error)
- func (s *Server) GetV2Templates(ctx context.Context, request api.GetV2TemplatesRequestObject) (api.GetV2TemplatesResponseObject, error)
- func (s *Server) GetV2TemplatesNameVersion(ctx context.Context, request api.GetV2TemplatesNameVersionRequestObject) (api.GetV2TemplatesNameVersionResponseObject, error)
- func (s *Server) GetV2TemplatesNameVersions(ctx context.Context, request api.GetV2TemplatesNameVersionsRequestObject) (api.GetV2TemplatesNameVersionsResponseObject, error)
- func (s *Server) PostV2Clusters(ctx context.Context, request api.PostV2ClustersRequestObject) (api.PostV2ClustersResponseObject, error)
- func (s *Server) PostV2Templates(ctx context.Context, request api.PostV2TemplatesRequestObject) (api.PostV2TemplatesResponseObject, error)
- func (s *Server) PutV2ClustersNameLabels(ctx context.Context, request api.PutV2ClustersNameLabelsRequestObject) (api.PutV2ClustersNameLabelsResponseObject, error)
- func (s *Server) PutV2ClustersNameNodes(ctx context.Context, request api.PutV2ClustersNameNodesRequestObject) (api.PutV2ClustersNameNodesResponseObject, error)
- func (s *Server) PutV2ClustersNameTemplate(ctx context.Context, request api.PutV2ClustersNameTemplateRequestObject) (api.PutV2ClustersNameTemplateResponseObject, error)
- func (s *Server) PutV2TemplatesNameDefault(ctx context.Context, request api.PutV2TemplatesNameDefaultRequestObject) (api.PutV2TemplatesNameDefaultResponseObject, error)
- func (s *Server) Serve() error
Constants ¶
const ( ActiveProjectIdHeaderKey = "Activeprojectid" ActiveProjectIdContextKey ContextKey = ActiveProjectIdHeaderKey ClusterNameSelectorKey = "cluster.x-k8s.io/cluster-name" )
const MaxClusters = math.MaxInt32 // Maximum value for int32
Variables ¶
var JwtTokenWithM2MAdminFunc = auth.JwtTokenWithM2M
JwtTokenWithM2MAdminFunc gets admin tokens for managing token ttl settings. This is separate from the user token function so tests can track calls independently
var JwtTokenWithM2MFunc = auth.JwtTokenWithM2M
JwtTokenWithM2MFunc is used for renewing the user-facing kubeconfig token
var (
NotImplementedError = errors.New("not implemented")
)
Functions ¶
func WithAuth ¶
func WithAuth(auth Authenticator) func(*Server)
WithAuth is a functional option for configuring a Server with an Authenticator
func WithConfig ¶
WithConfig is a functional option for configuring a Server with a Config
func WithInventory ¶
WithInventory is a functional option for configuring a Server with an InventoryClient
Types ¶
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx context.Context, input *openapi3filter.AuthenticationInput) error
}
Authenticator is an interface that can be used to authenticate requests
func GetAuthenticator ¶
func GetAuthenticator(cfg *config.Config) (Authenticator, error)
type ContextKey ¶
type ContextKey string
type Inventory ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ConfigureHandler ¶
ConfigureHandler configures the server with necessary middleware and handlers
func (*Server) DeleteV2ClustersName ¶
func (s *Server) DeleteV2ClustersName(ctx context.Context, request api.DeleteV2ClustersNameRequestObject) (api.DeleteV2ClustersNameResponseObject, error)
(DELETE /v2/clusters/{name})
func (*Server) DeleteV2ClustersNameNodesNodeId ¶
func (s *Server) DeleteV2ClustersNameNodesNodeId(ctx context.Context, request api.DeleteV2ClustersNameNodesNodeIdRequestObject) (api.DeleteV2ClustersNameNodesNodeIdResponseObject, error)
(DELETE /v2/clusters/{name}/nodes/{nodeId})
func (*Server) DeleteV2TemplatesNameVersion ¶
func (s *Server) DeleteV2TemplatesNameVersion(ctx context.Context, request api.DeleteV2TemplatesNameVersionRequestObject) (api.DeleteV2TemplatesNameVersionResponseObject, error)
(DELETE /v2/templates/{name}/{version})
func (*Server) GetV2Clusters ¶
func (s *Server) GetV2Clusters(ctx context.Context, request api.GetV2ClustersRequestObject) (api.GetV2ClustersResponseObject, error)
(GET /v2/clusters)
func (*Server) GetV2ClustersName ¶
func (s *Server) GetV2ClustersName(ctx context.Context, request api.GetV2ClustersNameRequestObject) (api.GetV2ClustersNameResponseObject, error)
(GET /v2/clusters/{name})
func (*Server) GetV2ClustersNameKubeconfigs ¶
func (s *Server) GetV2ClustersNameKubeconfigs(ctx context.Context, request api.GetV2ClustersNameKubeconfigsRequestObject) (api.GetV2ClustersNameKubeconfigsResponseObject, error)
(GET /v2/clusters/{name}/kubeconfigs)
func (*Server) GetV2ClustersNodeIdClusterdetail ¶
func (s *Server) GetV2ClustersNodeIdClusterdetail(ctx context.Context, request api.GetV2ClustersNodeIdClusterdetailRequestObject) (api.GetV2ClustersNodeIdClusterdetailResponseObject, error)
(GET /v2/clusters/{nodeId}/clusterdetail)
func (*Server) GetV2ClustersSummary ¶
func (s *Server) GetV2ClustersSummary(ctx context.Context, request api.GetV2ClustersSummaryRequestObject) (api.GetV2ClustersSummaryResponseObject, error)
(GET /v2/clusters/summary)
func (*Server) GetV2Healthz ¶
func (s *Server) GetV2Healthz(ctx context.Context, request api.GetV2HealthzRequestObject) (api.GetV2HealthzResponseObject, error)
(GET /v2/healthz) TODO: remove healthz from oapi code generation and implement separately to the generated server handler
func (*Server) GetV2Templates ¶
func (s *Server) GetV2Templates(ctx context.Context, request api.GetV2TemplatesRequestObject) (api.GetV2TemplatesResponseObject, error)
(GET /v2/templates)
func (*Server) GetV2TemplatesNameVersion ¶
func (s *Server) GetV2TemplatesNameVersion(ctx context.Context, request api.GetV2TemplatesNameVersionRequestObject) (api.GetV2TemplatesNameVersionResponseObject, error)
(GET /v2/templates/{name}/{version})
func (*Server) GetV2TemplatesNameVersions ¶
func (s *Server) GetV2TemplatesNameVersions(ctx context.Context, request api.GetV2TemplatesNameVersionsRequestObject) (api.GetV2TemplatesNameVersionsResponseObject, error)
(GET /v2/templates/{name}/versions)
func (*Server) PostV2Clusters ¶
func (s *Server) PostV2Clusters(ctx context.Context, request api.PostV2ClustersRequestObject) (api.PostV2ClustersResponseObject, error)
(POST /v2/clusters)
func (*Server) PostV2Templates ¶
func (s *Server) PostV2Templates(ctx context.Context, request api.PostV2TemplatesRequestObject) (api.PostV2TemplatesResponseObject, error)
(POST /v2/templates)
func (*Server) PutV2ClustersNameLabels ¶
func (s *Server) PutV2ClustersNameLabels(ctx context.Context, request api.PutV2ClustersNameLabelsRequestObject) (api.PutV2ClustersNameLabelsResponseObject, error)
(PUT /v2/clusters/{name}/labels)
func (*Server) PutV2ClustersNameNodes ¶
func (s *Server) PutV2ClustersNameNodes(ctx context.Context, request api.PutV2ClustersNameNodesRequestObject) (api.PutV2ClustersNameNodesResponseObject, error)
(PUT /v2/clusters/{name}/nodes)
func (*Server) PutV2ClustersNameTemplate ¶
func (s *Server) PutV2ClustersNameTemplate(ctx context.Context, request api.PutV2ClustersNameTemplateRequestObject) (api.PutV2ClustersNameTemplateResponseObject, error)
(PUT /v2/clusters/{name}/template)
func (*Server) PutV2TemplatesNameDefault ¶
func (s *Server) PutV2TemplatesNameDefault(ctx context.Context, request api.PutV2TemplatesNameDefaultRequestObject) (api.PutV2TemplatesNameDefaultResponseObject, error)
(PUT /v2/templates/{name}/default)
Source Files
¶
- deletev2clustersname.go
- deletev2clustersnameNodeId.go
- deletev2templatesname.go
- getv2clusters.go
- getv2clustersclusterdetail.go
- getv2clustersname.go
- getv2clustersnamekubeconfig.go
- getv2clusterssummary.go
- getv2healthz.go
- getv2templates.go
- getv2templatesname.go
- getv2templatesnameversion.go
- handler.go
- postv2clusters.go
- postv2templates.go
- putv2clusterlabels.go
- putv2clustersnametemplate.go
- putv2templatesname.go
- server.go
- types.go
- utils.go