Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFileUploadServiceServer(s grpc.ServiceRegistrar, srv FileUploadServiceServer)
- type FileHeader
- func (*FileHeader) Descriptor() ([]byte, []int)deprecated
- func (x *FileHeader) GetContentType() string
- func (x *FileHeader) GetFilename() string
- func (x *FileHeader) GetHeader() map[string]string
- func (x *FileHeader) GetIsDir() bool
- func (x *FileHeader) GetModTime() uint32
- func (x *FileHeader) GetModTimeString() string
- func (x *FileHeader) GetSize() uint32
- func (*FileHeader) ProtoMessage()
- func (x *FileHeader) ProtoReflect() protoreflect.Message
- func (x *FileHeader) Reset()
- func (x *FileHeader) String() string
- func (m *FileHeader) Validate() error
- func (m *FileHeader) ValidateAll() error
- type FileHeaderMultiError
- type FileHeaderValidationError
- type FileUploadServiceClient
- type FileUploadServiceServer
- type FileUploadService_UploadClient
- type FileUploadService_UploadServer
- type UnimplementedFileUploadServiceServer
- type UnsafeFileUploadServiceServer
- type UploadRequest
- func (*UploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadRequest) GetData() []byte
- func (x *UploadRequest) GetIsHeader() bool
- 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) GetFailReason() string
- func (x *UploadResponse) GetHash() string
- func (x *UploadResponse) GetPath() string
- func (x *UploadResponse) GetSize() uint32
- func (x *UploadResponse) GetSuccess() bool
- 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
Constants ¶
const (
FileUploadService_Upload_FullMethodName = "/fileupload.v1.FileUploadService/Upload"
)
Variables ¶
var FileUploadService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fileupload.v1.FileUploadService", HandlerType: (*FileUploadServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Upload", Handler: _FileUploadService_Upload_Handler, ClientStreams: true, }, }, Metadata: "fileupload/v1/fileupload.proto", }
FileUploadService_ServiceDesc is the grpc.ServiceDesc for FileUploadService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_fileupload_v1_fileupload_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileUploadServiceServer ¶
func RegisterFileUploadServiceServer(s grpc.ServiceRegistrar, srv FileUploadServiceServer)
Types ¶
type FileHeader ¶
type FileHeader struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` Size uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` ModTimeString string `protobuf:"bytes,4,opt,name=mod_time_string,proto3" json:"mod_time_string,omitempty"` ModTime uint32 `protobuf:"varint,5,opt,name=mod_time,proto3" json:"mod_time,omitempty"` ContentType string `protobuf:"bytes,2,opt,name=content_type,proto3" json:"content_type,omitempty"` Header map[string]string `` /* 153-byte string literal not displayed */ IsDir bool `protobuf:"varint,7,opt,name=is_dir,proto3" json:"is_dir,omitempty"` // contains filtered or unexported fields }
FileHeader defines the structure of a file header.
func (*FileHeader) Descriptor
deprecated
func (*FileHeader) Descriptor() ([]byte, []int)
Deprecated: Use FileHeader.ProtoReflect.Descriptor instead.
func (*FileHeader) GetContentType ¶
func (x *FileHeader) GetContentType() string
func (*FileHeader) GetFilename ¶
func (x *FileHeader) GetFilename() string
func (*FileHeader) GetHeader ¶
func (x *FileHeader) GetHeader() map[string]string
func (*FileHeader) GetIsDir ¶
func (x *FileHeader) GetIsDir() bool
func (*FileHeader) GetModTime ¶
func (x *FileHeader) GetModTime() uint32
func (*FileHeader) GetModTimeString ¶
func (x *FileHeader) GetModTimeString() string
func (*FileHeader) GetSize ¶
func (x *FileHeader) GetSize() uint32
func (*FileHeader) ProtoMessage ¶
func (*FileHeader) ProtoMessage()
func (*FileHeader) ProtoReflect ¶
func (x *FileHeader) ProtoReflect() protoreflect.Message
func (*FileHeader) Reset ¶
func (x *FileHeader) Reset()
func (*FileHeader) String ¶
func (x *FileHeader) String() string
func (*FileHeader) Validate ¶
func (m *FileHeader) Validate() error
Validate checks the field values on FileHeader 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 (*FileHeader) ValidateAll ¶
func (m *FileHeader) ValidateAll() error
ValidateAll checks the field values on FileHeader 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 FileHeaderMultiError, or nil if none found.
type FileHeaderMultiError ¶
type FileHeaderMultiError []error
FileHeaderMultiError is an error wrapping multiple validation errors returned by FileHeader.ValidateAll() if the designated constraints aren't met.
func (FileHeaderMultiError) AllErrors ¶
func (m FileHeaderMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FileHeaderMultiError) Error ¶
func (m FileHeaderMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FileHeaderValidationError ¶
type FileHeaderValidationError struct {
// contains filtered or unexported fields
}
FileHeaderValidationError is the validation error returned by FileHeader.Validate if the designated constraints aren't met.
func (FileHeaderValidationError) Cause ¶
func (e FileHeaderValidationError) Cause() error
Cause function returns cause value.
func (FileHeaderValidationError) Error ¶
func (e FileHeaderValidationError) Error() string
Error satisfies the builtin error interface
func (FileHeaderValidationError) ErrorName ¶
func (e FileHeaderValidationError) ErrorName() string
ErrorName returns error name.
func (FileHeaderValidationError) Field ¶
func (e FileHeaderValidationError) Field() string
Field function returns field value.
func (FileHeaderValidationError) Key ¶
func (e FileHeaderValidationError) Key() bool
Key function returns key value.
func (FileHeaderValidationError) Reason ¶
func (e FileHeaderValidationError) Reason() string
Reason function returns reason value.
type FileUploadServiceClient ¶
type FileUploadServiceClient interface {
Upload(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[UploadRequest, UploadResponse], error)
}
FileUploadServiceClient is the client API for FileUploadService 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 NewFileUploadServiceClient ¶
func NewFileUploadServiceClient(cc grpc.ClientConnInterface) FileUploadServiceClient
type FileUploadServiceServer ¶
type FileUploadServiceServer interface { Upload(grpc.ClientStreamingServer[UploadRequest, UploadResponse]) error // contains filtered or unexported methods }
FileUploadServiceServer is the server API for FileUploadService service. All implementations must embed UnimplementedFileUploadServiceServer for forward compatibility.
type FileUploadService_UploadClient ¶
type FileUploadService_UploadClient = grpc.ClientStreamingClient[UploadRequest, UploadResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileUploadService_UploadServer ¶
type FileUploadService_UploadServer = grpc.ClientStreamingServer[UploadRequest, UploadResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedFileUploadServiceServer ¶
type UnimplementedFileUploadServiceServer struct{}
UnimplementedFileUploadServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeFileUploadServiceServer ¶
type UnsafeFileUploadServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFileUploadServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileUploadServiceServer will result in compilation errors.
type UploadRequest ¶
type UploadRequest struct { IsHeader bool `protobuf:"varint,1,opt,name=is_header,proto3" json:"is_header,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
UploadRequest file block information
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) GetIsHeader ¶
func (x *UploadRequest) GetIsHeader() bool
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 { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` Size uint32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` FailReason string `protobuf:"bytes,5,opt,name=fail_reason,proto3" json:"fail_reason,omitempty"` // contains filtered or unexported fields }
UploadResponse defines the structure of a file response.
func (*UploadResponse) Descriptor
deprecated
func (*UploadResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.
func (*UploadResponse) GetFailReason ¶
func (x *UploadResponse) GetFailReason() string
func (*UploadResponse) GetHash ¶
func (x *UploadResponse) GetHash() string
func (*UploadResponse) GetPath ¶
func (x *UploadResponse) GetPath() string
func (*UploadResponse) GetSize ¶
func (x *UploadResponse) GetSize() uint32
func (*UploadResponse) GetSuccess ¶
func (x *UploadResponse) GetSuccess() bool
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.