types

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargeConfig added in v0.1.5

type ChargeConfig struct {
	ChargeType string `json:"charge_type"`
	Period     int    `json:"period"`
	PeriodUnit string `json:"period_unit"`
}

type ClusterInfo

type ClusterInfo struct {
	//Base Config
	Id           int64  `json:"id"`
	Name         string `json:"name" binding:"required,max=20"`
	Desc         string `json:"desc"`
	RegionId     string `json:"region_id" binding:"required"`
	ZoneId       string `json:"zone_id" binding:"required"`
	ClusterType  string `json:"cluster_type"`
	InstanceType string `json:"instance_type" binding:"required"`
	Image        string `json:"image"`
	Provider     string `json:"provider" binding:"required,mustIn=cloud"`
	Username     string `json:"username"`
	Password     string `json:"password" binding:"required,min=8,max=30,charTypeGT3"`
	AccountKey   string `json:"account_key" binding:"required"` //阿里云ak
	KeyId        string `json:"key_id"`
	KeyPairId    string `json:"key_pair_id"`
	KeyPairName  string `json:"key_pair_name"`
	PrivateKey   string `json:"private_key"`
	AuthType     string `json:"auth_type"`
	//Advanced Config
	ImageConfig   *ImageConfig   `json:"image_config"`
	NetworkConfig *NetworkConfig `json:"network_config"`
	StorageConfig *StorageConfig `json:"storage_config"`
	ChargeConfig  *ChargeConfig  `json:"charge_config"`
	ExtendConfig  *ExtendConfig  `json:"extend_config"`

	//Custom Config
	Tags map[string]string `json:"tags"`
}

type ExtendConfig added in v0.5.0

type ExtendConfig struct {
	Core    int    `json:"core"`
	Memory  int    `json:"memory"`
	CpuType string `json:"cpu_type"`
}

type ImageConfig added in v0.2.1

type ImageConfig struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	Platform string `json:"platform"`
	Size     int    `json:"size"` //GB
}

type KeyInfo

type KeyInfo struct {
	AK       string
	SK       string
	Provider string
}

type NetworkConfig

type NetworkConfig struct {
	Vpc                     string `json:"vpc" binding:"required"`
	SubnetId                string `json:"subnet_id" binding:"required"`
	SecurityGroup           string `json:"security_group" binding:"required"`
	InternetChargeType      string `json:"internet_charge_type"`
	InternetMaxBandwidthOut int    `json:"internet_max_bandwidth_out"`
	InternetIpType          string `json:"internet_ip_type"`
}

type OrgKeys

type OrgKeys struct {
	OrgId int64     `json:"org_id"`
	Info  []KeyInfo `json:"info"`
}

type PageReq added in v0.7.0

type PageReq struct {
	Marker   string `json:"marker" form:"marker"`
	PageNum  int    `json:"page_number" form:"page_number"`
	PageSize int    `json:"page_size" form:"page_size"`
}

func AdjustPage added in v0.7.0

func AdjustPage(page PageReq) PageReq

type PageRsp added in v0.7.0

type PageRsp struct {
	NextMarker string `json:"next_marker"`
	Total      int    `json:"total"`
}

type Pager

type Pager struct {
	PageNumber int
	PageSize   int
	Total      int
}

type StorageConfig

type StorageConfig struct {
	MountPoint string       `json:"mount_point"`
	NAS        string       `json:"nas"`
	Disks      *cloud.Disks `json:"disks"`
}

Jump to

Keyboard shortcuts

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