Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFileStoreServiceServer(s grpc.ServiceRegistrar, srv FileStoreServiceServer)
- type FileStoreServiceClient
- type FileStoreServiceServer
- type Server
- type UnimplementedFileStoreServiceServer
- type UnsafeFileStoreServiceServer
- type UploadRequest
- func (*UploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadRequest) GetData() []byte
- func (x *UploadRequest) GetFileName() string
- func (x *UploadRequest) GetKey() string
- func (*UploadRequest) ProtoMessage()
- func (x *UploadRequest) ProtoReflect() protoreflect.Message
- func (x *UploadRequest) Reset()
- func (x *UploadRequest) String() string
- func (m *UploadRequest) Validate() error
- func (m *UploadRequest) ValidateAll() error
- type UploadRequestMultiError
- type UploadRequestValidationError
- func (e UploadRequestValidationError) Cause() error
- func (e UploadRequestValidationError) Error() string
- func (e UploadRequestValidationError) ErrorName() string
- func (e UploadRequestValidationError) Field() string
- func (e UploadRequestValidationError) Key() bool
- func (e UploadRequestValidationError) Reason() string
- type UploadResponse
- func (*UploadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadResponse) GetStatus() UploadStatus
- func (x *UploadResponse) GetUrl() string
- func (*UploadResponse) ProtoMessage()
- func (x *UploadResponse) ProtoReflect() protoreflect.Message
- func (x *UploadResponse) Reset()
- func (x *UploadResponse) String() string
- func (m *UploadResponse) Validate() error
- func (m *UploadResponse) ValidateAll() error
- type UploadResponseMultiError
- type UploadResponseValidationError
- func (e UploadResponseValidationError) Cause() error
- func (e UploadResponseValidationError) Error() string
- func (e UploadResponseValidationError) ErrorName() string
- func (e UploadResponseValidationError) Field() string
- func (e UploadResponseValidationError) Key() bool
- func (e UploadResponseValidationError) Reason() string
- type UploadStatus
- func (UploadStatus) Descriptor() protoreflect.EnumDescriptor
- func (x UploadStatus) Enum() *UploadStatus
- func (UploadStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x UploadStatus) Number() protoreflect.EnumNumber
- func (x UploadStatus) String() string
- func (UploadStatus) Type() protoreflect.EnumType
Constants ¶
const (
FileStoreService_Upload_FullMethodName = "/services.filestore.FileStoreService/Upload"
)
Variables ¶
var ( UploadStatus_name = map[int32]string{ 0: "UPLOAD_STATUS_UNSPECIFIED", 1: "UPLOAD_STATUS_SUCCESS", } UploadStatus_value = map[string]int32{ "UPLOAD_STATUS_UNSPECIFIED": 0, "UPLOAD_STATUS_SUCCESS": 1, } )
Enum value maps for UploadStatus.
var FileStoreService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "services.filestore.FileStoreService", HandlerType: (*FileStoreServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Upload", Handler: _FileStoreService_Upload_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "services/filestore/filestore.proto", }
FileStoreService_ServiceDesc is the grpc.ServiceDesc for FileStoreService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_services_filestore_filestore_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileStoreServiceServer ¶
func RegisterFileStoreServiceServer(s grpc.ServiceRegistrar, srv FileStoreServiceServer)
Types ¶
type FileStoreServiceClient ¶
type FileStoreServiceClient interface {
Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
}
FileStoreServiceClient is the client API for FileStoreService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFileStoreServiceClient ¶
func NewFileStoreServiceClient(cc grpc.ClientConnInterface) FileStoreServiceClient
func NewTestFileStoreServiceClient ¶
func NewTestFileStoreServiceClient(srv FileStoreServiceServer) (FileStoreServiceClient, context.Context, context.CancelFunc)
type FileStoreServiceServer ¶
type FileStoreServiceServer interface { Upload(context.Context, *UploadRequest) (*UploadResponse, error) // contains filtered or unexported methods }
FileStoreServiceServer is the server API for FileStoreService service. All implementations must embed UnimplementedFileStoreServiceServer for forward compatibility
type UnimplementedFileStoreServiceServer ¶
type UnimplementedFileStoreServiceServer struct { }
UnimplementedFileStoreServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFileStoreServiceServer) Upload ¶
func (UnimplementedFileStoreServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error)
type UnsafeFileStoreServiceServer ¶
type UnsafeFileStoreServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFileStoreServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileStoreServiceServer will result in compilation errors.
type UploadRequest ¶
type UploadRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UploadRequest) Descriptor
deprecated
func (*UploadRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
func (*UploadRequest) GetData ¶
func (x *UploadRequest) GetData() []byte
func (*UploadRequest) GetFileName ¶
func (x *UploadRequest) GetFileName() string
func (*UploadRequest) GetKey ¶
func (x *UploadRequest) GetKey() string
func (*UploadRequest) ProtoMessage ¶
func (*UploadRequest) ProtoMessage()
func (*UploadRequest) ProtoReflect ¶
func (x *UploadRequest) ProtoReflect() protoreflect.Message
func (*UploadRequest) Reset ¶
func (x *UploadRequest) Reset()
func (*UploadRequest) String ¶
func (x *UploadRequest) String() string
func (*UploadRequest) Validate ¶
func (m *UploadRequest) Validate() error
Validate checks the field values on UploadRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UploadRequest) ValidateAll ¶
func (m *UploadRequest) ValidateAll() error
ValidateAll checks the field values on UploadRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadRequestMultiError, or nil if none found.
type UploadRequestMultiError ¶
type UploadRequestMultiError []error
UploadRequestMultiError is an error wrapping multiple validation errors returned by UploadRequest.ValidateAll() if the designated constraints aren't met.
func (UploadRequestMultiError) AllErrors ¶
func (m UploadRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UploadRequestMultiError) Error ¶
func (m UploadRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UploadRequestValidationError ¶
type UploadRequestValidationError struct {
// contains filtered or unexported fields
}
UploadRequestValidationError is the validation error returned by UploadRequest.Validate if the designated constraints aren't met.
func (UploadRequestValidationError) Cause ¶
func (e UploadRequestValidationError) Cause() error
Cause function returns cause value.
func (UploadRequestValidationError) Error ¶
func (e UploadRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UploadRequestValidationError) ErrorName ¶
func (e UploadRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UploadRequestValidationError) Field ¶
func (e UploadRequestValidationError) Field() string
Field function returns field value.
func (UploadRequestValidationError) Key ¶
func (e UploadRequestValidationError) Key() bool
Key function returns key value.
func (UploadRequestValidationError) Reason ¶
func (e UploadRequestValidationError) Reason() string
Reason function returns reason value.
type UploadResponse ¶
type UploadResponse struct { Status UploadStatus `protobuf:"varint,1,opt,name=status,proto3,enum=services.filestore.UploadStatus" json:"status,omitempty"` Url *string `protobuf:"bytes,2,opt,name=url,proto3,oneof" json:"url,omitempty"` // contains filtered or unexported fields }
func (*UploadResponse) Descriptor
deprecated
func (*UploadResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.
func (*UploadResponse) GetStatus ¶
func (x *UploadResponse) GetStatus() UploadStatus
func (*UploadResponse) GetUrl ¶
func (x *UploadResponse) GetUrl() string
func (*UploadResponse) ProtoMessage ¶
func (*UploadResponse) ProtoMessage()
func (*UploadResponse) ProtoReflect ¶
func (x *UploadResponse) ProtoReflect() protoreflect.Message
func (*UploadResponse) Reset ¶
func (x *UploadResponse) Reset()
func (*UploadResponse) String ¶
func (x *UploadResponse) String() string
func (*UploadResponse) Validate ¶
func (m *UploadResponse) Validate() error
Validate checks the field values on UploadResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UploadResponse) ValidateAll ¶
func (m *UploadResponse) ValidateAll() error
ValidateAll checks the field values on UploadResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadResponseMultiError, or nil if none found.
type UploadResponseMultiError ¶
type UploadResponseMultiError []error
UploadResponseMultiError is an error wrapping multiple validation errors returned by UploadResponse.ValidateAll() if the designated constraints aren't met.
func (UploadResponseMultiError) AllErrors ¶
func (m UploadResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UploadResponseMultiError) Error ¶
func (m UploadResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UploadResponseValidationError ¶
type UploadResponseValidationError struct {
// contains filtered or unexported fields
}
UploadResponseValidationError is the validation error returned by UploadResponse.Validate if the designated constraints aren't met.
func (UploadResponseValidationError) Cause ¶
func (e UploadResponseValidationError) Cause() error
Cause function returns cause value.
func (UploadResponseValidationError) Error ¶
func (e UploadResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UploadResponseValidationError) ErrorName ¶
func (e UploadResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UploadResponseValidationError) Field ¶
func (e UploadResponseValidationError) Field() string
Field function returns field value.
func (UploadResponseValidationError) Key ¶
func (e UploadResponseValidationError) Key() bool
Key function returns key value.
func (UploadResponseValidationError) Reason ¶
func (e UploadResponseValidationError) Reason() string
Reason function returns reason value.
type UploadStatus ¶
type UploadStatus int32
const ( UploadStatus_UPLOAD_STATUS_UNSPECIFIED UploadStatus = 0 UploadStatus_UPLOAD_STATUS_SUCCESS UploadStatus = 1 )
func (UploadStatus) Descriptor ¶
func (UploadStatus) Descriptor() protoreflect.EnumDescriptor
func (UploadStatus) Enum ¶
func (x UploadStatus) Enum() *UploadStatus
func (UploadStatus) EnumDescriptor
deprecated
func (UploadStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use UploadStatus.Descriptor instead.
func (UploadStatus) Number ¶
func (x UploadStatus) Number() protoreflect.EnumNumber
func (UploadStatus) String ¶
func (x UploadStatus) String() string
func (UploadStatus) Type ¶
func (UploadStatus) Type() protoreflect.EnumType