Documentation ¶
Index ¶
- Variables
- type GetUploadTokenRequest
- func (*GetUploadTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUploadTokenRequest) GetContentLength() int64
- func (x *GetUploadTokenRequest) GetContentType() string
- func (x *GetUploadTokenRequest) GetFilename() string
- func (x *GetUploadTokenRequest) GetImageFormat() ImageFormat
- func (x *GetUploadTokenRequest) GetType() ResourceType
- func (*GetUploadTokenRequest) ProtoMessage()
- func (x *GetUploadTokenRequest) ProtoReflect() protoreflect.Message
- func (x *GetUploadTokenRequest) Reset()
- func (x *GetUploadTokenRequest) String() string
- type GetUploadTokenResponse
- func (*GetUploadTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUploadTokenResponse) GetExpiresIn() int64
- func (x *GetUploadTokenResponse) GetHeaders() map[string]string
- func (x *GetUploadTokenResponse) GetMaxSize() int64
- func (x *GetUploadTokenResponse) GetResourceUrl() string
- func (x *GetUploadTokenResponse) GetUploadUrl() string
- func (*GetUploadTokenResponse) ProtoMessage()
- func (x *GetUploadTokenResponse) ProtoReflect() protoreflect.Message
- func (x *GetUploadTokenResponse) Reset()
- func (x *GetUploadTokenResponse) String() string
- type ImageFormat
- func (ImageFormat) Descriptor() protoreflect.EnumDescriptor
- func (x ImageFormat) Enum() *ImageFormat
- func (ImageFormat) EnumDescriptor() ([]byte, []int)deprecated
- func (x ImageFormat) Number() protoreflect.EnumNumber
- func (x ImageFormat) String() string
- func (ImageFormat) Type() protoreflect.EnumType
- type ResourceMeta
- func (*ResourceMeta) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceMeta) GetContentType() string
- func (x *ResourceMeta) GetCreatedAt() *timestamppb.Timestamp
- func (x *ResourceMeta) GetFilename() string
- func (x *ResourceMeta) GetId() string
- func (x *ResourceMeta) GetSize() int64
- func (x *ResourceMeta) GetType() ResourceType
- func (x *ResourceMeta) GetUrl() string
- func (x *ResourceMeta) GetUserId() string
- func (*ResourceMeta) ProtoMessage()
- func (x *ResourceMeta) ProtoReflect() protoreflect.Message
- func (x *ResourceMeta) Reset()
- func (x *ResourceMeta) String() string
- type ResourceType
- func (ResourceType) Descriptor() protoreflect.EnumDescriptor
- func (x ResourceType) Enum() *ResourceType
- func (ResourceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResourceType) Number() protoreflect.EnumNumber
- func (x ResourceType) String() string
- func (ResourceType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResourceType_name = map[int32]string{ 0: "RESOURCE_TYPE_UNSPECIFIED", 1: "RESOURCE_TYPE_IMAGE", 2: "RESOURCE_TYPE_ATTACHMENT", } ResourceType_value = map[string]int32{ "RESOURCE_TYPE_UNSPECIFIED": 0, "RESOURCE_TYPE_IMAGE": 1, "RESOURCE_TYPE_ATTACHMENT": 2, } )
Enum value maps for ResourceType.
View Source
var ( ImageFormat_name = map[int32]string{ 0: "IMAGE_FORMAT_UNSPECIFIED", 1: "IMAGE_FORMAT_JPEG", 2: "IMAGE_FORMAT_PNG", 3: "IMAGE_FORMAT_GIF", 4: "IMAGE_FORMAT_WEBP", } ImageFormat_value = map[string]int32{ "IMAGE_FORMAT_UNSPECIFIED": 0, "IMAGE_FORMAT_JPEG": 1, "IMAGE_FORMAT_PNG": 2, "IMAGE_FORMAT_GIF": 3, "IMAGE_FORMAT_WEBP": 4, } )
Enum value maps for ImageFormat.
View Source
var File_binary_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GetUploadTokenRequest ¶
type GetUploadTokenRequest struct { Type ResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=binary.ResourceType" form:"type" json:"type,omitempty" query:"type"` Filename string `protobuf:"bytes,2,opt,name=filename,proto3" form:"filename" json:"filename,omitempty" query:"filename"` ContentType string `` /* 135-byte string literal not displayed */ ContentLength int64 `` // 文件大小,用于预检查 /* 146-byte string literal not displayed */ ImageFormat ImageFormat `` // 当type为IMAGE时使用 /* 160-byte string literal not displayed */ // contains filtered or unexported fields }
获取上传凭证请求
func (*GetUploadTokenRequest) Descriptor
deprecated
func (*GetUploadTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUploadTokenRequest.ProtoReflect.Descriptor instead.
func (*GetUploadTokenRequest) GetContentLength ¶
func (x *GetUploadTokenRequest) GetContentLength() int64
func (*GetUploadTokenRequest) GetContentType ¶
func (x *GetUploadTokenRequest) GetContentType() string
func (*GetUploadTokenRequest) GetFilename ¶
func (x *GetUploadTokenRequest) GetFilename() string
func (*GetUploadTokenRequest) GetImageFormat ¶
func (x *GetUploadTokenRequest) GetImageFormat() ImageFormat
func (*GetUploadTokenRequest) GetType ¶
func (x *GetUploadTokenRequest) GetType() ResourceType
func (*GetUploadTokenRequest) ProtoMessage ¶
func (*GetUploadTokenRequest) ProtoMessage()
func (*GetUploadTokenRequest) ProtoReflect ¶
func (x *GetUploadTokenRequest) ProtoReflect() protoreflect.Message
func (*GetUploadTokenRequest) Reset ¶
func (x *GetUploadTokenRequest) Reset()
func (*GetUploadTokenRequest) String ¶
func (x *GetUploadTokenRequest) String() string
type GetUploadTokenResponse ¶
type GetUploadTokenResponse struct { UploadUrl string `protobuf:"bytes,1,opt,name=upload_url,json=uploadUrl,proto3" form:"upload_url" json:"upload_url,omitempty" query:"upload_url"` // OSS上传URL Headers map[string]string `` // 上传需要的headers /* 186-byte string literal not displayed */ ResourceUrl string `` // 上传成功后的访问URL /* 135-byte string literal not displayed */ ExpiresIn int64 `` // 上传URL过期时间(秒) /* 126-byte string literal not displayed */ MaxSize int64 `protobuf:"varint,5,opt,name=max_size,json=maxSize,proto3" form:"max_size" json:"max_size,omitempty" query:"max_size"` // 最大允许的文件大小 // contains filtered or unexported fields }
获取上传凭证响应
func (*GetUploadTokenResponse) Descriptor
deprecated
func (*GetUploadTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUploadTokenResponse.ProtoReflect.Descriptor instead.
func (*GetUploadTokenResponse) GetExpiresIn ¶
func (x *GetUploadTokenResponse) GetExpiresIn() int64
func (*GetUploadTokenResponse) GetHeaders ¶
func (x *GetUploadTokenResponse) GetHeaders() map[string]string
func (*GetUploadTokenResponse) GetMaxSize ¶
func (x *GetUploadTokenResponse) GetMaxSize() int64
func (*GetUploadTokenResponse) GetResourceUrl ¶
func (x *GetUploadTokenResponse) GetResourceUrl() string
func (*GetUploadTokenResponse) GetUploadUrl ¶
func (x *GetUploadTokenResponse) GetUploadUrl() string
func (*GetUploadTokenResponse) ProtoMessage ¶
func (*GetUploadTokenResponse) ProtoMessage()
func (*GetUploadTokenResponse) ProtoReflect ¶
func (x *GetUploadTokenResponse) ProtoReflect() protoreflect.Message
func (*GetUploadTokenResponse) Reset ¶
func (x *GetUploadTokenResponse) Reset()
func (*GetUploadTokenResponse) String ¶
func (x *GetUploadTokenResponse) String() string
type ImageFormat ¶
type ImageFormat int32
图片格式
const ( ImageFormat_IMAGE_FORMAT_UNSPECIFIED ImageFormat = 0 ImageFormat_IMAGE_FORMAT_JPEG ImageFormat = 1 ImageFormat_IMAGE_FORMAT_PNG ImageFormat = 2 ImageFormat_IMAGE_FORMAT_GIF ImageFormat = 3 ImageFormat_IMAGE_FORMAT_WEBP ImageFormat = 4 )
func (ImageFormat) Descriptor ¶
func (ImageFormat) Descriptor() protoreflect.EnumDescriptor
func (ImageFormat) Enum ¶
func (x ImageFormat) Enum() *ImageFormat
func (ImageFormat) EnumDescriptor
deprecated
func (ImageFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use ImageFormat.Descriptor instead.
func (ImageFormat) Number ¶
func (x ImageFormat) Number() protoreflect.EnumNumber
func (ImageFormat) String ¶
func (x ImageFormat) String() string
func (ImageFormat) Type ¶
func (ImageFormat) Type() protoreflect.EnumType
type ResourceMeta ¶
type ResourceMeta struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id,omitempty" query:"id"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" form:"user_id" json:"user_id,omitempty" query:"user_id"` Type ResourceType `protobuf:"varint,3,opt,name=type,proto3,enum=binary.ResourceType" form:"type" json:"type,omitempty" query:"type"` Filename string `protobuf:"bytes,4,opt,name=filename,proto3" form:"filename" json:"filename,omitempty" query:"filename"` ContentType string `` /* 135-byte string literal not displayed */ Size int64 `protobuf:"varint,6,opt,name=size,proto3" form:"size" json:"size,omitempty" query:"size"` Url string `protobuf:"bytes,7,opt,name=url,proto3" form:"url" json:"url,omitempty" query:"url"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" form:"created_at" json:"created_at,omitempty" query:"created_at"` // contains filtered or unexported fields }
资源元数据
func (*ResourceMeta) Descriptor
deprecated
func (*ResourceMeta) Descriptor() ([]byte, []int)
Deprecated: Use ResourceMeta.ProtoReflect.Descriptor instead.
func (*ResourceMeta) GetContentType ¶
func (x *ResourceMeta) GetContentType() string
func (*ResourceMeta) GetCreatedAt ¶
func (x *ResourceMeta) GetCreatedAt() *timestamppb.Timestamp
func (*ResourceMeta) GetFilename ¶
func (x *ResourceMeta) GetFilename() string
func (*ResourceMeta) GetId ¶
func (x *ResourceMeta) GetId() string
func (*ResourceMeta) GetSize ¶
func (x *ResourceMeta) GetSize() int64
func (*ResourceMeta) GetType ¶
func (x *ResourceMeta) GetType() ResourceType
func (*ResourceMeta) GetUrl ¶
func (x *ResourceMeta) GetUrl() string
func (*ResourceMeta) GetUserId ¶
func (x *ResourceMeta) GetUserId() string
func (*ResourceMeta) ProtoMessage ¶
func (*ResourceMeta) ProtoMessage()
func (*ResourceMeta) ProtoReflect ¶
func (x *ResourceMeta) ProtoReflect() protoreflect.Message
func (*ResourceMeta) Reset ¶
func (x *ResourceMeta) Reset()
func (*ResourceMeta) String ¶
func (x *ResourceMeta) String() string
type ResourceType ¶
type ResourceType int32
资源类型
const ( ResourceType_RESOURCE_TYPE_UNSPECIFIED ResourceType = 0 ResourceType_RESOURCE_TYPE_IMAGE ResourceType = 1 // 图片 ResourceType_RESOURCE_TYPE_ATTACHMENT ResourceType = 2 // 附件,预留 )
func (ResourceType) Descriptor ¶
func (ResourceType) Descriptor() protoreflect.EnumDescriptor
func (ResourceType) Enum ¶
func (x ResourceType) Enum() *ResourceType
func (ResourceType) EnumDescriptor
deprecated
func (ResourceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResourceType.Descriptor instead.
func (ResourceType) Number ¶
func (x ResourceType) Number() protoreflect.EnumNumber
func (ResourceType) String ¶
func (x ResourceType) String() string
func (ResourceType) Type ¶
func (ResourceType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.