Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WalkFunc ¶
type WalkFunc func(wd string, info *provider.ResourceInfo, err error) error
WalkFunc is the type of function called by Walk to visit each file or directory
Each time the Walk function meet a file/folder path is set to the full path of this. The err argument reports an error related to the path, and the function can decide the action to do with this.
The error result returned by the function controls how Walk continues. If the function returns the special value SkipDir, Walk skips the current directory. Otherwise, if the function returns a non-nil error, Walk stops entirely and returns that error.
type Walker ¶
type Walker interface { // Walk walks the file tree rooted at root, calling fn for each file or folder in the tree, including the root. Walk(ctx context.Context, root *provider.ResourceId, fn WalkFunc) error }
Walker is an interface implemented by objects that are able to walk from a dir rooted into the passed path
func NewWalker ¶
func NewWalker(gtw gateway.GatewayAPIClient) Walker
NewWalker creates a Walker object that uses the reva gateway