filestore

package
v0.8.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileStoreService_Upload_FullMethodName = "/services.filestore.FileStoreService/Upload"
)

Variables

View Source
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.

View Source
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)

View Source
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.

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 Server

type Server struct {
	FileStoreServiceServer
}

func (*Server) RegisterServer

func (s *Server) RegisterServer(srv *grpc.Server)

type UnimplementedFileStoreServiceServer

type UnimplementedFileStoreServiceServer struct {
}

UnimplementedFileStoreServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFileStoreServiceServer) Upload

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

Cause function returns cause value.

func (UploadRequestValidationError) Error

Error satisfies the builtin error interface

func (UploadRequestValidationError) ErrorName

func (e UploadRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UploadRequestValidationError) Field

Field function returns field value.

func (UploadRequestValidationError) Key

Key function returns key value.

func (UploadRequestValidationError) Reason

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

Cause function returns cause value.

func (UploadResponseValidationError) Error

Error satisfies the builtin error interface

func (UploadResponseValidationError) ErrorName

func (e UploadResponseValidationError) ErrorName() string

ErrorName returns error name.

func (UploadResponseValidationError) Field

Field function returns field value.

func (UploadResponseValidationError) Key

Key function returns key value.

func (UploadResponseValidationError) Reason

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) Enum

func (x UploadStatus) Enum() *UploadStatus

func (UploadStatus) EnumDescriptor deprecated

func (UploadStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use UploadStatus.Descriptor instead.

func (UploadStatus) Number

func (UploadStatus) String

func (x UploadStatus) String() string

func (UploadStatus) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL