Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(c *golangsdk.ServiceClient, resourceName string, opts ResourceLocatedOpts) *golangsdk.ErrResult
Delete is a method to remove resource package from the specified group.
Types ¶
type CreateGroupAndUploadOpts ¶
type CreateGroupAndUploadOpts struct { // List of OBS object paths. The OBS object path refers to the OBS object URL. Paths []string `json:"paths" required:"true"` // File type of a package group. // jar: JAR file // pyFile: User Python file // file: User file // modelFile: User AI model file // NOTE: If the same group of packages to be uploaded contains different file types, select file as the type of the // file to be uploaded. Kind string `json:"kind" required:"true"` // Name of the group to be created. Group string `json:"group" required:"true"` // Whether to upload resource packages in asynchronous mode. // The default value is false, indicating that the asynchronous mode is not used. // You are advised to upload resource packages in asynchronous mode. IsAsync bool `json:"is_async,omitempty"` // Resource tag. Tags []tags.ResourceTag `json:"tags,omitempty"` }
CreateGroupAndUploadOpts is a structure which allows to create a new resource group and upload package file to the group using given parameters.
type Detail ¶
type Detail struct { // UNIX time when a resource package is uploaded. The timestamp is expressed in milliseconds. CreateTime int `json:"create_time" required:"true"` // UNIX time when the uploaded resource package is uploaded. The timestamp is expressed in milliseconds. UpdateTime int `json:"update_time"` // Resource type. ResourceType string `json:"resource_type" required:"true"` // Resource name. ResourceName string `json:"resource_name"` // Value UPLOADING indicates that the resource package group is being uploaded. // Value READY indicates that the resource package has been uploaded. // Value FAILED indicates that the resource package fails to be uploaded. Status string `json:"status"` // Name of the resource packages in a queue. UnderlyingName string `json:"underlying_name"` // Whether to upload resource packages in asynchronous mode. // The default value is false, indicating that the asynchronous mode is not used. // You are advised to upload resource packages in asynchronous mode. IsAsync bool `json:"is_async"` }
Group is a object that represents the detail about a group resource package.
type Group ¶
type Group struct { // Module name. GroupName string `json:"group_name"` // Status of a package group to be uploaded. Status string `json:"status"` // List of names of resource packages contained in the group. Resources []string `json:"resources"` // Details about a group resource package. Details []Detail `json:"details"` // UNIX timestamp when a package group is uploaded. CreateTime int `json:"create_time"` // UNIX timestamp when a package group is updated. UpdateTime int `json:"update_time"` // Whether to upload resource packages in asynchronous mode. // The default value is false, indicating that the asynchronous mode is not used. // You are advised to upload resource packages in asynchronous mode. IsAsync bool `json:"is_async"` // Owner of a resource package. Owner string `json:"owner"` // The description, moduleName and moduleType are supported by function response of specified file upload. // Description of a resource module. Description string `json:"description"` // Name of a resource module. ModuleName string `json:"module_name"` // Type of a resource module. // jar: User JAR file // pyFile: User Python file // file: User file ModuleType string `json:"module_type"` }
Group is a object that represents the group create or group list operations.
func CreateGroupAndUpload ¶
func CreateGroupAndUpload(c *golangsdk.ServiceClient, opts CreateGroupAndUploadOpts) (*Group, error)
CreateGroupAndUpload is a method to create a new resource group and upload package from the specified OBS bucket.
type ListOpts ¶
type ListOpts struct { // Specifies the file type. Kind string `q:"kind"` // Specifies a label for filtering. Tags string `q:"tags"` }
ListOpts is a structure which allows to obtain resources groups using given parameters.
type ListResp ¶
type ListResp struct { // List of names, type and other informations of uploaded user resources. Resources []Resource `json:"resources"` // List of built-in resource groups. For details about the groups, see Table 5. Modules []Module `json:"modules"` // Uploaded package groups of a user. Groups []Group `json:"groups"` // Total number of returned resource packages. Total int `json:"total" required:"true"` }
ListResp is a object that represents the List method result.
type Module ¶
type Module struct { // Module name. ModuleName string `json:"module_name"` // Module type. ModuleType string `json:"module_type"` // Value UPLOADING indicates that the package group is being uploaded. // Value READY indicates that the package group has been uploaded. // Value FAILED indicates that the package group fails to be uploaded. Status string `json:"status"` // List of names of resource packages contained in the group. Resources []string `json:"resources"` // Module description. Description string `json:"description"` // UNIX timestamp when a package group is uploaded. CreateTime int `json:"create_time"` // UNIX timestamp when a package group is updated. UpdateTime int `json:"update_time"` }
Module is a object that represents the built-in resource group.
type Resource ¶
type Resource struct { // UNIX timestamp when a resource package is uploaded. CreateTime int `json:"create_time"` // UNIX timestamp when the uploaded resource package is uploaded. UpdateTime int `json:"update_time"` // Resource type. ResourceType string `json:"resource_type"` // Resource name. ResourceName string `json:"resource_name"` // Value UPLOADING indicates that the resource package is being uploaded. // Value READY indicates that the resource package has been uploaded. // Value FAILED indicates that the resource package fails to be uploaded. Status string `json:"status"` // Name of the resource package in the queue. UnderlyingName string `json:"underlying_name"` // Owner of a resource package. Owner string `json:"owner"` }
Resource is a object that represents the names, type and other informations of uploaded user resources.
type ResourceLocatedOpts ¶
type ResourceLocatedOpts struct { // Name of the package group returned when the resource package is uploaded. Group string `q:"group" required:"true"` }
ResourceLocatedOpts is a structure which specify the resource package located.
type UpdateOpts ¶
type UpdateOpts struct { // New username. The name contains 5 to 32 characters, including only digits, letters, underscores (_), and // hyphens (-). It cannot start with a digit. NewOwner string `json:"new_owner,omitempty"` // Group name. The name contains a maximum of 64 characters. Only digits, letters, periods (.), underscores (_), // and hyphens (-) are allowed. GroupName string `json:"group_name,omitempty"` // Package name. The name can contain only digits, letters, underscores (_), exclamation marks (!), hyphens (-), // and periods (.), but cannot start with a period. // The length (including the file name extension) cannot exceed 128 characters. ResourceName string `json:"resource_name,omitempty"` }
UpdateOpts is a structure which allows to update package owner or group owner using given parameters.
type UpdateResp ¶
type UpdateResp struct { // Whether the request is successfully executed. Value true indicates that the request is successfully executed. IsSuccess bool `json:"is_success"` // System prompt. If execution succeeds, the parameter setting may be left blank. Message string `json:"message"` }
UpdateResp is a object that represents the update method result.
func UpdateOwner ¶
func UpdateOwner(c *golangsdk.ServiceClient, opts UpdateOpts) (*UpdateResp, error)
UpdateOwner is a method to update package owner or group owner.
type UploadOpts ¶
type UploadOpts struct { // List of OBS object paths. The OBS object path refers to the OBS object URL. Paths []string `json:"paths" required:"true"` // Name of a package group. Group string `json:"group" required:"true"` }
UploadOpts is a stucture which allows to upload resource package to the specified group using given parameters.