Versions in this module Expand all Collapse all v0 v0.1.1 Jun 26, 2023 Changes in this version + const FileService_GetOssStsToken_FullMethodName + const FileService_UploadFile_FullMethodName + const OperationFileServiceGetOssStsToken + const OperationFileServiceUploadFile + var ErrorReason_name = map[int32]string + var ErrorReason_value = map[string]int32 + var FileService_ServiceDesc = grpc.ServiceDesc + var File_file_v1_error_reason_proto protoreflect.FileDescriptor + var File_file_v1_file_proto protoreflect.FileDescriptor + 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 RegisterFileServiceHTTPServer(s *http.Server, srv FileServiceHTTPServer) + func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) + 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 FileServiceClient 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 NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient + type FileServiceHTTPClient 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 NewFileServiceHTTPClient(client *http.Client) FileServiceHTTPClient + type FileServiceHTTPClientImpl struct + func (c *FileServiceHTTPClientImpl) GetOssStsToken(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*OssStsTokenResponse, error) + func (c *FileServiceHTTPClientImpl) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...http.CallOption) (*UploadFileResponse, error) + type FileServiceHTTPServer interface + GetOssStsToken func(context.Context, *emptypb.Empty) (*OssStsTokenResponse, error) + UploadFile func(context.Context, *UploadFileRequest) (*UploadFileResponse, error) + type FileServiceServer 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 UnimplementedFileServiceServer struct + func (UnimplementedFileServiceServer) GetOssStsToken(context.Context, *emptypb.Empty) (*OssStsTokenResponse, error) + func (UnimplementedFileServiceServer) UploadFile(context.Context, *UploadFileRequest) (*UploadFileResponse, error) + type UnsafeFileServiceServer 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