Documentation
¶
Overview ¶
Package reapitest provides fake implementation of reapi for test.
Index ¶
- func New(ctx context.Context, t *testing.T, fake *Fake) *reapi.Client
- type Fake
- func (f *Fake) Execute(action *rpb.Action) (*rpb.ActionResult, error)
- func (f *Fake) Fetch(ctx context.Context, d *rpb.Digest) ([]byte, error)
- func (f *Fake) FetchProto(ctx context.Context, d *rpb.Digest, m proto.Message) error
- func (f *Fake) Put(ctx context.Context, data []byte) (*rpb.Digest, error)
- type InputTree
- func (t InputTree) Dump(ctx context.Context, w io.Writer) error
- func (t InputTree) LookupDirectoryNode(ctx context.Context, name string) (*rpb.DirectoryNode, error)
- func (t InputTree) LookupFileNode(ctx context.Context, name string) (*rpb.FileNode, error)
- func (t InputTree) LookupSymlinkNode(ctx context.Context, name string) (*rpb.SymlinkNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fake ¶
type Fake struct { CAS *blobstore.ContentAddressableStorage ExecuteFunc func(*Fake, *rpb.Action) (*rpb.ActionResult, error) }
Fake is fake reapi server.
func (*Fake) FetchProto ¶
FetchProto fetches proto message identified by d from cas.
type InputTree ¶
type InputTree struct { CAS *blobstore.ContentAddressableStorage Root *rpb.Digest }
func (InputTree) LookupDirectoryNode ¶
func (t InputTree) LookupDirectoryNode(ctx context.Context, name string) (*rpb.DirectoryNode, error)
LookupDirectoryNode looks up a directory node by name from the tree.
func (InputTree) LookupFileNode ¶
LookupFileNode looks up name's file node in tree.
func (InputTree) LookupSymlinkNode ¶
LookupSymlinkNode looks up name's symlink node in tree.
Click to show internal directories.
Click to hide internal directories.