Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterStorageHTTPServer(s *http.Server, srv StorageHTTPServer)
- func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
- func Storage_DownloadFile_Extend_HTTP_Handler(srv StorageHTTPServer) func(ctx http.Context) error
- func Storage_UploadFile_Extend_HTTP_Handler(srv StorageHTTPServer) func(ctx http.Context) error
- type CreateDirReply
- type CreateDirRequest
- func (*CreateDirRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateDirRequest) GetName() string
- func (x *CreateDirRequest) GetParentId() string
- func (*CreateDirRequest) ProtoMessage()
- func (x *CreateDirRequest) ProtoReflect() protoreflect.Message
- func (x *CreateDirRequest) Reset()
- func (x *CreateDirRequest) String() string
- type DeleteReply
- type DeleteRequest
- type DownloadReply
- func (*DownloadReply) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadReply) GetBody() []byte
- func (x *DownloadReply) GetName() string
- func (*DownloadReply) ProtoMessage()
- func (x *DownloadReply) ProtoReflect() protoreflect.Message
- func (x *DownloadReply) Reset()
- func (x *DownloadReply) String() string
- type DownloadRequest
- type File
- func (*File) Descriptor() ([]byte, []int)deprecated
- func (x *File) GetCid() string
- func (x *File) GetId() string
- func (x *File) GetLastModify() int64
- func (x *File) GetName() string
- func (x *File) GetSize() int32
- func (x *File) GetType() FileType
- func (*File) ProtoMessage()
- func (x *File) ProtoReflect() protoreflect.Message
- func (x *File) Reset()
- func (x *File) String() string
- type FileType
- type ListReply
- type ListRequest
- type StorageClient
- type StorageHTTPClient
- type StorageHTTPClientImpl
- func (c *StorageHTTPClientImpl) CreateDir(ctx context.Context, in *CreateDirRequest, opts ...http.CallOption) (*CreateDirReply, error)
- func (c *StorageHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*DeleteReply, error)
- func (c *StorageHTTPClientImpl) Download(ctx context.Context, in *DownloadRequest, opts ...http.CallOption) (*DownloadReply, error)
- func (c *StorageHTTPClientImpl) List(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListReply, error)
- func (c *StorageHTTPClientImpl) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...http.CallOption) (*File, error)
- type StorageHTTPServer
- type StorageServer
- type UnimplementedStorageServer
- func (UnimplementedStorageServer) CreateDir(context.Context, *CreateDirRequest) (*CreateDirReply, error)
- func (UnimplementedStorageServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
- func (UnimplementedStorageServer) Download(context.Context, *DownloadRequest) (*DownloadReply, error)
- func (UnimplementedStorageServer) List(context.Context, *ListRequest) (*ListReply, error)
- func (UnimplementedStorageServer) UploadFile(context.Context, *UploadFileRequest) (*File, error)
- type UnsafeStorageServer
- type UploadFileRequest
- func (*UploadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileRequest) GetBody() []byte
- func (x *UploadFileRequest) GetName() string
- func (x *UploadFileRequest) GetParentId() string
- func (*UploadFileRequest) ProtoMessage()
- func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
- func (x *UploadFileRequest) Reset()
- func (x *UploadFileRequest) String() string
Constants ¶
const ( Storage_List_FullMethodName = "/api.compute.v1.Storage/List" Storage_UploadFile_FullMethodName = "/api.compute.v1.Storage/UploadFile" Storage_CreateDir_FullMethodName = "/api.compute.v1.Storage/CreateDir" Storage_Download_FullMethodName = "/api.compute.v1.Storage/Download" Storage_Delete_FullMethodName = "/api.compute.v1.Storage/Delete" )
const OperationStorageCreateDir = "/api.compute.v1.Storage/CreateDir"
const OperationStorageDelete = "/api.compute.v1.Storage/Delete"
const OperationStorageDownload = "/api.compute.v1.Storage/Download"
const OperationStorageList = "/api.compute.v1.Storage/List"
const OperationStorageUploadFile = "/api.compute.v1.Storage/UploadFile"
Variables ¶
var ( FileType_name = map[int32]string{ 0: "DIR", 1: "FILE", } FileType_value = map[string]int32{ "DIR": 0, "FILE": 1, } )
Enum value maps for FileType.
var File_api_compute_v1_storage_proto protoreflect.FileDescriptor
var Storage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.compute.v1.Storage", HandlerType: (*StorageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _Storage_List_Handler, }, { MethodName: "UploadFile", Handler: _Storage_UploadFile_Handler, }, { MethodName: "CreateDir", Handler: _Storage_CreateDir_Handler, }, { MethodName: "Download", Handler: _Storage_Download_Handler, }, { MethodName: "Delete", Handler: _Storage_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/compute/v1/storage.proto", }
Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStorageHTTPServer ¶
func RegisterStorageHTTPServer(s *http.Server, srv StorageHTTPServer)
func RegisterStorageServer ¶
func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
func Storage_DownloadFile_Extend_HTTP_Handler ¶
func Storage_DownloadFile_Extend_HTTP_Handler(srv StorageHTTPServer) func(ctx http.Context) error
func Storage_UploadFile_Extend_HTTP_Handler ¶
func Storage_UploadFile_Extend_HTTP_Handler(srv StorageHTTPServer) func(ctx http.Context) error
Types ¶
type CreateDirReply ¶
type CreateDirReply struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*CreateDirReply) Descriptor
deprecated
func (*CreateDirReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateDirReply.ProtoReflect.Descriptor instead.
func (*CreateDirReply) GetId ¶
func (x *CreateDirReply) GetId() string
func (*CreateDirReply) ProtoMessage ¶
func (*CreateDirReply) ProtoMessage()
func (*CreateDirReply) ProtoReflect ¶
func (x *CreateDirReply) ProtoReflect() protoreflect.Message
func (*CreateDirReply) Reset ¶
func (x *CreateDirReply) Reset()
func (*CreateDirReply) String ¶
func (x *CreateDirReply) String() string
type CreateDirRequest ¶
type CreateDirRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
// contains filtered or unexported fields
}
func (*CreateDirRequest) Descriptor
deprecated
func (*CreateDirRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateDirRequest.ProtoReflect.Descriptor instead.
func (*CreateDirRequest) GetName ¶
func (x *CreateDirRequest) GetName() string
func (*CreateDirRequest) GetParentId ¶
func (x *CreateDirRequest) GetParentId() string
func (*CreateDirRequest) ProtoMessage ¶
func (*CreateDirRequest) ProtoMessage()
func (*CreateDirRequest) ProtoReflect ¶
func (x *CreateDirRequest) ProtoReflect() protoreflect.Message
func (*CreateDirRequest) Reset ¶
func (x *CreateDirRequest) Reset()
func (*CreateDirRequest) String ¶
func (x *CreateDirRequest) String() string
type DeleteReply ¶
type DeleteReply struct {
// contains filtered or unexported fields
}
func (*DeleteReply) Descriptor
deprecated
func (*DeleteReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteReply.ProtoReflect.Descriptor instead.
func (*DeleteReply) ProtoMessage ¶
func (*DeleteReply) ProtoMessage()
func (*DeleteReply) ProtoReflect ¶
func (x *DeleteReply) ProtoReflect() protoreflect.Message
func (*DeleteReply) Reset ¶
func (x *DeleteReply) Reset()
func (*DeleteReply) String ¶
func (x *DeleteReply) String() string
type DeleteRequest ¶
type DeleteRequest struct {
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetIds ¶
func (x *DeleteRequest) GetIds() []string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DownloadReply ¶
type DownloadReply struct {
Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*DownloadReply) Descriptor
deprecated
func (*DownloadReply) Descriptor() ([]byte, []int)
Deprecated: Use DownloadReply.ProtoReflect.Descriptor instead.
func (*DownloadReply) GetBody ¶
func (x *DownloadReply) GetBody() []byte
func (*DownloadReply) GetName ¶
func (x *DownloadReply) GetName() string
func (*DownloadReply) ProtoMessage ¶
func (*DownloadReply) ProtoMessage()
func (*DownloadReply) ProtoReflect ¶
func (x *DownloadReply) ProtoReflect() protoreflect.Message
func (*DownloadReply) Reset ¶
func (x *DownloadReply) Reset()
func (*DownloadReply) String ¶
func (x *DownloadReply) String() string
type DownloadRequest ¶
type DownloadRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DownloadRequest) Descriptor
deprecated
func (*DownloadRequest) Descriptor() ([]byte, []int)
Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.
func (*DownloadRequest) GetId ¶
func (x *DownloadRequest) GetId() string
func (*DownloadRequest) ProtoMessage ¶
func (*DownloadRequest) ProtoMessage()
func (*DownloadRequest) ProtoReflect ¶
func (x *DownloadRequest) ProtoReflect() protoreflect.Message
func (*DownloadRequest) Reset ¶
func (x *DownloadRequest) Reset()
func (*DownloadRequest) String ¶
func (x *DownloadRequest) String() string
type File ¶
type File struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type FileType `protobuf:"varint,2,opt,name=type,proto3,enum=api.compute.v1.FileType" json:"type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
LastModify int64 `protobuf:"varint,5,opt,name=last_modify,json=lastModify,proto3" json:"last_modify,omitempty"`
Cid *string `protobuf:"bytes,6,opt,name=cid,proto3,oneof" json:"cid,omitempty"`
// contains filtered or unexported fields
}
func (*File) Descriptor
deprecated
func (*File) GetLastModify ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileType ¶
type FileType int32
func (FileType) Descriptor ¶
func (FileType) Descriptor() protoreflect.EnumDescriptor
func (FileType) EnumDescriptor
deprecated
func (FileType) Number ¶
func (x FileType) Number() protoreflect.EnumNumber
func (FileType) Type ¶
func (FileType) Type() protoreflect.EnumType
type ListReply ¶
type ListReply struct {
Result []*File `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*ListReply) Descriptor
deprecated
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct {
ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetParentId ¶
func (x *ListRequest) GetParentId() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type StorageClient ¶
type StorageClient interface {
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
UploadFile(ctx context.Context, in *UploadFileRequest, opts ...grpc.CallOption) (*File, error)
CreateDir(ctx context.Context, in *CreateDirRequest, opts ...grpc.CallOption) (*CreateDirReply, error)
Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*DownloadReply, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error)
}
StorageClient is the client API for Storage 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 NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageHTTPClient ¶
type StorageHTTPClient interface {
CreateDir(ctx context.Context, req *CreateDirRequest, opts ...http.CallOption) (rsp *CreateDirReply, err error)
Delete(ctx context.Context, req *DeleteRequest, opts ...http.CallOption) (rsp *DeleteReply, err error)
Download(ctx context.Context, req *DownloadRequest, opts ...http.CallOption) (rsp *DownloadReply, err error)
List(ctx context.Context, req *ListRequest, opts ...http.CallOption) (rsp *ListReply, err error)
UploadFile(ctx context.Context, req *UploadFileRequest, opts ...http.CallOption) (rsp *File, err error)
}
func NewStorageHTTPClient ¶
func NewStorageHTTPClient(client *http.Client) StorageHTTPClient
type StorageHTTPClientImpl ¶
type StorageHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*StorageHTTPClientImpl) CreateDir ¶
func (c *StorageHTTPClientImpl) CreateDir(ctx context.Context, in *CreateDirRequest, opts ...http.CallOption) (*CreateDirReply, error)
func (*StorageHTTPClientImpl) Delete ¶
func (c *StorageHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*DeleteReply, error)
func (*StorageHTTPClientImpl) Download ¶
func (c *StorageHTTPClientImpl) Download(ctx context.Context, in *DownloadRequest, opts ...http.CallOption) (*DownloadReply, error)
func (*StorageHTTPClientImpl) List ¶
func (c *StorageHTTPClientImpl) List(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListReply, error)
func (*StorageHTTPClientImpl) UploadFile ¶
func (c *StorageHTTPClientImpl) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...http.CallOption) (*File, error)
type StorageHTTPServer ¶
type StorageHTTPServer interface {
CreateDir(context.Context, *CreateDirRequest) (*CreateDirReply, error)
Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
Download(context.Context, *DownloadRequest) (*DownloadReply, error)
List(context.Context, *ListRequest) (*ListReply, error)
UploadFile(context.Context, *UploadFileRequest) (*File, error)
}
type StorageServer ¶
type StorageServer interface {
List(context.Context, *ListRequest) (*ListReply, error)
UploadFile(context.Context, *UploadFileRequest) (*File, error)
CreateDir(context.Context, *CreateDirRequest) (*CreateDirReply, error)
Download(context.Context, *DownloadRequest) (*DownloadReply, error)
Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
// contains filtered or unexported methods
}
StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct {
}
UnimplementedStorageServer must be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) CreateDir ¶
func (UnimplementedStorageServer) CreateDir(context.Context, *CreateDirRequest) (*CreateDirReply, error)
func (UnimplementedStorageServer) Delete ¶
func (UnimplementedStorageServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
func (UnimplementedStorageServer) Download ¶
func (UnimplementedStorageServer) Download(context.Context, *DownloadRequest) (*DownloadReply, error)
func (UnimplementedStorageServer) List ¶
func (UnimplementedStorageServer) List(context.Context, *ListRequest) (*ListReply, error)
func (UnimplementedStorageServer) UploadFile ¶
func (UnimplementedStorageServer) UploadFile(context.Context, *UploadFileRequest) (*File, error)
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.
type UploadFileRequest ¶
type UploadFileRequest struct {
Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ParentId *string `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3,oneof" json:"parent_id,omitempty"`
// contains filtered or unexported fields
}
func (*UploadFileRequest) Descriptor
deprecated
func (*UploadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead.
func (*UploadFileRequest) GetBody ¶
func (x *UploadFileRequest) GetBody() []byte
func (*UploadFileRequest) GetName ¶
func (x *UploadFileRequest) GetName() string
func (*UploadFileRequest) GetParentId ¶
func (x *UploadFileRequest) GetParentId() string
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