pkg

package
v0.0.0-...-45a0844 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFileServer

func RegisterFileServer(s *grpc.Server, srv FileServer)

Types

type Chunk

type Chunk struct {
	Data                 []byte    `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Meta                 *Metadata `protobuf:"bytes,2,opt,name=meta" json:"meta,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

The request message containing the user's name.

func (*Chunk) Descriptor

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

func (*Chunk) GetData

func (m *Chunk) GetData() []byte

func (*Chunk) GetMeta

func (m *Chunk) GetMeta() *Metadata

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) Reset

func (m *Chunk) Reset()

func (*Chunk) String

func (m *Chunk) String() string

func (*Chunk) XXX_DiscardUnknown

func (m *Chunk) XXX_DiscardUnknown()

func (*Chunk) XXX_Marshal

func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Chunk) XXX_Merge

func (dst *Chunk) XXX_Merge(src proto.Message)

func (*Chunk) XXX_Size

func (m *Chunk) XXX_Size() int

func (*Chunk) XXX_Unmarshal

func (m *Chunk) XXX_Unmarshal(b []byte) error

type FileClient

type FileClient interface {
	Upload(ctx context.Context, in *Chunk, opts ...grpc.CallOption) (*UploadResponse, error)
	UploadStream(ctx context.Context, opts ...grpc.CallOption) (File_UploadStreamClient, error)
}

FileClient is the client API for File service.

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

func NewFileClient

func NewFileClient(cc *grpc.ClientConn) FileClient

type FileServer

type FileServer interface {
	Upload(context.Context, *Chunk) (*UploadResponse, error)
	UploadStream(File_UploadStreamServer) error
}

FileServer is the server API for File service.

type File_UploadStreamClient

type File_UploadStreamClient interface {
	Send(*Chunk) error
	CloseAndRecv() (*UploadResponse, error)
	grpc.ClientStream
}

type File_UploadStreamServer

type File_UploadStreamServer interface {
	SendAndClose(*UploadResponse) error
	Recv() (*Chunk, error)
	grpc.ServerStream
}

type Metadata

type Metadata struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Metadata) Descriptor

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

func (*Metadata) GetName

func (m *Metadata) GetName() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (dst *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

type UploadResponse

type UploadResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UploadResponse) Descriptor

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

func (*UploadResponse) ProtoMessage

func (*UploadResponse) ProtoMessage()

func (*UploadResponse) Reset

func (m *UploadResponse) Reset()

func (*UploadResponse) String

func (m *UploadResponse) String() string

func (*UploadResponse) XXX_DiscardUnknown

func (m *UploadResponse) XXX_DiscardUnknown()

func (*UploadResponse) XXX_Marshal

func (m *UploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UploadResponse) XXX_Merge

func (dst *UploadResponse) XXX_Merge(src proto.Message)

func (*UploadResponse) XXX_Size

func (m *UploadResponse) XXX_Size() int

func (*UploadResponse) XXX_Unmarshal

func (m *UploadResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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