Versions in this module Expand all Collapse all v0 v0.1.3 Nov 16, 2023 Changes in this version + const OSS_GetOssStsToken_FullMethodName + const OSS_UploadFile_FullMethodName + const OperationOSSGetOssStsToken + const OperationOSSUploadFile + var ErrorReason_name = map[int32]string + var ErrorReason_value = map[string]int32 + var File_oss_v1_error_reason_proto protoreflect.FileDescriptor + var File_oss_v1_oss_proto protoreflect.FileDescriptor + var OSS_ServiceDesc = grpc.ServiceDesc + func ErrorBadRequest(format string, args ...interface{}) *errors.Error + func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error + func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error + func ErrorSystemError(format string, args ...interface{}) *errors.Error + func IsBadRequest(err error) bool + func IsRecordAlreadyExists(err error) bool + func IsRecordNotFound(err error) bool + func IsSystemError(err error) bool + func RegisterOSSHTTPServer(s *http.Server, srv OSSHTTPServer) + func RegisterOSSServer(s grpc.ServiceRegistrar, srv OSSServer) + type ErrorReason int32 + const ErrorReason_BAD_REQUEST + const ErrorReason_RECORD_ALREADY_EXISTS + const ErrorReason_RECORD_NOT_FOUND + const ErrorReason_SYSTEM_ERROR + func (ErrorReason) Descriptor() protoreflect.EnumDescriptor + func (ErrorReason) EnumDescriptor() ([]byte, []int) + func (ErrorReason) Type() protoreflect.EnumType + func (x ErrorReason) Enum() *ErrorReason + func (x ErrorReason) Number() protoreflect.EnumNumber + func (x ErrorReason) String() string + type OSSClient interface + GetOssStsToken func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OssStsTokenResponse, error) + UploadFile func(ctx context.Context, in *UploadFileRequest, opts ...grpc.CallOption) (*UploadFileResponse, error) + func NewOSSClient(cc grpc.ClientConnInterface) OSSClient + type OSSHTTPClient interface + GetOssStsToken func(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *OssStsTokenResponse, err error) + UploadFile func(ctx context.Context, req *UploadFileRequest, opts ...http.CallOption) (rsp *UploadFileResponse, err error) + func NewOSSHTTPClient(client *http.Client) OSSHTTPClient + type OSSHTTPClientImpl struct + func (c *OSSHTTPClientImpl) GetOssStsToken(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*OssStsTokenResponse, error) + func (c *OSSHTTPClientImpl) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...http.CallOption) (*UploadFileResponse, error) + type OSSHTTPServer interface + GetOssStsToken func(context.Context, *emptypb.Empty) (*OssStsTokenResponse, error) + UploadFile func(context.Context, *UploadFileRequest) (*UploadFileResponse, error) + type OSSServer interface + GetOssStsToken func(context.Context, *emptypb.Empty) (*OssStsTokenResponse, error) + UploadFile func(context.Context, *UploadFileRequest) (*UploadFileResponse, error) + type OssStsTokenResponse struct + AccessKey string + AccessSecret string + BucketName string + EndPoint string + Expiration string + Region string + SecurityToken string + Url string + func (*OssStsTokenResponse) Descriptor() ([]byte, []int) + func (*OssStsTokenResponse) ProtoMessage() + func (m *OssStsTokenResponse) Validate() error + func (m *OssStsTokenResponse) ValidateAll() error + func (x *OssStsTokenResponse) GetAccessKey() string + func (x *OssStsTokenResponse) GetAccessSecret() string + func (x *OssStsTokenResponse) GetBucketName() string + func (x *OssStsTokenResponse) GetEndPoint() string + func (x *OssStsTokenResponse) GetExpiration() string + func (x *OssStsTokenResponse) GetRegion() string + func (x *OssStsTokenResponse) GetSecurityToken() string + func (x *OssStsTokenResponse) GetUrl() string + func (x *OssStsTokenResponse) ProtoReflect() protoreflect.Message + func (x *OssStsTokenResponse) Reset() + func (x *OssStsTokenResponse) String() string + type OssStsTokenResponseMultiError []error + func (m OssStsTokenResponseMultiError) AllErrors() []error + func (m OssStsTokenResponseMultiError) Error() string + type OssStsTokenResponseValidationError struct + func (e OssStsTokenResponseValidationError) Cause() error + func (e OssStsTokenResponseValidationError) Error() string + func (e OssStsTokenResponseValidationError) ErrorName() string + func (e OssStsTokenResponseValidationError) Field() string + func (e OssStsTokenResponseValidationError) Key() bool + func (e OssStsTokenResponseValidationError) Reason() string + type UnimplementedOSSServer struct + func (UnimplementedOSSServer) GetOssStsToken(context.Context, *emptypb.Empty) (*OssStsTokenResponse, error) + func (UnimplementedOSSServer) UploadFile(context.Context, *UploadFileRequest) (*UploadFileResponse, error) + type UnsafeOSSServer interface + type UploadFileRequest struct + Content []byte + FileName string + FileType string + func (*UploadFileRequest) Descriptor() ([]byte, []int) + func (*UploadFileRequest) ProtoMessage() + func (m *UploadFileRequest) Validate() error + func (m *UploadFileRequest) ValidateAll() error + func (x *UploadFileRequest) GetContent() []byte + func (x *UploadFileRequest) GetFileName() string + func (x *UploadFileRequest) GetFileType() string + func (x *UploadFileRequest) ProtoReflect() protoreflect.Message + func (x *UploadFileRequest) Reset() + func (x *UploadFileRequest) String() string + type UploadFileRequestMultiError []error + func (m UploadFileRequestMultiError) AllErrors() []error + func (m UploadFileRequestMultiError) Error() string + type UploadFileRequestValidationError struct + func (e UploadFileRequestValidationError) Cause() error + func (e UploadFileRequestValidationError) Error() string + func (e UploadFileRequestValidationError) ErrorName() string + func (e UploadFileRequestValidationError) Field() string + func (e UploadFileRequestValidationError) Key() bool + func (e UploadFileRequestValidationError) Reason() string + type UploadFileResponse struct + Url string + func (*UploadFileResponse) Descriptor() ([]byte, []int) + func (*UploadFileResponse) ProtoMessage() + func (m *UploadFileResponse) Validate() error + func (m *UploadFileResponse) ValidateAll() error + func (x *UploadFileResponse) GetUrl() string + func (x *UploadFileResponse) ProtoReflect() protoreflect.Message + func (x *UploadFileResponse) Reset() + func (x *UploadFileResponse) String() string + type UploadFileResponseMultiError []error + func (m UploadFileResponseMultiError) AllErrors() []error + func (m UploadFileResponseMultiError) Error() string + type UploadFileResponseValidationError struct + func (e UploadFileResponseValidationError) Cause() error + func (e UploadFileResponseValidationError) Error() string + func (e UploadFileResponseValidationError) ErrorName() string + func (e UploadFileResponseValidationError) Field() string + func (e UploadFileResponseValidationError) Key() bool + func (e UploadFileResponseValidationError) Reason() string