handlers

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyResourceResponse

type ApplyResourceResponse struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	Namespace  string `json:"namespace,omitempty"`
	Operation  string `json:"operation"` // "created" or "updated" or "unchanged"
}

ApplyResourceResponse represents the response for apply operations

type DeleteResourceResponse

type DeleteResourceResponse struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	Namespace  string `json:"namespace,omitempty"`
	Operation  string `json:"operation"` // "deleted" or "not_found"
}

DeleteResourceResponse represents the response for delete operations

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler holds the services and provides HTTP handlers

func New

func New(services *services.Services, logger *slog.Logger) *Handler

New creates a new Handler instance

func (*Handler) ApplyResource

func (h *Handler) ApplyResource(w http.ResponseWriter, r *http.Request)

ApplyResource handles POST /api/v1/apply - forwards resource to Kubernetes API like kubectl apply

func (*Handler) CreateComponent

func (h *Handler) CreateComponent(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateDataPlane

func (h *Handler) CreateDataPlane(w http.ResponseWriter, r *http.Request)

CreateDataPlane handles POST /api/v1/orgs/{orgName}/dataplanes

func (*Handler) CreateEnvironment

func (h *Handler) CreateEnvironment(w http.ResponseWriter, r *http.Request)

CreateEnvironment handles POST /api/v1/orgs/{orgName}/environments

func (*Handler) CreateProject

func (h *Handler) CreateProject(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateWorkload

func (h *Handler) CreateWorkload(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteResource

func (h *Handler) DeleteResource(w http.ResponseWriter, r *http.Request)

DeleteResource handles DELETE /api/v1/delete - forwards resource deletion to Kubernetes API like kubectl delete

func (*Handler) GetBuildObserverURL

func (h *Handler) GetBuildObserverURL(w http.ResponseWriter, r *http.Request)

func (*Handler) GetBuildPlane

func (h *Handler) GetBuildPlane(w http.ResponseWriter, r *http.Request)

func (*Handler) GetComponent

func (h *Handler) GetComponent(w http.ResponseWriter, r *http.Request)

func (*Handler) GetComponentBinding

func (h *Handler) GetComponentBinding(w http.ResponseWriter, r *http.Request)

func (*Handler) GetComponentObserverURL

func (h *Handler) GetComponentObserverURL(w http.ResponseWriter, r *http.Request)

func (*Handler) GetDataPlane

func (h *Handler) GetDataPlane(w http.ResponseWriter, r *http.Request)

GetDataPlane handles GET /api/v1/orgs/{orgName}/dataplanes/{dpName}

func (*Handler) GetEnvironment

func (h *Handler) GetEnvironment(w http.ResponseWriter, r *http.Request)

GetEnvironment handles GET /api/v1/orgs/{orgName}/environments/{envName}

func (*Handler) GetOrganization

func (h *Handler) GetOrganization(w http.ResponseWriter, r *http.Request)

GetOrganization handles GET /api/v1/orgs/{orgName}

func (*Handler) GetProject

func (h *Handler) GetProject(w http.ResponseWriter, r *http.Request)

func (*Handler) GetProjectDeploymentPipeline

func (h *Handler) GetProjectDeploymentPipeline(w http.ResponseWriter, r *http.Request)

func (*Handler) GetWorkloads

func (h *Handler) GetWorkloads(w http.ResponseWriter, r *http.Request)

func (*Handler) Health

func (h *Handler) Health(w http.ResponseWriter, r *http.Request)

Health handles health check requests

func (*Handler) ListBuildPlanes

func (h *Handler) ListBuildPlanes(w http.ResponseWriter, r *http.Request)

ListBuildPlanes retrieves all build planes for an organization

func (*Handler) ListBuildTemplates

func (h *Handler) ListBuildTemplates(w http.ResponseWriter, r *http.Request)

func (*Handler) ListBuilds

func (h *Handler) ListBuilds(w http.ResponseWriter, r *http.Request)

func (*Handler) ListComponents

func (h *Handler) ListComponents(w http.ResponseWriter, r *http.Request)

func (*Handler) ListDataPlanes

func (h *Handler) ListDataPlanes(w http.ResponseWriter, r *http.Request)

ListDataPlanes handles GET /api/v1/orgs/{orgName}/dataplanes

func (*Handler) ListEnvironments

func (h *Handler) ListEnvironments(w http.ResponseWriter, r *http.Request)

ListEnvironments handles GET /api/v1/orgs/{orgName}/environments

func (*Handler) ListOrganizations

func (h *Handler) ListOrganizations(w http.ResponseWriter, r *http.Request)

ListOrganizations handles GET /api/v1/orgs

func (*Handler) ListProjects

func (h *Handler) ListProjects(w http.ResponseWriter, r *http.Request)

func (*Handler) PromoteComponent

func (h *Handler) PromoteComponent(w http.ResponseWriter, r *http.Request)

func (*Handler) Ready

func (h *Handler) Ready(w http.ResponseWriter, r *http.Request)

Ready handles readiness check requests

func (*Handler) Routes

func (h *Handler) Routes() http.Handler

Routes sets up all HTTP routes and returns the configured handler

func (*Handler) TriggerBuild

func (h *Handler) TriggerBuild(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateComponentBinding

func (h *Handler) UpdateComponentBinding(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL