Documentation
¶
Overview ¶
Package base62 provides utilities for working with base62 strings. base62 strings will only contain characters: 0-9, a-z, A-Z
Index ¶
- Constants
- func AddRemoveDataPlane(w http.ResponseWriter, req *http.Request)
- func Base62Random(length int) (string, error)
- func CreateApplication(w http.ResponseWriter, req *http.Request)
- func CreateCustomer(w http.ResponseWriter, req *http.Request)
- func CreateDataPlane(w http.ResponseWriter, req *http.Request)
- func CreateTenant(w http.ResponseWriter, req *http.Request)
- func CreateTenantInfra(w http.ResponseWriter, req *http.Request)
- func DeleteApplicationStatus(w http.ResponseWriter, req *http.Request)
- func DeleteCustomer(w http.ResponseWriter, req *http.Request)
- func DeleteDataPlane(w http.ResponseWriter, req *http.Request)
- func DeleteTenant(w http.ResponseWriter, req *http.Request)
- func DeleteTenantInfra(w http.ResponseWriter, req *http.Request)
- func GetAllTenantInCustomer(w http.ResponseWriter, req *http.Request)
- func GetApplicationStatus(w http.ResponseWriter, req *http.Request)
- func GetDataPlaneStatus(w http.ResponseWriter, req *http.Request)
- func GetKubeConfig(w http.ResponseWriter, req *http.Request)
- func GetTenantInCustomer(w http.ResponseWriter, req *http.Request)
- func GetTenantInfra(w http.ResponseWriter, req *http.Request)
- func JsonWrap(data string) ([]byte, error)
- func ListCustomer(w http.ResponseWriter, req *http.Request)
- func ListDataPlane(w http.ResponseWriter, req *http.Request)
- func ListTenantInfra(w http.ResponseWriter, req *http.Request)
- func NewPatchValue(op, path string, value interface{}) []byte
- func NewRouter() *mux.Router
- func Ptr[T any](v T) *T
- func RandomWithReader(length int, reader io.Reader) (string, error)
- func String(length int) string
- func UpdateApplication(w http.ResponseWriter, req *http.Request)
- func UpdateCustomer(w http.ResponseWriter, req *http.Request)
- func UpdateDataPlane(w http.ResponseWriter, req *http.Request)
- func UpdateTenant(w http.ResponseWriter, req *http.Request)
- func UpdateTenantInfra(w http.ResponseWriter, req *http.Request)
- type CustomMsg
- type CustomerListResponse
- type KubeConfig
- type Response
- type Route
- type Routes
Constants ¶
View Source
const ( ApplicationCreationFailEvent eventType = `` /* 152-byte string literal not displayed */ ApplicationCreationSuccessEvent eventType = `` /* 154-byte string literal not displayed */ )
View Source
const (
ConfigGetFail string = "Config get failed for customer"
)
config
View Source
const (
)Variables ¶
This section is empty.
Functions ¶
func AddRemoveDataPlane ¶
func AddRemoveDataPlane(w http.ResponseWriter, req *http.Request)
func Base62Random ¶
Random generates a random string using base-62 characters. Resulting entropy is ~5.95 bits/character.
func CreateApplication ¶
func CreateApplication(w http.ResponseWriter, req *http.Request)
func CreateCustomer ¶
func CreateCustomer(w http.ResponseWriter, req *http.Request)
CreateCustomer handles creating a customer
func CreateDataPlane ¶
func CreateDataPlane(w http.ResponseWriter, req *http.Request)
func CreateTenant ¶
func CreateTenant(w http.ResponseWriter, req *http.Request)
func CreateTenantInfra ¶
func CreateTenantInfra(w http.ResponseWriter, req *http.Request)
func DeleteApplicationStatus ¶
func DeleteApplicationStatus(w http.ResponseWriter, req *http.Request)
func DeleteCustomer ¶
func DeleteCustomer(w http.ResponseWriter, req *http.Request)
DeleteCustomer handles deleting a customer
func DeleteDataPlane ¶
func DeleteDataPlane(w http.ResponseWriter, req *http.Request)
func DeleteTenant ¶
func DeleteTenant(w http.ResponseWriter, req *http.Request)
func DeleteTenantInfra ¶
func DeleteTenantInfra(w http.ResponseWriter, req *http.Request)
func GetAllTenantInCustomer ¶
func GetAllTenantInCustomer(w http.ResponseWriter, req *http.Request)
func GetApplicationStatus ¶
func GetApplicationStatus(w http.ResponseWriter, req *http.Request)
func GetDataPlaneStatus ¶
func GetDataPlaneStatus(w http.ResponseWriter, req *http.Request)
func GetKubeConfig ¶
func GetKubeConfig(w http.ResponseWriter, req *http.Request)
func GetTenantInCustomer ¶
func GetTenantInCustomer(w http.ResponseWriter, req *http.Request)
func GetTenantInfra ¶
func GetTenantInfra(w http.ResponseWriter, req *http.Request)
func ListCustomer ¶
func ListCustomer(w http.ResponseWriter, req *http.Request)
ListCustomer handles listing customers
func ListDataPlane ¶
func ListDataPlane(w http.ResponseWriter, req *http.Request)
func ListTenantInfra ¶
func ListTenantInfra(w http.ResponseWriter, req *http.Request)
func NewPatchValue ¶
constructor for patchValue{}
func RandomWithReader ¶
RandomWithReader generates a random string using base-62 characters and a given reader. Resulting entropy is ~5.95 bits/character.
func UpdateApplication ¶
func UpdateApplication(w http.ResponseWriter, req *http.Request)
func UpdateCustomer ¶
func UpdateCustomer(w http.ResponseWriter, req *http.Request)
UpdateCustomer handles updating a customer
func UpdateDataPlane ¶
func UpdateDataPlane(w http.ResponseWriter, req *http.Request)
func UpdateTenant ¶
func UpdateTenant(w http.ResponseWriter, req *http.Request)
func UpdateTenantInfra ¶
func UpdateTenantInfra(w http.ResponseWriter, req *http.Request)
Types ¶
type CustomMsg ¶
type CustomMsg string
const ( ServerUnmarshallError CustomMsg = "Server json unmarshal error" ServerBodyCloseError CustomMsg = "Server body close error" ServerReqSizeExceed CustomMsg = "Server req size exceed error" )
Server
const ( CustomerNamespaceExists CustomMsg = "Customer namespace exists" CustomerNamespaceDoesNotExists CustomMsg = "Customer namespace doesn't exist" CustomerNamespaceSuccess CustomMsg = "Customer namespace create success" CustomerNamespaceGetFail CustomMsg = "Customer namespace get fail" CustomerNamespaceUpdateSuccess CustomMsg = "Customer namespace update success" CustomerNamespaceUpdateFail CustomMsg = "Customer namespace update failed" CustomerNamespaceCreateFail CustomMsg = "Customer namespace create failed" CustomerNamespaceListEmpty CustomMsg = "Customer namespace list empty" CustomerNamespaceList CustomMsg = "Customer namespace list" CustomerServiceAccountCreateFail CustomMsg = "Customer service account creation failed." CustomerNotExistInDataplane CustomMsg = "Customer not exist in dataplane" CustomerNamespaceDeleteSuccess CustomMsg = "Customer namespace delete success" CustomerNamespaceDeleteFail CustomMsg = "Customer namespace delete failed" )
Customer
const ( DataPlaneCreateFail CustomMsg = "DataPlane create fail" DataPlaneCreateIntiated CustomMsg = "DataPlane creation initiated" DataPlaneGetFail CustomMsg = "DataPlane get fail" DataPlaneListFail CustomMsg = "DataPlane list fail" DataplaneDeletionInitiated CustomMsg = "Dataplane delete intiated" DataplaneDeletionFailed CustomMsg = "Dataplane delete failed" DataplaneDeletionFailedCustomerExists CustomMsg = "Dataplane delete failed, customer exists on dataplane" DataplaneAddedSuccess CustomMsg = "Dataplane added success" DataplaneRemoveSuccess CustomMsg = "Dataplane remove success" DataplanePatchFail CustomMsg = "Dataplane patch fail" DataplaneUpdateSuccess CustomMsg = "Dataplane updated successfully" DataplaneUpdateFail CustomMsg = "Dataplane update fail" )
DataPlane
const ( TenantCreateFail CustomMsg = "Tenant creation fail" TenantUpdateFail CustomMsg = "Tenant update fail" TenantCreateIntiated CustomMsg = "Tenant creation success" TenantCreateFailDataplaneNotActive CustomMsg = "Tenant creation failed, Dataplane is not Active" TenantGetFail CustomMsg = "Tenant get fail" TenantListFail CustomMsg = "Tenant list fail" TenantDeleteFail CustomMsg = "Tenant delete failed" TenantDeleteIntiated CustomMsg = "Tenant deletion successfully initiated" )
Tenant
const ( TenantsInfraCreateFail CustomMsg = "tenantsinfra creation failed" TenantsInfraGetFail CustomMsg = "tenantsinfra get failed" TenantsInfraListFail CustomMsg = "tenantsinfra list failed" TenantsInfraDeleteFail CustomMsg = "tenantsinfra delete failed" TenantsInfraDeleteInitiated CustomMsg = "tenantsinfra delete initiated" TenantsInfraCreateInitiated CustomMsg = "tenantsinfra creation initiated" TenantInfraUpdateSuccess CustomMsg = "tenantsinfra update success" TenantInfraUpdateFail CustomMsg = "tenantsinfra update failed" TenantInfraCreateFailDataplaneNotActive CustomMsg = "tenantsinfra creation failed, dataplane is not active" TenantInfraUpdateFailDataplaneNotActive CustomMsg = "tenantsinfra update failed, dataplane is not active" )
TenantsInfra
const ( ApplicationCreateFail CustomMsg = "Application creation fail" ApplicationCreateIntiated CustomMsg = "Application creation initiated" ApplicationGetFail CustomMsg = "Application get fail" ApplicationDeleteFail CustomMsg = "Application delete fail" ApplicationDeleteIntiated CustomMsg = "Application delete initiated" ApplicationUpdateSuccess CustomMsg = "Application update success" ApplicationUpdateFail CustomMsg = "Application update failed" )
Application
const (
JsonMarshallError CustomMsg = "Json Marshall Error"
)
Json
type CustomerListResponse ¶
type KubeConfig ¶
type KubeConfig struct { CurrentContext string `json:"current_context"` Customer string `json:"customer"` Namespace string `json:"namespace"` ClusterCA string `json:"cluster_ca"` ClusterServer string `json:"cluster_server"` UserTokenValue string `json:"user_token_value"` }
func NewKubeConfig ¶
func NewKubeConfig( customerName string, clientset *kubernetes.Clientset, ) (*KubeConfig, error)
type Response ¶
func NewResponse ¶
func (*Response) LogResponse ¶
func (res *Response) LogResponse()
func (*Response) SetMsgResponse ¶
func (res *Response) SetMsgResponse(w *http.ResponseWriter)
func (*Response) SetResponse ¶
func (res *Response) SetResponse(w *http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.