api

package
v0.1.21-rc Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 40 Imported by: 0

Documentation

Overview

Copyright (C) 2021-2023, Kubefirst

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClusterSecret added in v0.1.21

func CreateClusterSecret(c *gin.Context)

func CreateEnvironment added in v0.0.3

func CreateEnvironment(c *gin.Context)

func DeleteCluster

func DeleteCluster(c *gin.Context)

DeleteCluster godoc @Summary Delete a Kubefirst cluster @Description Delete a Kubefirst cluster @Tags cluster @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /cluster/:cluster_name [delete] @Param Authorization header string true "API key" default(Bearer <API key>) DeleteCluster handles a request to delete a cluster

func DeleteEnvironment added in v0.0.3

func DeleteEnvironment(c *gin.Context)

func DeleteServiceFromCluster

func DeleteServiceFromCluster(c *gin.Context)

DeleteServiceFromCluster godoc @Summary Remove a gitops catalog application from a cluster @Description Remove a gitops catalog application from a cluster @Tags services @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Param service_name path string true "Service name to be removed" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /services/:cluster_name/:service_name [delete] @Param Authorization header string true "API key" default(Bearer <API key>) DeleteServiceFromCluster handles a request to remove a gitops catalog application from a cluster

func GetCloudProviderDefaults added in v0.1.7

func GetCloudProviderDefaults(c *gin.Context)

func GetCluster

func GetCluster(c *gin.Context)

GetCluster godoc @Summary Return a configured Kubefirst cluster @Description Return a configured Kubefirst cluster @Tags cluster @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Success 200 {object} pkgtypes.Cluster @Failure 400 {object} types.JSONFailureResponse @Router /cluster/:cluster_name [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetCluster returns a specific configured cluster

func GetClusterKubeConfig added in v0.1.10

func GetClusterKubeConfig(c *gin.Context)

func GetClusterSecret added in v0.1.9

func GetClusterSecret(c *gin.Context)

func GetClusters

func GetClusters(c *gin.Context)

GetClusters godoc @Summary Return all known configured Kubefirst clusters @Description Return all known configured Kubefirst clusters @Tags cluster @Accept json @Produce json @Success 200 {object} []pkgtypes.Cluster @Failure 400 {object} types.JSONFailureResponse @Router /cluster [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetClusters returns all known configured clusters

func GetEnvironments added in v0.0.3

func GetEnvironments(c *gin.Context)

func GetExportCluster

func GetExportCluster(c *gin.Context)

PostExportCluster godoc @Summary Export a Kubefirst cluster database entry @Description Export a Kubefirst cluster database entry @Tags cluster @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /cluster/:cluster_name/export [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostExportCluster handles a request to export a cluster

func GetGitopsCatalogApps

func GetGitopsCatalogApps(c *gin.Context)

GetGitopsCatalogApps godoc @Summary Returns a list of available Kubefirst gitops catalog applications @Description Returns a list of available Kubefirst gitops catalog applications @Tags gitops-catalog @Accept json @Produce json @Success 200 {object} types.GitopsCatalogApps @Failure 400 {object} types.JSONFailureResponse @Router /gitops-catalog/:cluster_name/:cloud_provider/apps [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetGitopsCatalogApps returns a list of available Kubefirst gitops catalog applications

func GetHealth

func GetHealth(c *gin.Context)

getHealth godoc @Summary Return health status if the application is running. @Description Return health status if the application is running. @Tags health @Produce json @Success 200 {object} types.JSONHealthResponse @Router /health [get] @Param Authorization header string true "API key" default(Bearer <API key>)

func GetLogs

func GetLogs(c *gin.Context)

GetLogs godoc @Summary Stream API server logs @Description Stream API server logs @Tags logs @Router /stream/file_name [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetLogs

func GetServices

func GetServices(c *gin.Context)

GetServices godoc @Summary Returns a list of services for a cluster @Description Returns a list of services for a cluster @Tags services @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Success 200 {object} types.ClusterServiceList @Failure 400 {object} types.JSONFailureResponse @Router /services/:cluster_name [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetServices returns a list of services for a cluster

func GetValidateAWSDomain

func GetValidateAWSDomain(c *gin.Context)

GetValidateAWSDomain godoc @Summary Returns status of whether or not an AWS hosted zone is validated for use with Kubefirst @Description Returns status of whether or not an AWS hosted zone is validated for use with Kubefirst @Tags aws @Accept json @Produce json @Param domain path string true "Domain name, no trailing dot" @Success 200 {object} types.AWSDomainValidateResponse @Failure 400 {object} types.JSONFailureResponse @Router /aws/domain/validate/:domain [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetValidateAWSDomain returns status for an AWS domain validation

func GetValidateCivoDomain

func GetValidateCivoDomain(c *gin.Context)

GetValidateCivoDomain godoc @Summary Returns status of whether or not a Civo hosted zone is validated for use with Kubefirst @Description Returns status of whether or not a Civo hosted zone is validated for use with Kubefirst @Tags civo @Accept json @Produce json @Param domain path string true "Domain name, no trailing dot" @Param settings body types.CivoDomainValidationRequest true "Domain validation request in JSON format" @Success 200 {object} types.CivoDomainValidationResponse @Failure 400 {object} types.JSONFailureResponse @Router /civo/domain/validate/:domain [get] @Param Authorization header string true "API key" default(Bearer <API key>) GetValidateCivoDomain returns status for a Civo domain validation

func ListInstanceSizesForRegion added in v0.0.3

func ListInstanceSizesForRegion(c *gin.Context)

func ListZonesForRegion added in v0.0.4

func ListZonesForRegion(c *gin.Context)

Currently only needs to support google

func PostAddServiceToCluster

func PostAddServiceToCluster(c *gin.Context)

PostAddServiceToCluster godoc @Summary Add a gitops catalog application to a cluster as a service @Description Add a gitops catalog application to a cluster as a service @Tags services @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Param service_name path string true "Service name to be added" @Param definition body types.GitopsCatalogAppCreateRequest true "Service create request in JSON format" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /services/:cluster_name/:service_name [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostAddServiceToCluster handles a request to add a service to a cluster based on a gitops catalog app

func PostCreateCluster

func PostCreateCluster(c *gin.Context)

PostCreateCluster godoc @Summary Create a Kubefirst cluster @Description Create a Kubefirst cluster @Tags cluster @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Param definition body types.ClusterDefinition true "Cluster create request in JSON format" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /cluster/:cluster_name [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostCreateCluster handles a request to create a cluster

func PostDomains

func PostDomains(c *gin.Context)

PostDomains godoc @Summary Return a list of registered domains/hosted zones for a cloud provider account @Description Return a list of registered domains/hosted zones for a cloud provider account @Tags domain @Accept json @Produce json @Param request body types.DomainListRequest true "Domain list request in JSON format" @Success 200 {object} types.DomainListResponse @Failure 400 {object} types.JSONFailureResponse @Router /domain/:cloud_provider [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostDomains returns registered domains/hosted zones for a cloud provider account

func PostImportCluster

func PostImportCluster(c *gin.Context)

PostImportCluster godoc @Summary Import a Kubefirst cluster database entry @Description Import a Kubefirst cluster database entry @Tags cluster @Accept json @Produce json @Param request_body body types.Cluster true "Cluster import request in JSON format" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /cluster/import [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostImportCluster handles a request to import a cluster

func PostRegions

func PostRegions(c *gin.Context)

PostRegions godoc @Summary Return a list of regions for a cloud provider account @Description Return a list of regions for a cloud provider account @Tags region @Accept json @Produce json @Param request body types.RegionListRequest true "Region list request in JSON format" @Success 200 {object} types.RegionListResponse @Failure 400 {object} types.JSONFailureResponse @Router /region/:cloud_provider [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostRegions returns a list of regions for a cloud provider account

func PostResetClusterProgress

func PostResetClusterProgress(c *gin.Context)

PostResetClusterProgress godoc @Summary Remove a cluster progress marker from a cluster entry @Description Remove a cluster progress marker from a cluster entry @Tags cluster @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Success 202 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /cluster/:cluster_name/reset_progress [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostResetClusterProgress removes a cluster progress marker from a cluster entry

func PostTelemetry

func PostTelemetry(c *gin.Context)

PostTelemetry godoc @Summary Create a Telemetry Event @Description Create a Telemetry Event @Tags telemetry @Accept json @Param cluster_name path string true "Cluster name" @Param definition body types.TelemetryRequest true "event request in JSON format" @Success 202 {object} types.JSONSuccessResponse @Router /telemetry/:cluster_name [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostTelemetry sents a new telemetry event

func PostValidateCloudflareDomain added in v0.1.9

func PostValidateCloudflareDomain(c *gin.Context)

func PostValidateDigitalOceanDomain added in v0.1.9

func PostValidateDigitalOceanDomain(c *gin.Context)

func PostValidateService added in v0.1.21

func PostValidateService(c *gin.Context)

PostValidateService godoc @Summary Validate gitops catalog application @Description Validate a gitops catalog application so it can be deleted @Tags services @Accept json @Produce json @Param cluster_name path string true "Cluster name" @Param service_name path string true "Service name to be validated" @Param definition body types.GitopsCatalogAppCreateRequest true "Service create request in JSON format" @Success 202 {object} types.GitopsCatalogAppValidateRequest @Failure 400 {object} types.JSONFailureResponse @Router /services/:cluster_name/:service_name/validate [post] @Param Authorization header string true "API key" default(Bearer <API key>) PostValidateService handles a request to add a service to a cluster based on a gitops catalog app

func StreamLogs

func StreamLogs(fileName string, ch chan types.LogMessage, errCh chan error, done chan struct{}, mu sync.Mutex, buffer string) error

StreamLogs redirects stdout logs to the stream via SSE

func UpdateClusterSecret added in v0.1.9

func UpdateClusterSecret(c *gin.Context)

func UpdateEnvironment added in v0.0.4

func UpdateEnvironment(c *gin.Context)

func UpdateGitopsCatalogApps

func UpdateGitopsCatalogApps(c *gin.Context)

UpdateGitopsCatalogApps godoc @Summary Updates the list of available Kubefirst gitops catalog applications @Description Updates the list of available Kubefirst gitops catalog applications @Tags gitops-catalog @Accept json @Produce json @Success 200 {object} types.JSONSuccessResponse @Failure 400 {object} types.JSONFailureResponse @Router /gitops-catalog/apps/update [get] @Param Authorization header string true "API key" default(Bearer <API key>) UpdateGitopsCatalogApps updates the list of available Kubefirst gitops catalog applications

Types

This section is empty.

Jump to

Keyboard shortcuts

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