api

package
v0.0.0-...-3b994bf Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UploadStatusCode_name = map[int32]string{
		0: "STATUS_CODE_UNKNOWN",
		1: "STATUS_CODE_OK",
		2: "STATUS_CODE_FAILED",
	}
	UploadStatusCode_value = map[string]int32{
		"STATUS_CODE_UNKNOWN": 0,
		"STATUS_CODE_OK":      1,
		"STATUS_CODE_FAILED":  2,
	}
)

Enum value maps for UploadStatusCode.

View Source
var File_github_com_amazingchow_photon_dance_grpc_examples_grpc_file_transfer_tool_pb_messages_proto protoreflect.FileDescriptor

Functions

func RegisterGrpcStreamServiceServer

func RegisterGrpcStreamServiceServer(s *grpc.Server, srv GrpcStreamServiceServer)

Types

type FileChunk

type FileChunk struct {
	Content []byte `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"`
	// contains filtered or unexported fields
}

func (*FileChunk) Descriptor deprecated

func (*FileChunk) Descriptor() ([]byte, []int)

Deprecated: Use FileChunk.ProtoReflect.Descriptor instead.

func (*FileChunk) GetContent

func (x *FileChunk) GetContent() []byte

func (*FileChunk) ProtoMessage

func (*FileChunk) ProtoMessage()

func (*FileChunk) ProtoReflect

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

func (*FileChunk) Reset

func (x *FileChunk) Reset()

func (*FileChunk) String

func (x *FileChunk) String() string

type GrpcStreamServiceClient

type GrpcStreamServiceClient interface {
	Upload(ctx context.Context, opts ...grpc.CallOption) (GrpcStreamService_UploadClient, error)
}

GrpcStreamServiceClient is the client API for GrpcStreamService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type GrpcStreamServiceServer

type GrpcStreamServiceServer interface {
	Upload(GrpcStreamService_UploadServer) error
}

GrpcStreamServiceServer is the server API for GrpcStreamService service.

type GrpcStreamService_UploadClient

type GrpcStreamService_UploadClient interface {
	Send(*FileChunk) error
	CloseAndRecv() (*UploadStatus, error)
	grpc.ClientStream
}

type GrpcStreamService_UploadServer

type GrpcStreamService_UploadServer interface {
	SendAndClose(*UploadStatus) error
	Recv() (*FileChunk, error)
	grpc.ServerStream
}

type UnimplementedGrpcStreamServiceServer

type UnimplementedGrpcStreamServiceServer struct {
}

UnimplementedGrpcStreamServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedGrpcStreamServiceServer) Upload

type UploadStatus

type UploadStatus struct {
	Message string           `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
	Code    UploadStatusCode `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UploadStatus) Descriptor deprecated

func (*UploadStatus) Descriptor() ([]byte, []int)

Deprecated: Use UploadStatus.ProtoReflect.Descriptor instead.

func (*UploadStatus) GetCode

func (x *UploadStatus) GetCode() UploadStatusCode

func (*UploadStatus) GetMessage

func (x *UploadStatus) GetMessage() string

func (*UploadStatus) ProtoMessage

func (*UploadStatus) ProtoMessage()

func (*UploadStatus) ProtoReflect

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

func (*UploadStatus) Reset

func (x *UploadStatus) Reset()

func (*UploadStatus) String

func (x *UploadStatus) String() string

type UploadStatusCode

type UploadStatusCode int32
const (
	UploadStatusCode_STATUS_CODE_UNKNOWN UploadStatusCode = 0
	UploadStatusCode_STATUS_CODE_OK      UploadStatusCode = 1
	UploadStatusCode_STATUS_CODE_FAILED  UploadStatusCode = 2
)

func (UploadStatusCode) Descriptor

func (UploadStatusCode) Enum

func (UploadStatusCode) EnumDescriptor deprecated

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

Deprecated: Use UploadStatusCode.Descriptor instead.

func (UploadStatusCode) Number

func (UploadStatusCode) String

func (x UploadStatusCode) String() string

func (UploadStatusCode) Type

Jump to

Keyboard shortcuts

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