response

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success          = "success"
	ParamInvalid     = "param_invalid"
	TokenInvalid     = "token_invalid"
	PermissionDenied = "permission_denied"
	UserNotFound     = "user_not_found"
	UserExists       = "user_already_exists"
	TaskNotFound     = "task_not_found"
)

Variables

This section is empty.

Functions

func MkResponse

func MkResponse(ctx *gin.Context, code int, msg string, data interface{})

Types

type CheckInstanceConnectableResponse added in v0.4.0

type CheckInstanceConnectableResponse struct {
	IsAllPass    bool                       `json:"is_all_pass"`
	InstanceList []*model.ConnectableResult `json:"instance_list"`
}

type CloudAccount

type CloudAccount struct {
	Id          string `json:"id"`
	AccountName string `json:"account_name"`
	AccountKey  string `json:"account"`
	Provider    string `json:"provider"`
	CreateAt    string `json:"create_at"`
	CreateBy    string `json:"create_by"`
}

type ClusterAuthResponse added in v0.7.0

type ClusterAuthResponse struct {
	AuthType    string `json:"auth_type"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	KeyPairName string `json:"key_pair_name"`
	PrivateKey  string `json:"private_key"`
}

type ClusterCountResponse

type ClusterCountResponse struct {
	ClusterNum int64 `json:"cluster_num"`
}

type ClusterTagsResponse added in v0.1.5

type ClusterTagsResponse struct {
	ClusterTags map[string]map[string]string `json:"cluster_tags"`
	Pager       Pager                        `json:"pager"`
}

type ClusterThumb

type ClusterThumb struct {
	ClusterId     string              `json:"cluster_id"`
	ClusterName   string              `json:"cluster_name"`
	InstanceCount int64               `json:"instance_count"`
	InstanceType  string              `json:"instance_type"`
	ChargeType    string              `json:"charge_type"`
	Provider      string              `json:"provider"`
	Account       string              `json:"account"`
	Usage         string              `json:"usage"`
	ExtendConfig  *types.ExtendConfig `json:"extend_config"`
	CreateAt      string              `json:"create_at"`
	CreateBy      string              `json:"create_by"`
	UpdateBy      string              `json:"update_by"`
	UpdateAt      string              `json:"update_at"`
}

type ClusterThumbWithTag added in v0.1.5

type ClusterThumbWithTag struct {
	ClusterId   string            `json:"cluster_id"`
	ClusterName string            `json:"cluster_name"`
	Provider    string            `json:"provider"`
	Tags        map[string]string `json:"tags"`
	CreateAt    string            `json:"create_at"`
	CreateBy    string            `json:"create_by"`
}

type CustomClusterInstance added in v0.4.0

type CustomClusterInstance struct {
	InstanceIp    string `json:"instance_ip"`
	LoginName     string `json:"login_name"`
	LoginPassword string `json:"login_password"`
}

type CustomClusterResponse added in v0.4.0

type CustomClusterResponse struct {
	ClusterName string `json:"name"`
	ClusterDesc string `json:"desc"`
	Provider    string `json:"provider"`
	AccountKey  string `json:"account_key"`
}

type CustomInstanceListResponse added in v0.4.0

type CustomInstanceListResponse struct {
	InstanceList []CustomClusterInstance `json:"instance_list"`
	Pager        Pager                   `json:"pager"`
}

type DataDisk

type DataDisk struct {
	DataDiskType string `json:"data_disk_type"`
	DataDiskSize int    `json:"data_disk_size"`
}

type EncryptCloudAccountInfo added in v0.1.5

type EncryptCloudAccountInfo struct {
	AccountName          string `json:"account_name"`
	AccountKey           string `json:"account_key"`
	AccountSecretEncrypt string `json:"account_secret_encrypt"`
	Provider             string `json:"provider"`
	Salt                 string `json:"salt"`
}

type InstanceCountResponse

type InstanceCountResponse struct {
	InstanceNum int64 `json:"instance_num"`
}

type InstanceDetail

type InstanceDetail struct {
	InstanceId    string         `json:"instance_id"`
	Provider      string         `json:"provider"`
	RegionId      string         `json:"region_id"`
	ImageId       string         `json:"image_id"`
	InstanceType  string         `json:"instance_type"`
	IpInner       string         `json:"ip_inner"`
	IpOuter       string         `json:"ip_outer"`
	CreateAt      string         `json:"create_at"`
	StorageConfig *StorageConfig `json:"storage_config"`
	NetworkConfig *NetworkConfig `json:"network_config"`
}

type InstanceListResponse

type InstanceListResponse struct {
	InstanceList []InstanceThumb `json:"instance_list"`
	Pager        Pager           `json:"pager"`
}

type InstanceResponse

type InstanceResponse struct {
	InstanceDetail
}

type InstanceStatResponse added in v0.1.2

type InstanceStatResponse struct {
	InstanceTypeDesc string `json:"instance_type_desc"`
	InstanceCount    int64  `json:"instance_count"`
}

type InstanceThumb

type InstanceThumb struct {
	InstanceId         string `json:"instance_id"`
	IpInner            string `json:"ip_inner"`
	IpOuter            string `json:"ip_outer"`
	Provider           string `json:"provider"`
	ClusterType        string `json:"cluster_type"`
	CreateAt           string `json:"create_at"`
	Status             string `json:"status"`
	StartupTime        int    `json:"startup_time"`
	ClusterName        string `json:"cluster_name"`
	InstanceType       string `json:"instance_type"`
	LoginName          string `json:"login_name"`
	LoginPassword      string `json:"login_password"`
	ChargeType         string `json:"charge_type"`
	ComputingPowerType string `json:"computing_power_type"`
}

type InstanceUsage

type InstanceUsage struct {
	Id           string `json:"id"`
	ClusterName  string `json:"cluster_name"`
	InstanceId   string `json:"instance_id"`
	StartupAt    string `json:"startup_at"`
	ShutdownAt   string `json:"shutdown_at"`
	StartupTime  int    `json:"startup_time"`
	InstanceType string `json:"instance_type"`
}

type InstanceUsageResponse

type InstanceUsageResponse struct {
	InstanceList []InstanceUsage `json:"instance_list"`
	Pager        Pager           `json:"pager"`
}

type KeyPair added in v0.7.0

type KeyPair struct {
	KeyId       string `json:"key_id"`
	KeyPairId   string `json:"key_pair_id"`
	KeyPairName string `json:"key_pair_name"`
}

type KeyPairInfo added in v0.7.0

type KeyPairInfo struct {
	KeyId       string `json:"key_id"`
	KeyPairId   string `json:"key_pair_id"`
	KeyPairName string `json:"key_pair_name"`
	PrivateKey  string `json:"private_key"`
	PublicKey   string `json:"public_key"`
	KeyType     string `json:"key_type"`
}

type KeyPairListResponse added in v0.7.0

type KeyPairListResponse struct {
	KeyPairList []KeyPair `json:"key_pair_list"`
	Pager       Pager     `json:"pager"`
}

type ListCloudAccountResponse

type ListCloudAccountResponse struct {
	CloudAccountList []CloudAccount `json:"account_list"`
	Pager            Pager          `json:"pager"`
}

type ListClustersResponse

type ListClustersResponse struct {
	ClusterList []ClusterThumb `json:"cluster_list"`
	Pager       Pager          `json:"pager"`
}

type ListClustersWithTagResponse added in v0.1.5

type ListClustersWithTagResponse struct {
	ClusterList []ClusterThumbWithTag `json:"cluster_list"`
	Pager       Pager                 `json:"pager"`
}

type ListOrgsResponse

type ListOrgsResponse struct {
	OrgList []OrgThumb `json:"org_list"`
}

type ListUsersResponse

type ListUsersResponse struct {
	UserList []UserThumb `json:"user_list"`
	Pager    Pager       `json:"pager"`
}

type NetworkConfig

type NetworkConfig struct {
	VpcName           string `json:"vpc_name"`
	SubnetIdName      string `json:"subnet_id_name"`
	SecurityGroupName string `json:"security_group_name"`
}

type OrgInfo added in v0.5.1

type OrgInfo struct {
	Id       int64  `json:"id"`
	OrgName  string `json:"org_name"`
	CreateAt string `json:"create_at"`
	UpdateAt string `json:"update_at"`
}

type OrgThumb

type OrgThumb struct {
	OrgId   string `json:"org_id"`
	OrgName string `json:"org_name"`
	UserNum string `json:"user_num"`
}

type Pager

type Pager struct {
	NextMarker string `json:"next_marker"`
	PageNumber int    `json:"page_number"`
	PageSize   int    `json:"page_size"`
	Total      int    `json:"total"`
}

type StorageConfig

type StorageConfig struct {
	SystemDiskType string     `json:"system_disk_type"`
	SystemDiskSize int        `json:"system_disk_size"`
	DataDisks      []DataDisk `json:"data_disks"`
	DataDiskNum    int        `json:"data_disk_num"`
}

type TaskCountResponse

type TaskCountResponse struct {
	TaskNum int64 `json:"task_num"`
}

type TaskDetailListResponse

type TaskDetailListResponse struct {
	TaskList []*TaskDetailResponse `json:"task_list"`
	Pager    Pager                 `json:"pager"`
}

type TaskDetailResponse

type TaskDetailResponse struct {
	TaskId              string `json:"task_id"`
	TaskName            string `json:"task_name"`
	ClusterName         string `json:"cluster_name"`
	TaskStatus          string `json:"task_status"`
	TaskResult          string `json:"task_result"`
	TaskAction          string `json:"task_action"`
	FailReason          string `json:"fail_reason"`
	RunNum              int    `json:"run_num"`
	SuspendNum          int    `json:"suspend_num"`
	SuccessNum          int    `json:"success_num"`
	FailNum             int    `json:"fail_num"`
	TotalNum            int    `json:"total_num"`
	SuccessRate         string `json:"success_rate"`
	ExecuteTime         int    `json:"execute_time"`
	BeforeInstanceCount int    `json:"before_instance_count"`
	AfterInstanceCount  int    `json:"after_instance_count"`
	ExpectInstanceCount int    `json:"expect_instance_count"`
	CreateAt            string `json:"create_at"`
	CreateBy            string `json:"create_by"`
}

type TaskInstancesResponse

type TaskInstancesResponse struct {
	InstanceList []InstanceThumb `json:"instance_list"`
	Pager        Pager           `json:"pager"`
}

type TaskListResponse

type TaskListResponse struct {
	TaskList []TaskThumb `json:"task_list"`
	Pager    Pager       `json:"pager"`
}

type TaskThumb

type TaskThumb struct {
	TaskId      string `json:"task_id"`
	TaskName    string `json:"task_name"`
	TaskAction  string `json:"task_action"`
	Status      string `json:"status"`
	ClusterName string `json:"cluster_name"`
	CreateAt    string `json:"create_at"`
	ExecuteTime int    `json:"execute_time"`
	FinishAt    string `json:"finish_at"`
}

type UserInfo

type UserInfo struct {
	UserId   int64  `json:"user_id"`
	Username string `json:"username"`
	UserType string `json:"user_type"`
	OrgId    int64  `json:"org_id"`
	CreateAt string `json:"create_at"`
}

type UserThumb

type UserThumb struct {
	UserId     string `json:"user_id"`
	UserName   string `json:"user_name"`
	CreateAt   string `json:"create_at"`
	CreateBy   string `json:"create_by"`
	UserStatus string `json:"user_status"`
	UserType   string `json:"user_type"`
}

Jump to

Keyboard shortcuts

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