grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthContacts = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowContacts   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterContactsServer

func RegisterContactsServer(s *grpc.Server, srv ContactsServer)

Types

type Contact

type Contact struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	PeerId               []byte   `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The contact message containing the name and peer ID.

func (*Contact) Descriptor

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

func (*Contact) GetName

func (m *Contact) GetName() string

func (*Contact) GetPeerId

func (m *Contact) GetPeerId() []byte

func (*Contact) Marshal

func (m *Contact) Marshal() (dAtA []byte, err error)

func (*Contact) MarshalTo

func (m *Contact) MarshalTo(dAtA []byte) (int, error)

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) Reset

func (m *Contact) Reset()

func (*Contact) Size

func (m *Contact) Size() (n int)

func (*Contact) String

func (m *Contact) String() string

func (*Contact) Unmarshal

func (m *Contact) Unmarshal(dAtA []byte) error

func (*Contact) XXX_DiscardUnknown added in v0.2.0

func (m *Contact) XXX_DiscardUnknown()

func (*Contact) XXX_Marshal added in v0.2.0

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

func (*Contact) XXX_Merge added in v0.2.0

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

func (*Contact) XXX_Size added in v0.2.0

func (m *Contact) XXX_Size() int

func (*Contact) XXX_Unmarshal added in v0.2.0

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

type ContactsClient

type ContactsClient interface {
	// Streams all the contacts.
	List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (Contacts_ListClient, error)
	// Returns a contact.
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Contact, error)
	// Sets a contact.
	Set(ctx context.Context, in *SetReq, opts ...grpc.CallOption) (*Contact, error)
	// Delete a contact.
	Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*Contact, error)
}

func NewContactsClient

func NewContactsClient(cc *grpc.ClientConn) ContactsClient

type ContactsServer

type ContactsServer interface {
	// Streams all the contacts.
	List(*ListReq, Contacts_ListServer) error
	// Returns a contact.
	Get(context.Context, *GetReq) (*Contact, error)
	// Sets a contact.
	Set(context.Context, *SetReq) (*Contact, error)
	// Delete a contact.
	Delete(context.Context, *DeleteReq) (*Contact, error)
}

type Contacts_ListClient

type Contacts_ListClient interface {
	Recv() (*Contact, error)
	grpc.ClientStream
}

type Contacts_ListServer

type Contacts_ListServer interface {
	Send(*Contact) error
	grpc.ServerStream
}

type DeleteReq

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

The delete request message.

func (*DeleteReq) Descriptor

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

func (*DeleteReq) GetName

func (m *DeleteReq) GetName() string

func (*DeleteReq) Marshal

func (m *DeleteReq) Marshal() (dAtA []byte, err error)

func (*DeleteReq) MarshalTo

func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) Reset

func (m *DeleteReq) Reset()

func (*DeleteReq) Size

func (m *DeleteReq) Size() (n int)

func (*DeleteReq) String

func (m *DeleteReq) String() string

func (*DeleteReq) Unmarshal

func (m *DeleteReq) Unmarshal(dAtA []byte) error

func (*DeleteReq) XXX_DiscardUnknown added in v0.2.0

func (m *DeleteReq) XXX_DiscardUnknown()

func (*DeleteReq) XXX_Marshal added in v0.2.0

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

func (*DeleteReq) XXX_Merge added in v0.2.0

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

func (*DeleteReq) XXX_Size added in v0.2.0

func (m *DeleteReq) XXX_Size() int

func (*DeleteReq) XXX_Unmarshal added in v0.2.0

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

type GetReq

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

The get request message.

func (*GetReq) Descriptor

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

func (*GetReq) GetName

func (m *GetReq) GetName() string

func (*GetReq) Marshal

func (m *GetReq) Marshal() (dAtA []byte, err error)

func (*GetReq) MarshalTo

func (m *GetReq) MarshalTo(dAtA []byte) (int, error)

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) Reset

func (m *GetReq) Reset()

func (*GetReq) Size

func (m *GetReq) Size() (n int)

func (*GetReq) String

func (m *GetReq) String() string

func (*GetReq) Unmarshal

func (m *GetReq) Unmarshal(dAtA []byte) error

func (*GetReq) XXX_DiscardUnknown added in v0.2.0

func (m *GetReq) XXX_DiscardUnknown()

func (*GetReq) XXX_Marshal added in v0.2.0

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

func (*GetReq) XXX_Merge added in v0.2.0

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

func (*GetReq) XXX_Size added in v0.2.0

func (m *GetReq) XXX_Size() int

func (*GetReq) XXX_Unmarshal added in v0.2.0

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

type ListReq

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

The list request message.

func (*ListReq) Descriptor

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

func (*ListReq) Marshal

func (m *ListReq) Marshal() (dAtA []byte, err error)

func (*ListReq) MarshalTo

func (m *ListReq) MarshalTo(dAtA []byte) (int, error)

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) Reset

func (m *ListReq) Reset()

func (*ListReq) Size

func (m *ListReq) Size() (n int)

func (*ListReq) String

func (m *ListReq) String() string

func (*ListReq) Unmarshal

func (m *ListReq) Unmarshal(dAtA []byte) error

func (*ListReq) XXX_DiscardUnknown added in v0.2.0

func (m *ListReq) XXX_DiscardUnknown()

func (*ListReq) XXX_Marshal added in v0.2.0

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

func (*ListReq) XXX_Merge added in v0.2.0

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

func (*ListReq) XXX_Size added in v0.2.0

func (m *ListReq) XXX_Size() int

func (*ListReq) XXX_Unmarshal added in v0.2.0

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

type SetReq

type SetReq struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	PeerId               []byte   `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The set request message.

func (*SetReq) Descriptor

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

func (*SetReq) GetName

func (m *SetReq) GetName() string

func (*SetReq) GetPeerId

func (m *SetReq) GetPeerId() []byte

func (*SetReq) Marshal

func (m *SetReq) Marshal() (dAtA []byte, err error)

func (*SetReq) MarshalTo

func (m *SetReq) MarshalTo(dAtA []byte) (int, error)

func (*SetReq) ProtoMessage

func (*SetReq) ProtoMessage()

func (*SetReq) Reset

func (m *SetReq) Reset()

func (*SetReq) Size

func (m *SetReq) Size() (n int)

func (*SetReq) String

func (m *SetReq) String() string

func (*SetReq) Unmarshal

func (m *SetReq) Unmarshal(dAtA []byte) error

func (*SetReq) XXX_DiscardUnknown added in v0.2.0

func (m *SetReq) XXX_DiscardUnknown()

func (*SetReq) XXX_Marshal added in v0.2.0

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

func (*SetReq) XXX_Merge added in v0.2.0

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

func (*SetReq) XXX_Size added in v0.2.0

func (m *SetReq) XXX_Size() int

func (*SetReq) XXX_Unmarshal added in v0.2.0

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

Directories

Path Synopsis
Package mockcontacts is a generated GoMock package.
Package mockcontacts is a generated GoMock package.

Jump to

Keyboard shortcuts

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