grpc

package
v0.0.0-...-e03ad2d Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

Deprecated: Use Bucket.ProtoReflect.Descriptor instead.

func (*Bucket) GetCreated

func (x *Bucket) GetCreated() *timestamp.Timestamp

func (*Bucket) GetId

func (x *Bucket) GetId() int64

func (*Bucket) GetName

func (x *Bucket) GetName() string

func (*Bucket) GetUpdated

func (x *Bucket) GetUpdated() *timestamp.Timestamp

func (*Bucket) ProtoMessage

func (*Bucket) ProtoMessage()

func (*Bucket) ProtoReflect

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

func (*Bucket) Reset

func (x *Bucket) Reset()

func (*Bucket) String

func (x *Bucket) String() string

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.

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetBucketID

func (x *File) GetBucketID() int64

func (*File) GetCreated

func (x *File) GetCreated() *timestamp.Timestamp

func (*File) GetExtension

func (x *File) GetExtension() string

func (*File) GetId

func (x *File) GetId() int64

func (*File) GetMimeType

func (x *File) GetMimeType() string

func (*File) GetName

func (x *File) GetName() string

func (*File) GetSize

func (x *File) GetSize() uint64

func (*File) GetSizeAfterCompression

func (x *File) GetSizeAfterCompression() uint64

func (*File) GetUpdated

func (x *File) GetUpdated() *timestamp.Timestamp

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

Deprecated: Use FileArray.ProtoReflect.Descriptor instead.

func (*FileArray) GetFiles

func (x *FileArray) GetFiles() []*File

func (*FileArray) ProtoMessage

func (*FileArray) ProtoMessage()

func (*FileArray) ProtoReflect

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

func (*FileArray) Reset

func (x *FileArray) Reset()

func (*FileArray) String

func (x *FileArray) String() string

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

func (UnimplementedCDNGrpcServiceServer) DeleteFile

func (UnimplementedCDNGrpcServiceServer) DownloadFile

func (UnimplementedCDNGrpcServiceServer) GetFilesFromBucket

func (UnimplementedCDNGrpcServiceServer) SearchFiles

func (UnimplementedCDNGrpcServiceServer) UploadFile

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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