Documentation ¶
Overview ¶
Package mocks should provide utils used by tests to mock various layers.
It currently implements a ListNodeStreamer used in many places for faking responses to tree.ListNodes requests.
Index ¶
- type ListNodeStreamer
- func (l *ListNodeStreamer) Close() error
- func (l *ListNodeStreamer) Context() context.Context
- func (l *ListNodeStreamer) ReceiveAllNodes() (nodes []*tree.Node)
- func (l *ListNodeStreamer) Recv() (*tree.ListNodesResponse, error)
- func (l *ListNodeStreamer) RecvMsg(interface{}) error
- func (l *ListNodeStreamer) Send(resp *tree.ListNodesResponse) error
- func (l *ListNodeStreamer) SendHeader(md metadata.MD) error
- func (l *ListNodeStreamer) SendMsg(interface{}) error
- func (l *ListNodeStreamer) SetHeader(md metadata.MD) error
- func (l *ListNodeStreamer) SetTrailer(md metadata.MD)
- type NodeReceiverClient
- func (n *NodeReceiverClient) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
- func (n *NodeReceiverClient) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
- func (n *NodeReceiverClient) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListNodeStreamer ¶
type ListNodeStreamer struct {
// contains filtered or unexported fields
}
func NewListNodeStreamer ¶
func NewListNodeStreamer() *ListNodeStreamer
func (*ListNodeStreamer) Close ¶
func (l *ListNodeStreamer) Close() error
func (*ListNodeStreamer) Context ¶
func (l *ListNodeStreamer) Context() context.Context
func (*ListNodeStreamer) ReceiveAllNodes ¶
func (l *ListNodeStreamer) ReceiveAllNodes() (nodes []*tree.Node)
func (*ListNodeStreamer) Recv ¶
func (l *ListNodeStreamer) Recv() (*tree.ListNodesResponse, error)
func (*ListNodeStreamer) RecvMsg ¶
func (l *ListNodeStreamer) RecvMsg(interface{}) error
func (*ListNodeStreamer) Send ¶
func (l *ListNodeStreamer) Send(resp *tree.ListNodesResponse) error
func (*ListNodeStreamer) SendHeader ¶
func (l *ListNodeStreamer) SendHeader(md metadata.MD) error
func (*ListNodeStreamer) SendMsg ¶
func (l *ListNodeStreamer) SendMsg(interface{}) error
func (*ListNodeStreamer) SetTrailer ¶
func (l *ListNodeStreamer) SetTrailer(md metadata.MD)
type NodeReceiverClient ¶
func (*NodeReceiverClient) CreateNode ¶
func (n *NodeReceiverClient) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
func (*NodeReceiverClient) DeleteNode ¶
func (n *NodeReceiverClient) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
func (*NodeReceiverClient) UpdateNode ¶
func (n *NodeReceiverClient) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
Click to show internal directories.
Click to hide internal directories.