Documentation
¶
Index ¶
- Variables
- func RegisterContactsServer(s *grpc.Server, srv ContactsServer)
- type Contact
- func (*Contact) Descriptor() ([]byte, []int)
- func (m *Contact) GetName() string
- func (m *Contact) GetPeerId() []byte
- func (m *Contact) Marshal() (dAtA []byte, err error)
- func (m *Contact) MarshalTo(dAtA []byte) (int, error)
- func (*Contact) ProtoMessage()
- func (m *Contact) Reset()
- func (m *Contact) Size() (n int)
- func (m *Contact) String() string
- func (m *Contact) Unmarshal(dAtA []byte) error
- func (m *Contact) XXX_DiscardUnknown()
- func (m *Contact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Contact) XXX_Merge(src proto.Message)
- func (m *Contact) XXX_Size() int
- func (m *Contact) XXX_Unmarshal(b []byte) error
- type ContactsClient
- type ContactsServer
- type Contacts_ListClient
- type Contacts_ListServer
- type DeleteReq
- func (*DeleteReq) Descriptor() ([]byte, []int)
- func (m *DeleteReq) GetName() string
- func (m *DeleteReq) Marshal() (dAtA []byte, err error)
- func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteReq) ProtoMessage()
- func (m *DeleteReq) Reset()
- func (m *DeleteReq) Size() (n int)
- func (m *DeleteReq) String() string
- func (m *DeleteReq) Unmarshal(dAtA []byte) error
- func (m *DeleteReq) XXX_DiscardUnknown()
- func (m *DeleteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DeleteReq) XXX_Merge(src proto.Message)
- func (m *DeleteReq) XXX_Size() int
- func (m *DeleteReq) XXX_Unmarshal(b []byte) error
- type GetReq
- func (*GetReq) Descriptor() ([]byte, []int)
- func (m *GetReq) GetName() string
- func (m *GetReq) Marshal() (dAtA []byte, err error)
- func (m *GetReq) MarshalTo(dAtA []byte) (int, error)
- func (*GetReq) ProtoMessage()
- func (m *GetReq) Reset()
- func (m *GetReq) Size() (n int)
- func (m *GetReq) String() string
- func (m *GetReq) Unmarshal(dAtA []byte) error
- func (m *GetReq) XXX_DiscardUnknown()
- func (m *GetReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetReq) XXX_Merge(src proto.Message)
- func (m *GetReq) XXX_Size() int
- func (m *GetReq) XXX_Unmarshal(b []byte) error
- type ListReq
- func (*ListReq) Descriptor() ([]byte, []int)
- func (m *ListReq) Marshal() (dAtA []byte, err error)
- func (m *ListReq) MarshalTo(dAtA []byte) (int, error)
- func (*ListReq) ProtoMessage()
- func (m *ListReq) Reset()
- func (m *ListReq) Size() (n int)
- func (m *ListReq) String() string
- func (m *ListReq) Unmarshal(dAtA []byte) error
- func (m *ListReq) XXX_DiscardUnknown()
- func (m *ListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListReq) XXX_Merge(src proto.Message)
- func (m *ListReq) XXX_Size() int
- func (m *ListReq) XXX_Unmarshal(b []byte) error
- type SetReq
- func (*SetReq) Descriptor() ([]byte, []int)
- func (m *SetReq) GetName() string
- func (m *SetReq) GetPeerId() []byte
- func (m *SetReq) Marshal() (dAtA []byte, err error)
- func (m *SetReq) MarshalTo(dAtA []byte) (int, error)
- func (*SetReq) ProtoMessage()
- func (m *SetReq) Reset()
- func (m *SetReq) Size() (n int)
- func (m *SetReq) String() string
- func (m *SetReq) Unmarshal(dAtA []byte) error
- func (m *SetReq) XXX_DiscardUnknown()
- func (m *SetReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SetReq) XXX_Merge(src proto.Message)
- func (m *SetReq) XXX_Size() int
- func (m *SetReq) XXX_Unmarshal(b []byte) error
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) ProtoMessage ¶
func (*Contact) ProtoMessage()
func (*Contact) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *Contact) XXX_DiscardUnknown()
func (*Contact) XXX_Marshal ¶ added in v0.2.0
func (*Contact) XXX_Unmarshal ¶ added in v0.2.0
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) ProtoMessage ¶
func (*DeleteReq) ProtoMessage()
func (*DeleteReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *DeleteReq) XXX_DiscardUnknown()
func (*DeleteReq) XXX_Marshal ¶ added in v0.2.0
func (*DeleteReq) XXX_Unmarshal ¶ added in v0.2.0
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) ProtoMessage ¶
func (*GetReq) ProtoMessage()
func (*GetReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *GetReq) XXX_DiscardUnknown()
func (*GetReq) XXX_Marshal ¶ added in v0.2.0
func (*GetReq) XXX_Unmarshal ¶ added in v0.2.0
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) ProtoMessage ¶
func (*ListReq) ProtoMessage()
func (*ListReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *ListReq) XXX_DiscardUnknown()
func (*ListReq) XXX_Marshal ¶ added in v0.2.0
func (*ListReq) XXX_Unmarshal ¶ added in v0.2.0
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) ProtoMessage ¶
func (*SetReq) ProtoMessage()
func (*SetReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *SetReq) XXX_DiscardUnknown()
func (*SetReq) XXX_Marshal ¶ added in v0.2.0
func (*SetReq) XXX_Unmarshal ¶ added in v0.2.0
Directories
¶
Path | Synopsis |
---|---|
Package mockcontacts is a generated GoMock package.
|
Package mockcontacts is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.