|
@@ -1,48 +1,203 @@
|
|
|
package storage
|
|
package storage
|
|
|
|
|
|
|
|
-import "time"
|
|
|
|
|
|
|
+type AddSpaceRequest struct {
|
|
|
|
|
+ // 可选参数
|
|
|
|
|
+ Option *AddSpaceRequestOption `json:"option,omitempty"`
|
|
|
|
|
+ // 用户id
|
|
|
|
|
+ UnionId *string `json:"unionId,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddSpaceRequestOption struct {
|
|
|
|
|
+ // 空间能力项, 默认表示不设置拓展能力项
|
|
|
|
|
+ Capabilities *AddSpaceRequestOptionCapabilities `json:"capabilities,omitempty"`
|
|
|
|
|
+ // 空间名称,默认无空间名称
|
|
|
|
|
+ Name *string `json:"name,omitempty"`
|
|
|
|
|
+ // owner类型, 空间Owner可以是用户或应用
|
|
|
|
|
+ // 如果是应用类型,需要单独授权
|
|
|
|
|
+ // 枚举值:
|
|
|
|
|
+ // USER: 用户类型
|
|
|
|
|
+ // APP: App类型
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // USER
|
|
|
|
|
+ OwnerType *string `json:"ownerType,omitempty"`
|
|
|
|
|
+ // 空间能使用最大容量, 默认表示无最大容量
|
|
|
|
|
+ Quota *int64 `json:"quota,omitempty"`
|
|
|
|
|
+ // 空间场景,详见 Space.scene 字段. 不指定默认值是default
|
|
|
|
|
+ // 只能由数字和字母组成
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // default
|
|
|
|
|
+ Scene *string `json:"scene,omitempty"`
|
|
|
|
|
+ // 空间场景Id,详见 Space.sceneId 字段. 不指定默认值是0
|
|
|
|
|
+ // 只能由数字和字母组成
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // 0
|
|
|
|
|
+ SceneId *string `json:"sceneId,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddSpaceRequestOptionCapabilities struct {
|
|
|
|
|
+ // 是否进最近使用, 默认不支持
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // false
|
|
|
|
|
+ CanRecordRecentFile *bool `json:"canRecordRecentFile,omitempty"`
|
|
|
|
|
+ // 是否支持重命名空间名称, 默认不支持
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // false
|
|
|
|
|
+ CanRename *bool `json:"canRename,omitempty"`
|
|
|
|
|
+ // 是否支持搜索, 默认不支持
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // false
|
|
|
|
|
+ CanSearch *bool `json:"canSearch,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddPermissionRequestOption struct {
|
|
|
|
|
+ // 有效时间(秒)
|
|
|
|
|
+ // 最大值:
|
|
|
|
|
+ // 3600
|
|
|
|
|
+ Duration *int64 `json:"duration,omitempty" xml:"duration,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddPermissionRequestMembers struct {
|
|
|
|
|
+ // 权限归属的企业
|
|
|
|
|
+ // 如果存在企业id, 对应member离职的时候会自动清理权限
|
|
|
|
|
+ // 如果memberType是dept类型,必须要有企业id
|
|
|
|
|
+ CorpId *string `json:"corpId,omitempty" xml:"corpId,omitempty"`
|
|
|
|
|
+ // 权限成员id
|
|
|
|
|
+ Id *string `json:"id,omitempty" xml:"id,omitempty"`
|
|
|
|
|
+ // 权限成员类型
|
|
|
|
|
+ // 枚举值:
|
|
|
|
|
+ // ORG: 企业
|
|
|
|
|
+ // DEPT: 部门
|
|
|
|
|
+ // TAG: 自定义tag
|
|
|
|
|
+ // CONVERSATION: 会话
|
|
|
|
|
+ // GG: 通用组
|
|
|
|
|
+ // USER: 用户
|
|
|
|
|
+ // ALL_USERS: 所有用户
|
|
|
|
|
+ Type *string `json:"type,omitempty" xml:"type,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddPermissionRequest struct {
|
|
|
|
|
+ // 权限成员列表
|
|
|
|
|
+ // 最大size:
|
|
|
|
|
+ // 30
|
|
|
|
|
+ Members []*AddPermissionRequestMembers `json:"members,omitempty" xml:"members,omitempty" type:"Repeated"`
|
|
|
|
|
+ // 可选参数
|
|
|
|
|
+ Option *AddPermissionRequestOption `json:"option,omitempty" xml:"option,omitempty" type:"Struct"`
|
|
|
|
|
+ // 权限角色id
|
|
|
|
|
+ RoleId *string `json:"roleId,omitempty" xml:"roleId,omitempty"`
|
|
|
|
|
+ // 用户id
|
|
|
|
|
+ UnionId *string `json:"unionId,omitempty" xml:"unionId,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type AddPermissionResponse struct {
|
|
|
|
|
+ Success bool `json:"success"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type GetFileUploadInfoRequestOptionPreCheckParam struct {
|
|
|
|
|
+ Md5 *string `json:"md5,omitempty" xml:"md5,omitempty"`
|
|
|
|
|
+ Name *string `json:"name,omitempty" xml:"name,omitempty"`
|
|
|
|
|
+ ParentId *string `json:"parentId,omitempty" xml:"parentId,omitempty"`
|
|
|
|
|
+ Size *int64 `json:"size,omitempty" xml:"size,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type GetFileUploadInfoRequestOption struct {
|
|
|
|
|
+ PreCheckParam *GetFileUploadInfoRequestOptionPreCheckParam `json:"preCheckParam,omitempty" xml:"preCheckParam,omitempty" type:"Struct"`
|
|
|
|
|
+ PreferIntranet *bool `json:"preferIntranet,omitempty" xml:"preferIntranet,omitempty"`
|
|
|
|
|
+ PreferRegion *string `json:"preferRegion,omitempty" xml:"preferRegion,omitempty"`
|
|
|
|
|
+ StorageDriver *string `json:"storageDriver,omitempty" xml:"storageDriver,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type GetFileUploadInfoRequest struct {
|
|
|
|
|
+ Multipart *bool `json:"multipart,omitempty" `
|
|
|
|
|
+ Option *GetFileUploadInfoRequestOption `json:"option,omitempty"`
|
|
|
|
|
+ Protocol *string `json:"protocol,omitempty" `
|
|
|
|
|
+ UnionId *string `json:"unionId,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
type QueryFileUploadInfoResponse struct {
|
|
type QueryFileUploadInfoResponse struct {
|
|
|
UploadKey string `json:"uploadKey"`
|
|
UploadKey string `json:"uploadKey"`
|
|
|
StorageDriver string `json:"storageDriver"`
|
|
StorageDriver string `json:"storageDriver"`
|
|
|
Protocol string `json:"protocol"`
|
|
Protocol string `json:"protocol"`
|
|
|
HeaderSignatureInfo struct {
|
|
HeaderSignatureInfo struct {
|
|
|
- ResourceUrls []string `json:"resourceUrls"`
|
|
|
|
|
- Headers struct {
|
|
|
|
|
- Key string `json:"key"`
|
|
|
|
|
- } `json:"headers"`
|
|
|
|
|
- ExpirationSeconds int `json:"expirationSeconds"`
|
|
|
|
|
- Region string `json:"region"`
|
|
|
|
|
- InternalResourceUrls []string `json:"internalResourceUrls"`
|
|
|
|
|
|
|
+ ResourceUrls []string `json:"resourceUrls"`
|
|
|
|
|
+ Headers map[string]string `json:"headers"`
|
|
|
|
|
+ ExpirationSeconds int `json:"expirationSeconds"`
|
|
|
|
|
+ Region string `json:"region"`
|
|
|
|
|
+ InternalResourceUrls []string `json:"internalResourceUrls"`
|
|
|
} `json:"headerSignatureInfo"`
|
|
} `json:"headerSignatureInfo"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+type CommitFileRequestOptionAppProperties struct {
|
|
|
|
|
+ // 属性名称 该属性名称在当前app下需要保证唯一,不同app间同名属性互不影响
|
|
|
|
|
+ Name *string `json:"name,omitempty" xml:"name,omitempty"`
|
|
|
|
|
+ // 属性值
|
|
|
|
|
+ Value *string `json:"value,omitempty" xml:"value,omitempty"`
|
|
|
|
|
+ // 属性可见范围
|
|
|
|
|
+ // 枚举值:
|
|
|
|
|
+ // PUBLIC: 该属性所有App可见
|
|
|
|
|
+ // PRIVATE: 该属性仅其归属App可见
|
|
|
|
|
+ Visibility *string `json:"visibility,omitempty" xml:"visibility,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type CommitFileRequestOption struct {
|
|
|
|
|
+ // 文件在应用上的属性, 一个应用最多只能设置3个属性
|
|
|
|
|
+ AppProperties []*CommitFileRequestOptionAppProperties `json:"appProperties,omitempty" xml:"appProperties,omitempty" type:"Repeated"`
|
|
|
|
|
+ // 文件名称冲突策略
|
|
|
|
|
+ // 枚举值:
|
|
|
|
|
+ // AUTO_RENAME: 自动重命名
|
|
|
|
|
+ // OVERWRITE: 覆盖
|
|
|
|
|
+ // RETURN_DENTRY_IF_EXISTS: 返回已存在文件
|
|
|
|
|
+ // RETURN_ERROR_IF_EXISTS: 文件已存在时报错
|
|
|
|
|
+ // 默认值:
|
|
|
|
|
+ // AUTO_RENAME
|
|
|
|
|
+ ConflictStrategy *string `json:"conflictStrategy,omitempty" xml:"conflictStrategy,omitempty"`
|
|
|
|
|
+ // 默认文件大小, 单位:Byte
|
|
|
|
|
+ // 如果此字段不为空,企业存储系统会校验文件实际大小是否和此字段是否一致,不一致会报错
|
|
|
|
|
+ Size *int64 `json:"size,omitempty" xml:"size,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type CommitFileRequest struct {
|
|
|
|
|
+ // 名称(文件名+后缀), 规则:
|
|
|
|
|
+ // 1. 头尾不能包含空格,否则会自动去除
|
|
|
|
|
+ // 2. 不能包含特殊字符,包括:制表符、*、"、<、>、|
|
|
|
|
|
+ // 3. 不能以"."结尾
|
|
|
|
|
+ Name *string `json:"name,omitempty" xml:"name,omitempty"`
|
|
|
|
|
+ // 可选参数
|
|
|
|
|
+ Option *CommitFileRequestOption `json:"option,omitempty" xml:"option,omitempty" type:"Struct"`
|
|
|
|
|
+ // 父目录id, 根目录id值为0
|
|
|
|
|
+ ParentId *string `json:"parentId,omitempty" xml:"parentId,omitempty"`
|
|
|
|
|
+ // 添加文件唯一标识,可通过DentryService.getUploadInfo来生成
|
|
|
|
|
+ UploadKey *string `json:"uploadKey,omitempty" xml:"uploadKey,omitempty"`
|
|
|
|
|
+ // 用户id
|
|
|
|
|
+ UnionId *string `json:"unionId,omitempty" xml:"unionId,omitempty"`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
type CommitFileResponse struct {
|
|
type CommitFileResponse struct {
|
|
|
Dentry struct {
|
|
Dentry struct {
|
|
|
- Id string `json:"id"`
|
|
|
|
|
- SpaceId string `json:"spaceId"`
|
|
|
|
|
- ParentId string `json:"parentId"`
|
|
|
|
|
- Type string `json:"type"`
|
|
|
|
|
- Name string `json:"name"`
|
|
|
|
|
- Size int `json:"size"`
|
|
|
|
|
- Path string `json:"path"`
|
|
|
|
|
- Version int `json:"version"`
|
|
|
|
|
- Status string `json:"status"`
|
|
|
|
|
- Extension string `json:"extension"`
|
|
|
|
|
- CreatorId string `json:"creatorId"`
|
|
|
|
|
- ModifierId string `json:"modifierId"`
|
|
|
|
|
- CreateTime time.Time `json:"createTime"`
|
|
|
|
|
- ModifiedTime time.Time `json:"modifiedTime"`
|
|
|
|
|
- Properties struct {
|
|
|
|
|
- ReadOnly bool `json:"readOnly"`
|
|
|
|
|
- } `json:"properties"`
|
|
|
|
|
- AppProperties []struct {
|
|
|
|
|
- Name string `json:"name"`
|
|
|
|
|
- Value string `json:"value"`
|
|
|
|
|
- Visibility string `json:"visibility"`
|
|
|
|
|
- } `json:"appProperties"`
|
|
|
|
|
|
|
+ ModifiedTime string `json:"modifiedTime"`
|
|
|
|
|
+ Extension string `json:"extension"`
|
|
|
|
|
+ CreatorId string `json:"creatorId"`
|
|
|
|
|
+ ModifierId string `json:"modifierId"`
|
|
|
|
|
+ Type string `json:"type"`
|
|
|
Uuid string `json:"uuid"`
|
|
Uuid string `json:"uuid"`
|
|
|
PartitionType string `json:"partitionType"`
|
|
PartitionType string `json:"partitionType"`
|
|
|
|
|
+ ParentId string `json:"parentId"`
|
|
|
|
|
+ SpaceId string `json:"spaceId"`
|
|
|
|
|
+ Path string `json:"path"`
|
|
|
|
|
+ Size int `json:"size"`
|
|
|
|
|
+ CreateTime string `json:"createTime"`
|
|
|
StorageDriver string `json:"storageDriver"`
|
|
StorageDriver string `json:"storageDriver"`
|
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
|
+ Id string `json:"id"`
|
|
|
|
|
+ Properties struct {
|
|
|
|
|
+ ReadOnly bool `json:"readOnly"`
|
|
|
|
|
+ } `json:"properties"`
|
|
|
|
|
+ Status string `json:"status"`
|
|
|
|
|
+ AppProperties struct {
|
|
|
|
|
+ EedFQcfwBC4HZvNzsES5IiOpPrfoiS3ZFw []struct {
|
|
|
|
|
+ Visibility string `json:"visibility"`
|
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
|
+ Value string `json:"value"`
|
|
|
|
|
+ } `json:"EedFQcfwBC4hZvNzsES5iiOpPrfoiS3ZFw"`
|
|
|
|
|
+ } `json:"appProperties"`
|
|
|
} `json:"dentry"`
|
|
} `json:"dentry"`
|
|
|
}
|
|
}
|