stub

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStubberPrefixes

func GetStubberPrefixes() []string

GetStubberPrefixes gets stubbers and returns their prefixes

func IsStub

func IsStub(uri string) bool

IsStub checks if the given URI is from stub

Types

type Stubber

type Stubber interface {
	// Name returns the unique name of the stubber
	Name() string
	// Walk walks all the stubs in the stubber
	Walk(WalkFunc)
	// GetURI returns the URI for the path
	GetURI(path string) string
}

Stubber contains stubs

func GetStubbers

func GetStubbers() []Stubber

GetStubbers initialises stubbers and returns them

type WalkFunc

type WalkFunc func(path string, content []byte) error

WalkFunc is a callback function that is executed on every files in a stub

Jump to

Keyboard shortcuts

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