dtos

package
v1.1.34 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListContexts

func ListContexts(contexts []PunqContext)

func ListUsers

func ListUsers(users []PunqUser, showPasswords bool)

Types

type AccessLevel

type AccessLevel int
const (
	READER AccessLevel = iota
	USER
	ADMIN
)

func AccessLevelFromString

func AccessLevelFromString(level string) AccessLevel

type ClusterResourceInfoDto

type ClusterResourceInfoDto struct {
	LoadBalancerExternalIps []string   `json:"loadBalancerExternalIps"`
	NodeStats               []NodeStat `json:"nodeStats"`
}

type ClusterStatusDto

type ClusterStatusDto struct {
	ClusterName           string `json:"clusterName"`
	Pods                  int    `json:"pods"`
	CpuInMilliCores       int    `json:"cpu"`
	CpuLimitInMilliCores  int    `json:"cpuLimit"`
	Memory                string `json:"memory"`
	MemoryLimit           string `json:"memoryLimit"`
	EphemeralStorageLimit string `json:"ephemeralStorageLimit"`
	CurrentTime           string `json:"currentTime"`
}

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"`
	ContextBase64 string       `json:"contextBase64" validate:"required"`
	Access        []PunqAccess `json:"access" validate:"required"`
}

func (*PunqContext) AddAccess

func (c *PunqContext) AddAccess(userId string, accessLevel AccessLevel)

func (*PunqContext) RemoveAccess

func (c *PunqContext) RemoveAccess(userId string)

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"`
}

Jump to

Keyboard shortcuts

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