Documentation ¶
Index ¶
- func ListContextsToTerminal(contexts []PunqContext)
- func ListUsers(users []PunqUser, showPasswords bool)
- type AccessLevel
- type ClusterInfoDto
- type ClusterResourceInfoDto
- type ClusterStatusDto
- type NodeStat
- type PunqAccess
- type PunqContext
- type PunqToken
- type PunqUser
- type PunqUserCreateInput
- type PunqUserUpdateInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListContextsToTerminal ¶ added in v1.2.38
func ListContextsToTerminal(contexts []PunqContext)
Types ¶
type AccessLevel ¶
type AccessLevel int
const ( READER AccessLevel = iota USER ADMIN )
func AccessLevelFromString ¶
func AccessLevelFromString(level string) AccessLevel
type ClusterInfoDto ¶ added in v1.2.15
type ClusterInfoDto struct { ClusterStatus ClusterStatusDto `json:"clusterStatus"` NodeStats []NodeStat `json:"nodeStats"` }
type ClusterResourceInfoDto ¶
type ClusterStatusDto ¶
type ClusterStatusDto struct { ClusterName string `json:"clusterName"` Pods int `json:"pods"` CpuInMilliCores int `json:"cpu"` CpuLimitInMilliCores int `json:"cpuLimit"` MemoryInBytes int64 `json:"memoryInBytes"` MemoryLimitInBytes int64 `json:"memoryLimitInBytes"` EphemeralStorageLimitInBytes int64 `json:"ephemeralStorageLimitInBytes"` CurrentTime string `json:"currentTime"` KubernetesVersion string `json:"kubernetesVersion"` Platform string `json:"platform"` }
func ClusterStatusDtoExmapleData ¶
func ClusterStatusDtoExmapleData() ClusterStatusDto
type NodeStat ¶
type NodeStat struct { Name string `json:"name" validate:"required"` MaschineId string `json:"maschineId" validate:"required"` Cpus int64 `json:"cpus" validate:"required"` MemoryInBytes int64 `json:"memoryInBytes" validate:"required"` EphemeralInBytes int64 `json:"ephemeralInBytes" validate:"required"` MaxPods int64 `json:"maxPods" 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 PunqAccess ¶
type PunqAccess struct { UserId string `json:"userId" validate:"required"` Level AccessLevel `json:"level" validate:"required"` }
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"` Access []PunqAccess `json:"access" validate:"required"` }
func CreateContext ¶ added in v1.2.38
func CreateContext(id string, name string, context string, provider string, access []PunqAccess) PunqContext
func (*PunqContext) AddAccess ¶
func (c *PunqContext) AddAccess(userId string, accessLevel AccessLevel)
func (*PunqContext) PrintToTerminal ¶ added in v1.2.38
func (c *PunqContext) PrintToTerminal()
func (*PunqContext) RemoveAccess ¶
func (c *PunqContext) RemoveAccess(userId 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"` }
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"` }
type PunqUserUpdateInput ¶ added in v1.2.0
type PunqUserUpdateInput 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"` }
Click to show internal directories.
Click to hide internal directories.