Documentation ¶
Index ¶
- Variables
- func RegisterGrpcStreamServiceServer(s *grpc.Server, srv GrpcStreamServiceServer)
- type FileChunk
- type GrpcStreamServiceClient
- type GrpcStreamServiceServer
- type GrpcStreamService_UploadClient
- type GrpcStreamService_UploadServer
- type UnimplementedGrpcStreamServiceServer
- type UploadStatus
- func (*UploadStatus) Descriptor() ([]byte, []int)deprecated
- func (x *UploadStatus) GetCode() UploadStatusCode
- func (x *UploadStatus) GetMessage() string
- func (*UploadStatus) ProtoMessage()
- func (x *UploadStatus) ProtoReflect() protoreflect.Message
- func (x *UploadStatus) Reset()
- func (x *UploadStatus) String() string
- type UploadStatusCode
- func (UploadStatusCode) Descriptor() protoreflect.EnumDescriptor
- func (x UploadStatusCode) Enum() *UploadStatusCode
- func (UploadStatusCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x UploadStatusCode) Number() protoreflect.EnumNumber
- func (x UploadStatusCode) String() string
- func (UploadStatusCode) Type() protoreflect.EnumType
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) GetContent ¶
func (*FileChunk) ProtoMessage ¶
func (*FileChunk) ProtoMessage()
func (*FileChunk) ProtoReflect ¶
func (x *FileChunk) ProtoReflect() protoreflect.Message
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.
func NewGrpcStreamServiceClient ¶
func NewGrpcStreamServiceClient(cc grpc.ClientConnInterface) GrpcStreamServiceClient
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 ¶
func (*UnimplementedGrpcStreamServiceServer) Upload(GrpcStreamService_UploadServer) error
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) Descriptor() protoreflect.EnumDescriptor
func (UploadStatusCode) Enum ¶
func (x UploadStatusCode) Enum() *UploadStatusCode
func (UploadStatusCode) EnumDescriptor
deprecated
func (UploadStatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use UploadStatusCode.Descriptor instead.
func (UploadStatusCode) Number ¶
func (x UploadStatusCode) Number() protoreflect.EnumNumber
func (UploadStatusCode) String ¶
func (x UploadStatusCode) String() string
func (UploadStatusCode) Type ¶
func (UploadStatusCode) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.