fake

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDag

type MockDag struct {
	MockInit             func(nodes []dag.Node, fns ...dag.NodeFn) ([]dag.Node, error)
	MockAddNode          func(dag.Node) error
	MockAddNodes         func(...dag.Node) error
	MockAddOrUpdateNodes func(...dag.Node)
	MockGetNode          func(identifier string) (dag.Node, error)
	MockAddEdge          func(from string, to dag.Node) (bool, error)
	MockAddEdges         func(edges map[string][]dag.Node) ([]dag.Node, error)
	MockNodeExists       func(identifier string) bool
	MockNodeNeighbors    func(identifier string) ([]dag.Node, error)
	MockTraceNode        func(identifier string) (map[string]dag.Node, error)
	MockSort             func() ([]string, error)
}

MockDag is a mock DAG.

func (*MockDag) AddEdge

func (d *MockDag) AddEdge(from string, to dag.Node) (bool, error)

AddEdge calls the underlying MockAddEdge.

func (*MockDag) AddEdges

func (d *MockDag) AddEdges(edges map[string][]dag.Node) ([]dag.Node, error)

AddEdges calls the underlying MockAddEdges.

func (*MockDag) AddNode

func (d *MockDag) AddNode(n dag.Node) error

AddNode calls the underlying MockAddNode.

func (*MockDag) AddNodes

func (d *MockDag) AddNodes(n ...dag.Node) error

AddNodes calls the underlying MockAddNodes.

func (*MockDag) AddOrUpdateNodes

func (d *MockDag) AddOrUpdateNodes(n ...dag.Node)

AddOrUpdateNodes calls the underlying MockAddOrUpdateNodes.

func (*MockDag) GetNode

func (d *MockDag) GetNode(i string) (dag.Node, error)

GetNode calls the underlying MockGetNode.

func (*MockDag) Init

func (d *MockDag) Init(nodes []dag.Node, fns ...dag.NodeFn) ([]dag.Node, error)

Init calls the underlying MockInit.

func (*MockDag) NodeExists

func (d *MockDag) NodeExists(i string) bool

NodeExists calls the underlying MockNodeExists.

func (*MockDag) NodeNeighbors

func (d *MockDag) NodeNeighbors(i string) ([]dag.Node, error)

NodeNeighbors calls the underlying MockNodeNeighbors.

func (*MockDag) Sort

func (d *MockDag) Sort() ([]string, error)

Sort calls the underlying MockSort.

func (*MockDag) TraceNode

func (d *MockDag) TraceNode(i string) (map[string]dag.Node, error)

TraceNode calls the underlying MockTraceNode.

Jump to

Keyboard shortcuts

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