v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const OperationStorageCreateDir = "/api.compute.v1.Storage/CreateDir"
View Source
const OperationStorageDelete = "/api.compute.v1.Storage/Delete"
View Source
const OperationStorageDownload = "/api.compute.v1.Storage/Download"
View Source
const OperationStorageList = "/api.compute.v1.Storage/List"
View Source
const OperationStorageUploadFile = "/api.compute.v1.Storage/UploadFile"

Variables

View Source
var (
	FileType_name = map[int32]string{
		0: "DIR",
		1: "FILE",
	}
	FileType_value = map[string]int32{
		"DIR":  0,
		"FILE": 1,
	}
)

Enum value maps for FileType.

View Source
var File_api_compute_v1_storage_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetCid

func (x *File) GetCid() string

func (*File) GetId

func (x *File) GetId() string

func (*File) GetLastModify

func (x *File) GetLastModify() int64

func (*File) GetName

func (x *File) GetName() string

func (*File) GetSize

func (x *File) GetSize() int32

func (*File) GetType

func (x *File) GetType() FileType

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type FileType

type FileType int32
const (
	FileType_DIR  FileType = 0
	FileType_FILE FileType = 1
)

func (FileType) Descriptor

func (FileType) Descriptor() protoreflect.EnumDescriptor

func (FileType) Enum

func (x FileType) Enum() *FileType

func (FileType) EnumDescriptor deprecated

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

Deprecated: Use FileType.Descriptor instead.

func (FileType) Number

func (x FileType) Number() protoreflect.EnumNumber

func (FileType) String

func (x FileType) String() string

func (FileType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use ListReply.ProtoReflect.Descriptor instead.

func (*ListReply) GetResult

func (x *ListReply) GetResult() []*File

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) ProtoReflect

func (x *ListReply) ProtoReflect() protoreflect.Message

func (*ListReply) Reset

func (x *ListReply) Reset()

func (*ListReply) String

func (x *ListReply) String() string

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 (*StorageHTTPClientImpl) Delete

func (*StorageHTTPClientImpl) Download

func (*StorageHTTPClientImpl) List

func (*StorageHTTPClientImpl) UploadFile

func (c *StorageHTTPClientImpl) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...http.CallOption) (*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) Delete

func (UnimplementedStorageServer) Download

func (UnimplementedStorageServer) List

func (UnimplementedStorageServer) UploadFile

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

Jump to

Keyboard shortcuts

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