Documentation ¶
Index ¶
- Variables
- func ExtractSingleConfigFromContext(config *api.Config, contextName string) (*api.Config, error)
- func ListContextsToTerminal(contexts []PunqContext)
- func ListUsers(users []PunqUser)
- func PrintAllContextFromConfig(config *api.Config)
- func WriteSingleConfigFileFromContext(config *api.Config, contextName string) error
- type AccessLevel
- type ClusterInfoDto
- type ClusterResourceInfoDto
- type ClusterStatusDto
- type KubernetesProvider
- type NodeStat
- type PunqContext
- type PunqToken
- type PunqUser
- type PunqUserCreateInput
Constants ¶
This section is empty.
Variables ¶
View Source
var ALL_PROVIDER []string = []string{ string(BRING_YOUR_OWN), string(DOCKER_ENTERPRISE), string(DOCKER_DESKTOP), string(AKS), string(GKE), string(EKS), string(K3S), string(K3D), string(MINIKUBE), string(KIND), string(KUBERNETES), string(SELF_HOSTED), string(DOKS), string(LINODE), string(IBM), string(ACK), string(OKE), string(OTC), string(OPEN_SHIFT), string(GKE_ON_PREM), string(RKE), string(KUBEADM), string(KUBEADM_ON_PREM), string(KUBEADM_ON_PREM_HETZNER), string(KUBEADM_ON_PREM_DIGITALOCEAN), string(KUBEADM_ON_PREM_LINODE), string(KUBEADM_ON_PREM_AWS), string(KUBEADM_ON_PREM_AZURE), string(KUBEADM_ON_PREM_GCP), string(SYS_ELEVEN), string(STACKIT), string(IONOS), string(SCALEWAY), string(VMWARE), string(MICROK8S), string(CIVO), string(GIANTSWARM), string(OVHCLOUD), string(GARDENER), string(HUAWEI), string(NIRMATA), string(PF9), string(NKS), string(APPSCODE), string(LOFT), string(SPECTROCLOUD), string(DIAMANTI), }
Functions ¶
func ExtractSingleConfigFromContext ¶ added in v1.3.3
func ListContextsToTerminal ¶ added in v1.2.38
func ListContextsToTerminal(contexts []PunqContext)
func PrintAllContextFromConfig ¶ added in v1.3.3
Types ¶
type AccessLevel ¶
type AccessLevel int
const ( UNKNOWNACCESS AccessLevel = iota READER USER ADMIN )
func AccessLevelFromString ¶
func AccessLevelFromString(level string) AccessLevel
func (*AccessLevel) String ¶ added in v1.5.0
func (level *AccessLevel) String() string
type ClusterInfoDto ¶ added in v1.2.15
type ClusterInfoDto struct { ClusterStatus ClusterStatusDto `json:"clusterStatus"` NodeStats []NodeStat `json:"nodeStats"` }
type ClusterResourceInfoDto ¶
type ClusterResourceInfoDto struct { LoadBalancerExternalIps []string `json:"loadBalancerExternalIps"` NodeStats []NodeStat `json:"nodeStats"` Country *utils.CountryDetails `json:"country"` Provider string `json:"provider"` }
type ClusterStatusDto ¶
type ClusterStatusDto struct { ClusterName string `json:"clusterName"` Pods int `json:"pods"` PodCpuUsageInMilliCores int `json:"podCpuUsageInMilliCores"` PodCpuLimitInMilliCores int `json:"podCpuLimitInMilliCores"` PodMemoryUsageInBytes int64 `json:"podMemoryUsageInBytes"` PodMemoryLimitInBytes int64 `json:"podMemoryLimitInBytes"` EphemeralStorageLimitInBytes int64 `json:"ephemeralStorageLimitInBytes"` CurrentTime string `json:"currentTime"` KubernetesVersion string `json:"kubernetesVersion"` Platform string `json:"platform"` Country *utils.CountryDetails `json:"country"` }
func ClusterStatusDtoExmapleData ¶
func ClusterStatusDtoExmapleData() ClusterStatusDto
type KubernetesProvider ¶ added in v1.3.2
type KubernetesProvider string
const ( UNKNOWN KubernetesProvider = "UNKNOWN" BRING_YOUR_OWN KubernetesProvider = "BRING_YOUR_OWN" DOCKER_ENTERPRISE KubernetesProvider = "DOCKER_ENTERPRISE" // Docker DOCKER_DESKTOP KubernetesProvider = "DOCKER_DESKTOP" // Docker AKS KubernetesProvider = "AKS" // Azure Kubernetes Service GKE KubernetesProvider = "GKE" // Google Kubernetes Engine EKS KubernetesProvider = "EKS" // Amazon Elastic Kubernetes Service K3S KubernetesProvider = "K3S" // K3S K3D KubernetesProvider = "K3D" // K3D MINIKUBE KubernetesProvider = "MINIKUBE" // Minikube KIND KubernetesProvider = "KIND" // Kind KUBERNETES KubernetesProvider = "KUBERNETES" // Kubernetes SELF_HOSTED KubernetesProvider = "SELF_HOSTED" // Self Hosted DOKS KubernetesProvider = "DOKS" // Digital Ocean Kubernetes LINODE KubernetesProvider = "LINODE" // Linode Kubernetes IBM KubernetesProvider = "IBM" // IBM Kubernetes ACK KubernetesProvider = "ACK" // Alibaba Cloud Kubernetes OKE KubernetesProvider = "OKE" // Oracle Cloud Kubernetes OTC KubernetesProvider = "OTC" // Telekom cloud OPEN_SHIFT KubernetesProvider = "OPEN_SHIFT" // RED HAT OpenShift GKE_ON_PREM KubernetesProvider = "GKE_ON_PREM" // Google Kubernetes Engine On-Prem RKE KubernetesProvider = "RKE" // Rancher Kubernetes Engine KUBEADM KubernetesProvider = "KUBEADM" // Kubeadm KUBEADM_ON_PREM KubernetesProvider = "KUBEADM_ON_PREM" // Kubeadm On-Prem KUBEADM_ON_PREM_HETZNER KubernetesProvider = "KUBEADM_ON_PREM_HETZNER" // Kubeadm On-Prem Hetzner KUBEADM_ON_PREM_DIGITALOCEAN KubernetesProvider = "KUBEADM_ON_PREM_DIGITALOCEAN" // Kubeadm On-Prem Digital Ocean KUBEADM_ON_PREM_LINODE KubernetesProvider = "KUBEADM_ON_PREM_LINODE" // Kubeadm On-Prem Linode KUBEADM_ON_PREM_AWS KubernetesProvider = "KUBEADM_ON_PREM_AWS" // Kubeadm On-Prem AWS KUBEADM_ON_PREM_AZURE KubernetesProvider = "KUBEADM_ON_PREM_AZURE" // Kubeadm On-Prem Azure KUBEADM_ON_PREM_GCP KubernetesProvider = "KUBEADM_ON_PREM_GCP" // Kubeadm On-Prem GCP SYS_ELEVEN KubernetesProvider = "SYS_ELEVEN" // Managed Kubernetes by SysEleven STACKIT KubernetesProvider = "SKE" // STACKIT Kubernetes Engine (SKE) IONOS KubernetesProvider = "IONOS" // IONOS Cloud Managed SCALEWAY KubernetesProvider = "SCALEWAY" // scaleway VMWARE KubernetesProvider = "VMWARE" // VMware Tanzu Kubernetes Grid Integrated Edition MICROK8S KubernetesProvider = "MICROK8S" // MicroK8s CIVO KubernetesProvider = "CIVO" // Civo Kubernetes GIANTSWARM KubernetesProvider = "GIANTSWARM" // Giant Swarm Kubernetes OVHCLOUD KubernetesProvider = "OVHCLOUD" // OVHCloud Kubernetes GARDENER KubernetesProvider = "GARDENER" // SAP Gardener Kubernetes HUAWEI KubernetesProvider = "HUAWEI" // Huawei Cloud Kubernetes NIRMATA KubernetesProvider = "NIRMATA" // Nirmata Kubernetes PF9 KubernetesProvider = "PF9" // Platform9 Kubernetes NKS KubernetesProvider = "NKS" // Netapp Kubernetes Service APPSCODE KubernetesProvider = "APPSCODE" // AppsCode Kubernetes LOFT KubernetesProvider = "LOFT" // Loft Kubernetes SPECTROCLOUD KubernetesProvider = "SPECTROCLOUD" // Spectro Cloud Kubernetes DIAMANTI KubernetesProvider = "DIAMANTI" // Diamanti Kubernetes )
type NodeStat ¶
type NodeStat struct { Name string `json:"name" validate:"required"` MaschineId string `json:"maschineId" validate:"required"` CpuInCores int64 `json:"cpuInCores" validate:"required"` CpuInCoresUtilized float64 `json:"cpuInCoresUtilized" validate:"required"` CpuInCoresRequested float64 `json:"cpuInCoresRequested" validate:"required"` CpuInCoresLimited float64 `json:"cpuInCoresLimited" validate:"required"` MemoryInBytes int64 `json:"memoryInBytes" validate:"required"` MemoryInBytesUtilized int64 `json:"memoryInBytesUtilized" validate:"required"` MemoryInBytesRequested int64 `json:"memoryInBytesRequested" validate:"required"` MemoryInBytesLimited int64 `json:"memoryInBytesLimited" validate:"required"` EphemeralInBytes int64 `json:"ephemeralInBytes" validate:"required"` MaxPods int64 `json:"maxPods" validate:"required"` TotalPods int64 `json:"totalPods" validate:"required"` KubletVersion string `json:"kubletVersion" validate:"required"` OsType string `json:"osType" validate:"required"` OsImage string `json:"osImage" validate:"required"` Architecture string `json:"architecture" validate:"required"` }
func (*NodeStat) PrintPretty ¶
func (o *NodeStat) PrintPretty()
type PunqContext ¶
type PunqContext struct { Id string `json:"id" validate:"required"` Name string `json:"name" validate:"required"` ContextHash string `json:"contextHash" validate:"required"` Context string `json:"context" validate:"required"` Provider string `json:"provider" validate:"required"` Reachable bool `json:"reachable" validate:"required"` Users []string `json:"users" validate:"required"` AccessLevel AccessLevel `json:"accessLevel" validate:"required"` }
func CreateContext ¶ added in v1.2.38
func CreateContext(id string, name string, context string, provider string, minAccessLevel AccessLevel) PunqContext
func ParseConfigToPunqContexts ¶ added in v1.3.3
func ParseConfigToPunqContexts(data []byte) ([]PunqContext, error)
func ParseCurrentContextConfigToPunqContext ¶ added in v1.3.3
func ParseCurrentContextConfigToPunqContext(data []byte) (PunqContext, error)
func (*PunqContext) AddAccess ¶
func (c *PunqContext) AddAccess(newUserId string)
func (*PunqContext) PrintToTerminal ¶ added in v1.2.38
func (c *PunqContext) PrintToTerminal()
func (*PunqContext) RemoveAccess ¶
func (c *PunqContext) RemoveAccess(userIdToRemove string)
type PunqToken ¶ added in v1.2.0
type PunqToken struct {
Token string `json:"token" validate:"required"`
}
func CreateToken ¶ added in v1.2.0
type PunqUser ¶
type PunqUser struct { Id string `json:"id" validate:"required"` Email string `json:"email" validate:"required"` Password string `json:"password" validate:"required"` DisplayName string `json:"displayName" validate:"required"` AccessLevel AccessLevel `json:"accessLevel" validate:"required"` Created string `json:"createdAt" validate:"required"` }
func (*PunqUser) PasswordCheck ¶ added in v1.2.0
func (*PunqUser) PrintToTerminal ¶ added in v1.5.0
func (user *PunqUser) PrintToTerminal()
func (*PunqUser) PrintToTerminalWithPwd ¶ added in v1.5.0
func (user *PunqUser) PrintToTerminalWithPwd()
type PunqUserCreateInput ¶ added in v1.2.0
type PunqUserCreateInput struct { Email string `json:"email" validate:"required"` Password string `json:"password" validate:"required"` DisplayName string `json:"displayName" validate:"required"` AccessLevel AccessLevel `json:"accessLevel" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.