Documentation ¶
Index ¶
- Variables
- func RegisterCDNGrpcServiceServer(s grpc.ServiceRegistrar, srv CDNGrpcServiceServer)
- type Bucket
- func (*Bucket) Descriptor() ([]byte, []int)deprecated
- func (x *Bucket) GetCreated() *timestamp.Timestamp
- func (x *Bucket) GetId() int64
- func (x *Bucket) GetName() string
- func (x *Bucket) GetUpdated() *timestamp.Timestamp
- func (*Bucket) ProtoMessage()
- func (x *Bucket) ProtoReflect() protoreflect.Message
- func (x *Bucket) Reset()
- func (x *Bucket) String() string
- type BucketName
- type CDNGrpcServiceClient
- type CDNGrpcServiceServer
- type CDNGrpcService_DownloadFileClient
- type CDNGrpcService_DownloadFileServer
- type CDNGrpcService_UploadFileClient
- type CDNGrpcService_UploadFileServer
- type CreateBucketResponse
- func (*CreateBucketResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBucketResponse) GetId() int64
- func (*CreateBucketResponse) ProtoMessage()
- func (x *CreateBucketResponse) ProtoReflect() protoreflect.Message
- func (x *CreateBucketResponse) Reset()
- func (x *CreateBucketResponse) String() string
- type DeleteFileRequest
- func (*DeleteFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteFileRequest) GetBucket() string
- func (x *DeleteFileRequest) GetName() string
- func (*DeleteFileRequest) ProtoMessage()
- func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteFileRequest) Reset()
- func (x *DeleteFileRequest) String() string
- type DownlaodFileRespose
- func (*DownlaodFileRespose) Descriptor() ([]byte, []int)deprecated
- func (x *DownlaodFileRespose) GetChunkData() []byte
- func (*DownlaodFileRespose) ProtoMessage()
- func (x *DownlaodFileRespose) ProtoReflect() protoreflect.Message
- func (x *DownlaodFileRespose) Reset()
- func (x *DownlaodFileRespose) String() string
- type DownloadFileRequest
- func (*DownloadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadFileRequest) GetBucket() string
- func (x *DownloadFileRequest) GetName() string
- func (*DownloadFileRequest) ProtoMessage()
- func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message
- func (x *DownloadFileRequest) Reset()
- func (x *DownloadFileRequest) String() string
- type File
- func (*File) Descriptor() ([]byte, []int)deprecated
- func (x *File) GetBucketID() int64
- func (x *File) GetCreated() *timestamp.Timestamp
- func (x *File) GetExtension() string
- func (x *File) GetId() int64
- func (x *File) GetMimeType() string
- func (x *File) GetName() string
- func (x *File) GetSize() uint64
- func (x *File) GetSizeAfterCompression() uint64
- func (x *File) GetUpdated() *timestamp.Timestamp
- func (*File) ProtoMessage()
- func (x *File) ProtoReflect() protoreflect.Message
- func (x *File) Reset()
- func (x *File) String() string
- type FileArray
- type SearchRequest
- type UnimplementedCDNGrpcServiceServer
- func (UnimplementedCDNGrpcServiceServer) CreateBucket(context.Context, *BucketName) (*CreateBucketResponse, error)
- func (UnimplementedCDNGrpcServiceServer) DeleteBucket(context.Context, *BucketName) (*empty.Empty, error)
- func (UnimplementedCDNGrpcServiceServer) DeleteFile(context.Context, *DeleteFileRequest) (*empty.Empty, error)
- func (UnimplementedCDNGrpcServiceServer) DownloadFile(*DownloadFileRequest, CDNGrpcService_DownloadFileServer) error
- func (UnimplementedCDNGrpcServiceServer) GetFilesFromBucket(context.Context, *BucketName) (*FileArray, error)
- func (UnimplementedCDNGrpcServiceServer) SearchFiles(context.Context, *SearchRequest) (*FileArray, error)
- func (UnimplementedCDNGrpcServiceServer) UploadFile(CDNGrpcService_UploadFileServer) error
- type UnsafeCDNGrpcServiceServer
- type UploadFileRequest
- func (*UploadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileRequest) GetChunkData() []byte
- func (m *UploadFileRequest) GetData() isUploadFileRequest_Data
- func (x *UploadFileRequest) GetFile() *File
- func (*UploadFileRequest) ProtoMessage()
- func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
- func (x *UploadFileRequest) Reset()
- func (x *UploadFileRequest) String() string
- type UploadFileRequest_ChunkData
- type UploadFileRequest_File
- type UploadFileResponse
- func (*UploadFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileResponse) GetId() string
- func (x *UploadFileResponse) GetSize() uint32
- func (*UploadFileResponse) ProtoMessage()
- func (x *UploadFileResponse) ProtoReflect() protoreflect.Message
- func (x *UploadFileResponse) Reset()
- func (x *UploadFileResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var CDNGrpcService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CDNGrpcService", HandlerType: (*CDNGrpcServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SearchFiles", Handler: _CDNGrpcService_SearchFiles_Handler, }, { MethodName: "DeleteFile", Handler: _CDNGrpcService_DeleteFile_Handler, }, { MethodName: "CreateBucket", Handler: _CDNGrpcService_CreateBucket_Handler, }, { MethodName: "GetFilesFromBucket", Handler: _CDNGrpcService_GetFilesFromBucket_Handler, }, { MethodName: "DeleteBucket", Handler: _CDNGrpcService_DeleteBucket_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "UploadFile", Handler: _CDNGrpcService_UploadFile_Handler, ClientStreams: true, }, { StreamName: "DownloadFile", Handler: _CDNGrpcService_DownloadFile_Handler, ServerStreams: true, }, }, Metadata: "grpc.proto", }
CDNGrpcService_ServiceDesc is the grpc.ServiceDesc for CDNGrpcService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_grpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCDNGrpcServiceServer ¶
func RegisterCDNGrpcServiceServer(s grpc.ServiceRegistrar, srv CDNGrpcServiceServer)
Types ¶
type Bucket ¶
type Bucket struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Created *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` Updated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*Bucket) Descriptor
deprecated
func (*Bucket) GetCreated ¶
func (*Bucket) GetUpdated ¶
func (*Bucket) ProtoMessage ¶
func (*Bucket) ProtoMessage()
func (*Bucket) ProtoReflect ¶
func (x *Bucket) ProtoReflect() protoreflect.Message
type BucketName ¶
type BucketName struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*BucketName) Descriptor
deprecated
func (*BucketName) Descriptor() ([]byte, []int)
Deprecated: Use BucketName.ProtoReflect.Descriptor instead.
func (*BucketName) GetName ¶
func (x *BucketName) GetName() string
func (*BucketName) ProtoMessage ¶
func (*BucketName) ProtoMessage()
func (*BucketName) ProtoReflect ¶
func (x *BucketName) ProtoReflect() protoreflect.Message
func (*BucketName) Reset ¶
func (x *BucketName) Reset()
func (*BucketName) String ¶
func (x *BucketName) String() string
type CDNGrpcServiceClient ¶
type CDNGrpcServiceClient interface { UploadFile(ctx context.Context, opts ...grpc.CallOption) (CDNGrpcService_UploadFileClient, error) DownloadFile(ctx context.Context, in *DownloadFileRequest, opts ...grpc.CallOption) (CDNGrpcService_DownloadFileClient, error) SearchFiles(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*FileArray, error) DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*empty.Empty, error) CreateBucket(ctx context.Context, in *BucketName, opts ...grpc.CallOption) (*CreateBucketResponse, error) GetFilesFromBucket(ctx context.Context, in *BucketName, opts ...grpc.CallOption) (*FileArray, error) DeleteBucket(ctx context.Context, in *BucketName, opts ...grpc.CallOption) (*empty.Empty, error) }
CDNGrpcServiceClient is the client API for CDNGrpcService 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 NewCDNGrpcServiceClient ¶
func NewCDNGrpcServiceClient(cc grpc.ClientConnInterface) CDNGrpcServiceClient
type CDNGrpcServiceServer ¶
type CDNGrpcServiceServer interface { UploadFile(CDNGrpcService_UploadFileServer) error DownloadFile(*DownloadFileRequest, CDNGrpcService_DownloadFileServer) error SearchFiles(context.Context, *SearchRequest) (*FileArray, error) DeleteFile(context.Context, *DeleteFileRequest) (*empty.Empty, error) CreateBucket(context.Context, *BucketName) (*CreateBucketResponse, error) GetFilesFromBucket(context.Context, *BucketName) (*FileArray, error) DeleteBucket(context.Context, *BucketName) (*empty.Empty, error) // contains filtered or unexported methods }
CDNGrpcServiceServer is the server API for CDNGrpcService service. All implementations must embed UnimplementedCDNGrpcServiceServer for forward compatibility
type CDNGrpcService_DownloadFileClient ¶
type CDNGrpcService_DownloadFileClient interface { Recv() (*DownlaodFileRespose, error) grpc.ClientStream }
type CDNGrpcService_DownloadFileServer ¶
type CDNGrpcService_DownloadFileServer interface { Send(*DownlaodFileRespose) error grpc.ServerStream }
type CDNGrpcService_UploadFileClient ¶
type CDNGrpcService_UploadFileClient interface { Send(*UploadFileRequest) error CloseAndRecv() (*UploadFileResponse, error) grpc.ClientStream }
type CDNGrpcService_UploadFileServer ¶
type CDNGrpcService_UploadFileServer interface { SendAndClose(*UploadFileResponse) error Recv() (*UploadFileRequest, error) grpc.ServerStream }
type CreateBucketResponse ¶
type CreateBucketResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateBucketResponse) Descriptor
deprecated
func (*CreateBucketResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateBucketResponse.ProtoReflect.Descriptor instead.
func (*CreateBucketResponse) GetId ¶
func (x *CreateBucketResponse) GetId() int64
func (*CreateBucketResponse) ProtoMessage ¶
func (*CreateBucketResponse) ProtoMessage()
func (*CreateBucketResponse) ProtoReflect ¶
func (x *CreateBucketResponse) ProtoReflect() protoreflect.Message
func (*CreateBucketResponse) Reset ¶
func (x *CreateBucketResponse) Reset()
func (*CreateBucketResponse) String ¶
func (x *CreateBucketResponse) String() string
type DeleteFileRequest ¶
type DeleteFileRequest struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*DeleteFileRequest) Descriptor
deprecated
func (*DeleteFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead.
func (*DeleteFileRequest) GetBucket ¶
func (x *DeleteFileRequest) GetBucket() string
func (*DeleteFileRequest) GetName ¶
func (x *DeleteFileRequest) GetName() string
func (*DeleteFileRequest) ProtoMessage ¶
func (*DeleteFileRequest) ProtoMessage()
func (*DeleteFileRequest) ProtoReflect ¶
func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message
func (*DeleteFileRequest) Reset ¶
func (x *DeleteFileRequest) Reset()
func (*DeleteFileRequest) String ¶
func (x *DeleteFileRequest) String() string
type DownlaodFileRespose ¶
type DownlaodFileRespose struct { ChunkData []byte `protobuf:"bytes,1,opt,name=chunk_data,json=chunkData,proto3" json:"chunk_data,omitempty"` // contains filtered or unexported fields }
func (*DownlaodFileRespose) Descriptor
deprecated
func (*DownlaodFileRespose) Descriptor() ([]byte, []int)
Deprecated: Use DownlaodFileRespose.ProtoReflect.Descriptor instead.
func (*DownlaodFileRespose) GetChunkData ¶
func (x *DownlaodFileRespose) GetChunkData() []byte
func (*DownlaodFileRespose) ProtoMessage ¶
func (*DownlaodFileRespose) ProtoMessage()
func (*DownlaodFileRespose) ProtoReflect ¶
func (x *DownlaodFileRespose) ProtoReflect() protoreflect.Message
func (*DownlaodFileRespose) Reset ¶
func (x *DownlaodFileRespose) Reset()
func (*DownlaodFileRespose) String ¶
func (x *DownlaodFileRespose) String() string
type DownloadFileRequest ¶
type DownloadFileRequest struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*DownloadFileRequest) Descriptor
deprecated
func (*DownloadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use DownloadFileRequest.ProtoReflect.Descriptor instead.
func (*DownloadFileRequest) GetBucket ¶
func (x *DownloadFileRequest) GetBucket() string
func (*DownloadFileRequest) GetName ¶
func (x *DownloadFileRequest) GetName() string
func (*DownloadFileRequest) ProtoMessage ¶
func (*DownloadFileRequest) ProtoMessage()
func (*DownloadFileRequest) ProtoReflect ¶
func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message
func (*DownloadFileRequest) Reset ¶
func (x *DownloadFileRequest) Reset()
func (*DownloadFileRequest) String ¶
func (x *DownloadFileRequest) String() string
type File ¶
type File struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` BucketID int64 `protobuf:"varint,3,opt,name=bucketID,proto3" json:"bucketID,omitempty"` Size uint64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` SizeAfterCompression uint64 `protobuf:"varint,5,opt,name=sizeAfterCompression,proto3" json:"sizeAfterCompression,omitempty"` Extension string `protobuf:"bytes,6,opt,name=extension,proto3" json:"extension,omitempty"` MimeType string `protobuf:"bytes,7,opt,name=mimeType,proto3" json:"mimeType,omitempty"` Created *timestamp.Timestamp `protobuf:"bytes,8,opt,name=created,proto3" json:"created,omitempty"` Updated *timestamp.Timestamp `protobuf:"bytes,9,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetBucketID ¶
func (*File) GetCreated ¶
func (*File) GetExtension ¶
func (*File) GetMimeType ¶
func (*File) GetSizeAfterCompression ¶
func (*File) GetUpdated ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileArray ¶
type FileArray struct { Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*FileArray) Descriptor
deprecated
func (*FileArray) ProtoMessage ¶
func (*FileArray) ProtoMessage()
func (*FileArray) ProtoReflect ¶
func (x *FileArray) ProtoReflect() protoreflect.Message
type SearchRequest ¶
type SearchRequest struct { Phrase string `protobuf:"bytes,1,opt,name=phrase,proto3" json:"phrase,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetPhrase ¶
func (x *SearchRequest) GetPhrase() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type UnimplementedCDNGrpcServiceServer ¶
type UnimplementedCDNGrpcServiceServer struct { }
UnimplementedCDNGrpcServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCDNGrpcServiceServer) CreateBucket ¶
func (UnimplementedCDNGrpcServiceServer) CreateBucket(context.Context, *BucketName) (*CreateBucketResponse, error)
func (UnimplementedCDNGrpcServiceServer) DeleteBucket ¶
func (UnimplementedCDNGrpcServiceServer) DeleteBucket(context.Context, *BucketName) (*empty.Empty, error)
func (UnimplementedCDNGrpcServiceServer) DeleteFile ¶
func (UnimplementedCDNGrpcServiceServer) DeleteFile(context.Context, *DeleteFileRequest) (*empty.Empty, error)
func (UnimplementedCDNGrpcServiceServer) DownloadFile ¶
func (UnimplementedCDNGrpcServiceServer) DownloadFile(*DownloadFileRequest, CDNGrpcService_DownloadFileServer) error
func (UnimplementedCDNGrpcServiceServer) GetFilesFromBucket ¶
func (UnimplementedCDNGrpcServiceServer) GetFilesFromBucket(context.Context, *BucketName) (*FileArray, error)
func (UnimplementedCDNGrpcServiceServer) SearchFiles ¶
func (UnimplementedCDNGrpcServiceServer) SearchFiles(context.Context, *SearchRequest) (*FileArray, error)
func (UnimplementedCDNGrpcServiceServer) UploadFile ¶
func (UnimplementedCDNGrpcServiceServer) UploadFile(CDNGrpcService_UploadFileServer) error
type UnsafeCDNGrpcServiceServer ¶
type UnsafeCDNGrpcServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCDNGrpcServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CDNGrpcServiceServer will result in compilation errors.
type UploadFileRequest ¶
type UploadFileRequest struct { // Types that are assignable to Data: // *UploadFileRequest_File // *UploadFileRequest_ChunkData Data isUploadFileRequest_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*UploadFileRequest) Descriptor
deprecated
func (*UploadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead.
func (*UploadFileRequest) GetChunkData ¶
func (x *UploadFileRequest) GetChunkData() []byte
func (*UploadFileRequest) GetData ¶
func (m *UploadFileRequest) GetData() isUploadFileRequest_Data
func (*UploadFileRequest) GetFile ¶
func (x *UploadFileRequest) GetFile() *File
func (*UploadFileRequest) ProtoMessage ¶
func (*UploadFileRequest) ProtoMessage()
func (*UploadFileRequest) ProtoReflect ¶
func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
func (*UploadFileRequest) Reset ¶
func (x *UploadFileRequest) Reset()
func (*UploadFileRequest) String ¶
func (x *UploadFileRequest) String() string
type UploadFileRequest_ChunkData ¶
type UploadFileRequest_ChunkData struct {
ChunkData []byte `protobuf:"bytes,2,opt,name=chunkData,proto3,oneof"`
}
type UploadFileRequest_File ¶
type UploadFileRequest_File struct {
File *File `protobuf:"bytes,1,opt,name=file,proto3,oneof"`
}
type UploadFileResponse ¶
type UploadFileResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*UploadFileResponse) Descriptor
deprecated
func (*UploadFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileResponse.ProtoReflect.Descriptor instead.
func (*UploadFileResponse) GetId ¶
func (x *UploadFileResponse) GetId() string
func (*UploadFileResponse) GetSize ¶
func (x *UploadFileResponse) GetSize() uint32
func (*UploadFileResponse) ProtoMessage ¶
func (*UploadFileResponse) ProtoMessage()
func (*UploadFileResponse) ProtoReflect ¶
func (x *UploadFileResponse) ProtoReflect() protoreflect.Message
func (*UploadFileResponse) Reset ¶
func (x *UploadFileResponse) Reset()
func (*UploadFileResponse) String ¶
func (x *UploadFileResponse) String() string