Documentation
¶
Index ¶
- Constants
- type Access
- type BOS
- type CDS
- type CFS
- type Client
- func (c *Client) CreateDevInstance(args *CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
- func (c *Client) CreateDevInstanceImagePackJob(args *CreateDevInstanceImagePackJobArgs) (*CreateDevInstanceImagePackJobResult, error)
- func (c *Client) DeleteDevInstance(args *DeleteDevInstanceArgs) (*DeleteDevInstanceResult, error)
- func (c *Client) DevInstanceImagePackJobDetail(args *DevInstanceImagePackJobDetailArgs) (*DevInstanceImagePackJobDetailResult, error)
- func (c *Client) GetBceClient() *bce.BceClient
- func (c *Client) ListDevInstance(args *ListDevInstanceArgs) (*ListDevInstanceResult, error)
- func (c *Client) ListDevInstanceEvent(args *ListDevInstanceEventArgs) (*ListDevInstanceEventResult, error)
- func (c *Client) QueryDevInstanceDetail(args *QueryDevInstanceDetailArgs) (*QueryDevInstanceDetailResult, error)
- func (c *Client) SetBceClient(client *bce.BceClient)
- func (c *Client) StartDevInstance(args *StartDevInstanceArgs) (*StartDevInstanceResult, error)
- func (c *Client) StopDevInstance(args *StopDevInstanceArgs) (*StopDevInstanceResult, error)
- func (c *Client) TimedStopDevInstance(args *TimedStopDevInstanceArgs) (*TimedStopDevInstanceResult, error)
- func (c *Client) UpdateDevInstance(args *CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
- type CommonResp
- type CreateDevInstanceArgs
- type CreateDevInstanceImagePackJobArgs
- type CreateDevInstanceImagePackJobResult
- type CreateDevInstanceResult
- type Dataset
- type DatasetPFS
- type DeleteDevInstanceArgs
- type DeleteDevInstanceResult
- type DevInstanceBrief
- type DevInstanceConf
- type DevInstanceDetail
- type DevInstanceImagePackJobDetailArgs
- type DevInstanceImagePackJobDetailResult
- type Event
- type Image
- type ImagePackJobDetail
- type Interface
- type ListDevInstanceArgs
- type ListDevInstanceEventArgs
- type ListDevInstanceEventResult
- type ListDevInstanceResult
- type LoginInfo
- type Notify
- type PFS
- type PortInfo
- type QueryDevInstanceDetailArgs
- type QueryDevInstanceDetailResult
- type ResourcePool
- type Resources
- type ScheduleConf
- type ServiceInstanceInfo
- type StartDevInstanceArgs
- type StartDevInstanceResult
- type StopDevInstanceArgs
- type StopDevInstanceResult
- type TimedStopDevInstanceArgs
- type TimedStopDevInstanceDetail
- type TimedStopDevInstanceResult
- type Url
- type VisibleScope
- type VolumnConf
Constants ¶
View Source
const ( DefaultVersion = "v2" DefaultUrl = "/" ApiCreateDevInstance = "CreateDevInstance" ApiDescribeDevInstance = "DescribeDevInstance" ApiDescribeDevInstances = "DescribeDevInstances" ApiModifyDevInstance = "ModifyDevInstance" ApiStartDevInstance = "StartDevInstance" ApiStopDevInstance = "StopDevInstance" ApiDeleteDevInstance = "DeleteDevInstance" ApiTimedStopDevInstance = "TimedStopDevInstance" ApiDescribeDevInstanceEvents = "DescribeDevInstanceEvents" ApiCreateDevInstanceImagePackJob = "CreateDevInstanceImagePackJob" ApiDescribeDevInstanceImagePackJob = "DescribeDevInstanceImagePackJob" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClientWithSTS ¶
NewClientWithSTS make the aihc dev client with STS configuration.
func (*Client) CreateDevInstance ¶
func (c *Client) CreateDevInstance(args *CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
CreateDevInstance 创建开发机实例
func (*Client) CreateDevInstanceImagePackJob ¶
func (c *Client) CreateDevInstanceImagePackJob(args *CreateDevInstanceImagePackJobArgs) (*CreateDevInstanceImagePackJobResult, error)
CreateDevInstanceImagePackJob 创建镜像任务
func (*Client) DeleteDevInstance ¶
func (c *Client) DeleteDevInstance(args *DeleteDevInstanceArgs) (*DeleteDevInstanceResult, error)
DeleteDevInstance 删除开发机
func (*Client) DevInstanceImagePackJobDetail ¶
func (c *Client) DevInstanceImagePackJobDetail(args *DevInstanceImagePackJobDetailArgs) (*DevInstanceImagePackJobDetailResult, error)
DevInstanceImagePackJobDetail 查询镜像任务详情
func (*Client) GetBceClient ¶
func (*Client) ListDevInstance ¶
func (c *Client) ListDevInstance(args *ListDevInstanceArgs) (*ListDevInstanceResult, error)
ListDevInstance 查询开发机列表
func (*Client) ListDevInstanceEvent ¶
func (c *Client) ListDevInstanceEvent(args *ListDevInstanceEventArgs) (*ListDevInstanceEventResult, error)
ListDevInstanceEvent 查询开发机事件
func (*Client) QueryDevInstanceDetail ¶
func (c *Client) QueryDevInstanceDetail(args *QueryDevInstanceDetailArgs) (*QueryDevInstanceDetailResult, error)
QueryDevInstanceDetail 查询开发机详情
func (*Client) SetBceClient ¶
func (*Client) StartDevInstance ¶
func (c *Client) StartDevInstance(args *StartDevInstanceArgs) (*StartDevInstanceResult, error)
StartDevInstance 启动开发机实例
func (*Client) StopDevInstance ¶
func (c *Client) StopDevInstance(args *StopDevInstanceArgs) (*StopDevInstanceResult, error)
StopDevInstance 停止开发机实例
func (*Client) TimedStopDevInstance ¶
func (c *Client) TimedStopDevInstance(args *TimedStopDevInstanceArgs) (*TimedStopDevInstanceResult, error)
TimedStopDevInstance 定时停止开发机
func (*Client) UpdateDevInstance ¶
func (c *Client) UpdateDevInstance(args *CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
UpdateDevInstance 更新开发机配置
type CommonResp ¶ added in v0.9.267
CommonResp 包装 OpenAPI 错误字段;嵌入到 Result 中以便统一探测 HTTP 200 中的业务错误
type CreateDevInstanceArgs ¶
type CreateDevInstanceArgs struct {
Name string `json:"name" validate:"required"`
Id string `json:"id"`
Conf *DevInstanceConf `json:"conf" validate:"required"`
VisibleScope *VisibleScope `json:"visibleScope"`
Notify *Notify `json:"notify"`
IsPublicMgmt bool `json:"isPublicMgmt"`
Creator string `json:"creator" validate:"required"`
CreatorID string `json:"creatorId" validate:"required"`
}
type CreateDevInstanceImagePackJobArgs ¶
type CreateDevInstanceImagePackJobArgs struct {
ImageName string `json:"imageName" validate:"required"`
ImageTag string `json:"imageTag" validate:"required"`
Registry string `json:"registry" validate:"required"`
Namespace string `json:"namespace" validate:"required"`
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required"`
DevInstanceID string `json:"devInstanceId" validate:"required"`
}
type CreateDevInstanceImagePackJobResult ¶
type CreateDevInstanceImagePackJobResult struct {
CommonResp
ImagePackJobId string `json:"imagePackJobId"`
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
type CreateDevInstanceResult ¶
type CreateDevInstanceResult struct {
CommonResp
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
func CreateDevInstance ¶
func UpdateDevInstance ¶
type Dataset ¶
type Dataset struct {
DatasetID string `json:"datasetId"`
VersionID string `json:"versionId"`
StorageType string `json:"storageType"`
PFS *DatasetPFS `json:"pfs"`
DefaultMountPath string `json:"defaultMountPath"`
}
type DatasetPFS ¶
type DatasetPFS struct {
ClientID string `json:"clientID"`
InstanceType string `json:"instanceType"`
Region string `json:"region"`
InstanceID string `json:"instanceId"`
ClusterIP string `json:"clusterIP"`
MountTargetID []string `json:"mountTargetId"`
HostMountPath string `json:"hostMountPath"`
SrcPath string `json:"srcPath"`
}
type DeleteDevInstanceArgs ¶
type DeleteDevInstanceArgs struct {
DevInstanceId string `json:"devInstanceId"`
}
type DeleteDevInstanceResult ¶
type DeleteDevInstanceResult struct {
CommonResp
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
func DeleteDevInstance ¶
func DeleteDevInstance(cli bce.Client, args *DeleteDevInstanceArgs) (*DeleteDevInstanceResult, error)
type DevInstanceBrief ¶
type DevInstanceBrief struct {
Name string `json:"name"`
ID string `json:"id"`
ResourcePoolId string `json:"resourcePoolId"`
ResourcePoolName string `json:"resourcePoolName"`
QueueName string `json:"queueName"`
ImageURL string `json:"imageUrl"`
Resources *Resources `json:"resources"`
AccountId string `json:"accountId"`
Creator string `json:"creator"`
CreatorID string `json:"creatorId"`
Region string `json:"region"`
Version string `json:"version"`
Status int32 `json:"status"`
StatusReason string `json:"statusReason"`
CreatedAt int32 `json:"createdAt"`
UpdatedAt int32 `json:"updatedAt"`
}
type DevInstanceConf ¶
type DevInstanceConf struct {
ResourcePool *ResourcePool `json:"resourcePool" validate:"required"`
Resources *Resources `json:"resources" validate:"required"`
Image *Image `json:"image" validate:"required"`
Access *Access `json:"access"`
ScheduleConf *ScheduleConf `json:"scheduleConf"`
WorkspaceDir string `json:"workspaceDir"`
Envs map[string]string `json:"envs"`
StartCmd string `json:"startCmd"`
VolumnConfs []*VolumnConf `json:"volumnConfs" validate:"required"`
UpdatedAt int32 `json:"updatedAt"`
}
type DevInstanceDetail ¶
type DevInstanceDetail struct {
Name string `json:"name"`
ID string `json:"id"`
Conf *DevInstanceConf `json:"conf"`
ServiceInstanceInfo *ServiceInstanceInfo `json:"serviceInstanceInfo"`
LoginInfo *LoginInfo `json:"loginInfo"`
Notify *Notify `json:"notify"`
VisibleScope *VisibleScope `json:"visibleScope"`
TimedStopDevInstance *TimedStopDevInstanceDetail `json:"timedStopDevInstance"`
IsPublicMgmt bool `json:"isPublicMgmt"`
AccountId string `json:"accountId"`
Creator string `json:"creator"`
CreatorID string `json:"creatorId"`
Region string `json:"region"`
Version string `json:"version"`
Status int32 `json:"status"`
StatusReason string `json:"statusReason"`
CreatedAt int32 `json:"createdAt"`
UpdatedAt int32 `json:"updatedAt"`
}
type DevInstanceImagePackJobDetailResult ¶
type DevInstanceImagePackJobDetailResult struct {
CommonResp
ImagePackJobDetail ImagePackJobDetail `json:"devInstanceImagePackJob"`
RequestId string `json:"requestId"`
}
func DevInstanceImagePackJobDetail ¶
func DevInstanceImagePackJobDetail(cli bce.Client, args *DevInstanceImagePackJobDetailArgs) (*DevInstanceImagePackJobDetailResult, error)
type Event ¶
type Event struct {
Reason string `json:"reason"` // 原因
Message string `json:"message"` // 详细信息
FirstTimestamp int32 `json:"firstTimestamp"` // 首次出现时间(建议使用time.Time类型)
LastTimestamp int32 `json:"lastTimestamp"` // 最后出现时间(建议使用time.Time类型)
Count int32 `json:"count"` // 出现次数
Type string `json:"type"` // 事件类型
}
type ImagePackJobDetail ¶
type ImagePackJobDetail struct {
Id string `json:"id"`
DevInstanceId string `json:"devInstanceId"`
ImageName string `json:"imageName"`
ImageTag string `json:"imageTag"`
Registry string `json:"registry"`
Namespace string `json:"namespace"`
Status int32 `json:"status"`
CreatedAt int32 `json:"createdAt"`
UpdatedAt int32 `json:"updatedAt"`
}
type Interface ¶
type Interface interface {
CreateDevInstance(*CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
ListDevInstance(*ListDevInstanceArgs) (*ListDevInstanceResult, error)
QueryDevInstanceDetail(*QueryDevInstanceDetailArgs) (*QueryDevInstanceDetailResult, error)
UpdateDevInstance(*CreateDevInstanceArgs) (*CreateDevInstanceResult, error)
StartDevInstance(*StartDevInstanceArgs) (*StartDevInstanceResult, error)
StopDevInstance(*StopDevInstanceArgs) (*StopDevInstanceResult, error)
DeleteDevInstance(*DeleteDevInstanceArgs) (*DeleteDevInstanceResult, error)
TimedStopDevInstance(*TimedStopDevInstanceArgs) (*TimedStopDevInstanceResult, error)
CreateDevInstanceImagePackJob(*CreateDevInstanceImagePackJobArgs) (*CreateDevInstanceImagePackJobResult, error)
DevInstanceImagePackJobDetail(*DevInstanceImagePackJobDetailArgs) (*DevInstanceImagePackJobDetailResult, error)
ListDevInstanceEvent(*ListDevInstanceEventArgs) (*ListDevInstanceEventResult, error)
}
type ListDevInstanceArgs ¶
type ListDevInstanceArgs struct {
QueryKey string `json:"queryKey"`
QueryVal string `json:"queryVal"`
ResourcePoolId string `json:"resourcePoolID"`
QueueName string `json:"queueName"`
OnlyMyDevs bool `json:"onlyMyDevs"`
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
Status string `json:"status"`
OrderBy string `json:"orderBy"`
Order string `json:"order"`
}
type ListDevInstanceEventResult ¶
type ListDevInstanceEventResult struct {
CommonResp
Events []*Event `json:"events"`
TotalCount int32 `json:"totalCount"`
RequestId string `json:"requestId"`
}
func ListDevInstanceEvent ¶
func ListDevInstanceEvent(cli bce.Client, args *ListDevInstanceEventArgs) (*ListDevInstanceEventResult, error)
type ListDevInstanceResult ¶
type ListDevInstanceResult struct {
CommonResp
DevInstances []*DevInstanceBrief `json:"devInstances"`
TotalCount int32 `json:"totalCount"`
RequestId string `json:"requestId"`
}
func ListDevInstance ¶
func ListDevInstance(cli bce.Client, args *ListDevInstanceArgs) (*ListDevInstanceResult, error)
type QueryDevInstanceDetailArgs ¶
type QueryDevInstanceDetailArgs struct {
DevInstanceId string `json:"devInstanceId"`
}
type QueryDevInstanceDetailResult ¶
type QueryDevInstanceDetailResult struct {
CommonResp
DevInstance DevInstanceDetail `json:"devInstance"`
RequestId string `json:"requestId"`
}
func QueryDevInstanceDetail ¶
func QueryDevInstanceDetail(cli bce.Client, args *QueryDevInstanceDetailArgs) (*QueryDevInstanceDetailResult, error)
type ResourcePool ¶
type ScheduleConf ¶
type ServiceInstanceInfo ¶
type StartDevInstanceArgs ¶
type StartDevInstanceArgs struct {
DevInstanceId string `json:"devInstanceId"`
}
type StartDevInstanceResult ¶
type StartDevInstanceResult struct {
CommonResp
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
func StartDevInstance ¶
func StartDevInstance(cli bce.Client, args *StartDevInstanceArgs) (*StartDevInstanceResult, error)
type StopDevInstanceArgs ¶
type StopDevInstanceArgs struct {
DevInstanceId string `json:"devInstanceId"`
}
type StopDevInstanceResult ¶
type StopDevInstanceResult struct {
CommonResp
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
func StopDevInstance ¶
func StopDevInstance(cli bce.Client, args *StopDevInstanceArgs) (*StopDevInstanceResult, error)
type TimedStopDevInstanceResult ¶
type TimedStopDevInstanceResult struct {
CommonResp
DevInstanceId string `json:"devInstanceId"`
RequestId string `json:"requestId"`
}
func TimedStopDevInstance ¶
type VisibleScope ¶
type VisibleScope struct {
Type int32 `json:"type"`
}
type VolumnConf ¶
Click to show internal directories.
Click to hide internal directories.