models

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 11 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {

	/* 容器ID (Optional) */
	ContainerId string `json:"containerId"`

	/* 容器状态 (Optional) */
	Status string `json:"status"`

	/* 实例类型 (Optional) */
	InstanceType string `json:"instanceType"`

	/* 可用区 (Optional) */
	Az string `json:"az"`

	/* 容器名称 (Optional) */
	Name string `json:"name"`

	/* 域名和IP映射的信息 (Optional) */
	HostAliases []HostAlias `json:"hostAliases"`

	/* 主机名 (Optional) */
	Hostname string `json:"hostname"`

	/* 容器执行命令 (Optional) */
	Command []string `json:"command"`

	/* 容器执行命令的参数 (Optional) */
	Args []string `json:"args"`

	/* 动态指定的容器执行的环境变量 (Optional) */
	Envs []EnvVar `json:"envs"`

	/* 镜像名称 (Optional) */
	Image string `json:"image"`

	/* secret引用的名称 (Optional) */
	Secret string `json:"secret"`

	/* 容器是否分配tty (Optional) */
	Tty bool `json:"tty"`

	/* 容器的工作目录 (Optional) */
	WorkingDir string `json:"workingDir"`

	/* 根Volume信息 (Optional) */
	RootVolume VolumeMount `json:"rootVolume"`

	/* 挂载的数据Volume信息 (Optional) */
	DataVolumes []VolumeMount `json:"dataVolumes"`

	/* 主网卡所属VPC的ID (Optional) */
	VpcId string `json:"vpcId"`

	/* 主网卡所属子网的ID (Optional) */
	SubnetId string `json:"subnetId"`

	/* 主网卡主IP地址 (Optional) */
	PrivateIpAddress string `json:"privateIpAddress"`

	/* 主网卡主IP绑定弹性IP的ID (Optional) */
	ElasticIpId string `json:"elasticIpId"`

	/* 主网卡主IP绑定弹性IP的地址 (Optional) */
	ElasticIpAddress string `json:"elasticIpAddress"`

	/* 主网卡信息 (Optional) */
	PrimaryNetworkInterface InstanceNetworkInterfaceAttachment `json:"primaryNetworkInterface"`

	/* 弹性网卡信息 (Optional) */
	SecondaryNetworkInterfaces []InstanceNetworkInterfaceAttachment `json:"secondaryNetworkInterfaces"`

	/* 容器日志配置信息 (Optional) */
	LogConfiguration LogConfiguration `json:"logConfiguration"`

	/* 计费配置信息 (Optional) */
	Charge charge.Charge `json:"charge"`

	/* 创建时间 (Optional) */
	LaunchTime string `json:"launchTime"`

	/* 容器终止原因 (Optional) */
	Reason string `json:"reason"`

	/* 容器描述 (Optional) */
	Description string `json:"description"`
}

type ContainerNetworkInterfaceAttachmentSpec

type ContainerNetworkInterfaceAttachmentSpec struct {

	/* 指明删除容器时是否删除网卡,默认True;当前只能是True (Optional) */
	AutoDelete *bool `json:"autoDelete"`

	/* 设备Index (Optional) */
	DeviceIndex *int `json:"deviceIndex"`

	/* 网卡接口规范  */
	NetworkInterface *NetworkInterfaceSpec `json:"networkInterface"`
}

type ContainerSpec

type ContainerSpec struct {

	/* 实例类型;参考[文档](https://www.jdcloud.com/help/detail/1992/isCatalog/1)  */
	InstanceType string `json:"instanceType"`

	/* 容器所属可用区  */
	Az string `json:"az"`

	/* 容器名称  */
	Name string `json:"name"`

	/* 域名和IP映射的信息;</br> 最大10个alias (Optional) */
	HostAliases []HostAlias `json:"hostAliases"`

	/* 主机名,规范请参考说明文档;默认容器ID (Optional) */
	Hostname *string `json:"hostname"`

	/* 容器执行命令,如果不指定默认是docker镜像的ENTRYPOINT (Optional) */
	Command []string `json:"command"`

	/* 容器执行命令的参数,如果不指定默认是docker镜像的CMD (Optional) */
	Args []string `json:"args"`

	/* 容器执行的环境变量;如果和镜像中的环境变量Key相同,会覆盖镜像中的值;</br> 最大10对 (Optional) */
	Envs []EnvVar `json:"envs"`

	/* 镜像名称 </br> 1. Docker Hub官方镜像通过类似nginx, mysql/mysql-server的名字指定 </br> </br> repository长度最大256个字符,tag最大128个字符,registry最大255个字符 </br> 下载镜像超时时间:10分钟  */
	Image string `json:"image"`

	/* secret引用名称;使用Docker Hub和京东云CR的镜像不需要secret (Optional) */
	Secret *string `json:"secret"`

	/* 容器是否分配tty。默认不分配 (Optional) */
	Tty *bool `json:"tty"`

	/* 容器的工作目录。如果不指定,默认是根目录(/);必须是绝对路径 (Optional) */
	WorkingDir *string `json:"workingDir"`

	/* 根Volume信息  */
	RootVolume *VolumeMountSpec `json:"rootVolume"`

	/* 挂载的数据Volume信息;最多7个 (Optional) */
	DataVolumes []VolumeMountSpec `json:"dataVolumes"`

	/* 主网卡主IP关联的弹性IP规格 (Optional) */
	ElasticIp *ElasticIpSpec `json:"elasticIp"`

	/* 主网卡配置信息  */
	PrimaryNetworkInterface *ContainerNetworkInterfaceAttachmentSpec `json:"primaryNetworkInterface"`

	/* 容器日志配置信息;默认会在本地分配10MB的存储空间 (Optional) */
	LogConfiguration *LogConfiguration `json:"logConfiguration"`

	/* 容器描述 (Optional) */
	Description *string `json:"description"`

	/* 计费配置;如不指定,默认计费类型是后付费-按使用时常付费 (Optional) */
	Charge *charge.ChargeSpec `json:"charge"`
}

type DockerRegistryData

type DockerRegistryData struct {

	/* registry服务器地址  */
	Server string `json:"server"`

	/* 用户名  */
	Username string `json:"username"`

	/* 密码  */
	Password string `json:"password"`

	/* 邮件地址 (Optional) */
	Email *string `json:"email"`
}

type ElasticIpSpec

type ElasticIpSpec struct {

	/* 弹性公网IP的限速 单位:MB (Optional) */
	BandwidthMbps *int `json:"bandwidthMbps"`

	/* IP服务商,取值为bgp或no_bg (Optional) */
	Provider *string `json:"provider"`

	/* 计费配置 (Optional) */
	ChargeSpec *charge.ChargeSpec `json:"chargeSpec"`
}

type EnvVar

type EnvVar struct {

	/* 环境变量名称  */
	Name string `json:"name"`

	/* 环境变量的值 (Optional) */
	Value *string `json:"value"`
}

type HostAlias

type HostAlias struct {

	/* 域名列表  */
	Hostnames []string `json:"hostnames"`

	/* IP地址  */
	Ip string `json:"ip"`
}

type InstanceCloudDisk

type InstanceCloudDisk struct {

	/* 云硬盘ID (Optional) */
	DiskId string `json:"diskId"`

	/* 所属AZ (Optional) */
	Az string `json:"az"`

	/* 硬盘名称 (Optional) */
	Name string `json:"name"`

	/* 硬盘描述 (Optional) */
	Description string `json:"description"`

	/* 磁盘类型,取值为 ssd, premium-hdd 之一 (Optional) */
	DiskType string `json:"diskType"`

	/* 磁盘大小(GiB) (Optional) */
	DiskSize int `json:"diskSize"`

	/* 云硬盘状态,取值为 creating、available、in-use、extending、restoring、deleting、deleted、error_creating、error_deleting、error_restoring、error_extending 之一 (Optional) */
	Status string `json:"status"`

	/* 创建时间 (Optional) */
	CreateTime string `json:"createTime"`
}

type InstanceNetworkInterface

type InstanceNetworkInterface struct {

	/* 弹性网卡ID (Optional) */
	NetworkInterfaceId string `json:"networkInterfaceId"`

	/* 以太网地址 (Optional) */
	MacAddress string `json:"macAddress"`

	/* 虚拟网络ID (Optional) */
	VpcId string `json:"vpcId"`

	/* 描述 (Optional) */
	Description string `json:"description"`

	/* 安全组列表 (Optional) */
	SecurityGroups []SecurityGroupSimple `json:"securityGroups"`

	/* 源和目标IP地址校验,取值为0或者1 (Optional) */
	SanityCheck bool `json:"sanityCheck"`

	/* 网卡主IP (Optional) */
	PrimaryIp NetworkInterfacePrivateIp `json:"primaryIp"`

	/* null (Optional) */
	SecondaryIps []NetworkInterfacePrivateIp `json:"secondaryIps"`
}

type InstanceNetworkInterfaceAttachment

type InstanceNetworkInterfaceAttachment struct {

	/* 指明删除实例时是否删除网卡 (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 设备Index (Optional) */
	DeviceIndex int `json:"deviceIndex"`

	/* 绑定状态 (Optional) */
	AttachStatus string `json:"attachStatus"`

	/* 绑定时间 (Optional) */
	AttachTime string `json:"attachTime"`

	/* 弹性网卡信息 (Optional) */
	NetworkInterface InstanceNetworkInterface `json:"networkInterface"`
}

type LogConfiguration

type LogConfiguration struct {

	/* 日志Driver名称  default:默认在本地分配10MB的存储空间,自动rotate (Optional) */
	LogDriver *string `json:"logDriver"`

	/* 日志Driver的配置选项 (Optional) */
	Options *LogOption `json:"options"`
}

type LogOption

type LogOption struct {

	/* null (Optional) */
	Key *string `json:"key"`

	/* null (Optional) */
	Value *string `json:"value"`
}

type NetworkInterfacePrivateIp

type NetworkInterfacePrivateIp struct {

	/* 私有IP的IPV4地址 (Optional) */
	PrivateIpAddress string `json:"privateIpAddress"`

	/* 私有IP的IPV4地址 (Optional) */
	ElasticIpId string `json:"elasticIpId"`

	/* 弹性IP实例地址 (Optional) */
	ElasticIpAddress string `json:"elasticIpAddress"`
}

type NetworkInterfaceSpec

type NetworkInterfaceSpec struct {

	/* 子网ID  */
	SubnetId string `json:"subnetId"`

	/* 可用区,用户的默认可用区  */
	Az string `json:"az"`

	/* 网卡主IP (Optional) */
	PrimaryIpAddress *string `json:"primaryIpAddress"`

	/* SecondaryIp列表 (Optional) */
	SecondaryIpAddresses []string `json:"secondaryIpAddresses"`

	/* 自动分配的SecondaryIp数量 (Optional) */
	SecondaryIpCount *int `json:"secondaryIpCount"`

	/* 安全组ID列表 (Optional) */
	SecurityGroups []string `json:"securityGroups"`

	/* PortSecurity,取值为0或者1,默认为1 (Optional) */
	SanityCheck *bool `json:"sanityCheck"`

	/* 描述 (Optional) */
	Description *string `json:"description"`
}

type Quota

type Quota struct {

	/* 类型 (Optional) */
	ResourceType string `json:"resourceType"`

	/* 配额 (Optional) */
	Limit int `json:"limit"`

	/* 已使用的数目 (Optional) */
	Used int `json:"used"`
}

type Secret

type Secret struct {

	/* 机密数据名称 (Optional) */
	Name string `json:"name"`

	/* 私密数据的类型,目前仅支持如下类型:docker-registry:用来和docker registry认证的类型 (Optional) */
	Type string `json:"type"`

	/* 创建时间 (Optional) */
	CreatedAt string `json:"createdAt"`

	/* 机密的数据 (Optional) */
	Data DockerRegistryData `json:"data"`
}

type SecurityGroupSimple

type SecurityGroupSimple struct {

	/* 安全组ID (Optional) */
	GroupId string `json:"groupId"`

	/* 安全组名称 (Optional) */
	GroupName string `json:"groupName"`
}

type VolumeMount

type VolumeMount struct {

	/* 环境变量名称 (Optional) */
	Category string `json:"category"`

	/* 自动删除,删除容器时自动删除此volume (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 容器内的挂载目录 (Optional) */
	MountPath string `json:"mountPath"`

	/* 只读,默认false;只针对data volume有效,root volume为false (Optional) */
	ReadOnly bool `json:"readOnly"`

	/* 云硬盘规格 (Optional) */
	CloudDisk InstanceCloudDisk `json:"cloudDisk"`

	/* 指定volume文件系统类型,目前支持[xfs, ext4] (Optional) */
	FsType string `json:"fsType"`
}

type VolumeMountSpec

type VolumeMountSpec struct {

	/* 磁盘分类 cloud: 基于云硬盘的卷 root volume只能是cloud类型  */
	Category string `json:"category"`

	/* 自动删除,删除容器时自动删除此volume,默认为True;只支持磁盘是云硬盘的场景 (Optional) */
	AutoDelete *bool `json:"autoDelete"`

	/* 容器内的挂载目录;root volume不需要指定,挂载目录是(/);data volume必须指定;必须是绝对路径,不能包含(:) (Optional) */
	MountPath *string `json:"mountPath"`

	/* 只读,默认false;只针对data volume有效;root volume为false,也就是可读可写 (Optional) */
	ReadOnly *bool `json:"readOnly"`

	/* 云硬盘规格;随容器自动创建的云硬盘,不会对磁盘分区,只会格式化文件系统 (Optional) */
	CloudDiskSpec *disk.DiskSpec `json:"cloudDiskSpec"`

	/* 云硬盘ID;如果使用已有的云硬盘,必须指定partion和fsType (Optional) */
	CloudDiskId *string `json:"cloudDiskId"`

	/* 指定volume文件系统类型,目前支持[xfs, ext4];如果新创建的盘,不指定文件系统类型默认格式化成xfs (Optional) */
	FsType *string `json:"fsType"`

	/* 随容器自动创建的新盘,会自动格式化成指定的文件系统类型;挂载已有的盘,默认不会格式化,只会按照指定的fsType去挂载;如果希望格式化,必须设置此字段为true (Optional) */
	FormatVolume *bool `json:"formatVolume"`
}

Jump to

Keyboard shortcuts

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