Documentation ¶
Index ¶
- func DefaultBundleStubs(t *testing.T, controller *gomock.Controller, config sheaf.BundleConfig, ...) *mocks.MockBundle
- func GenerateBundle(t *testing.T, controller *gomock.Controller, options ...BundleGeneratorOption) *mocks.MockBundle
- func GenerateBundleConfig(controller *gomock.Controller) *mocks.MockBundleConfig
- func NormalizeNewlines(d []byte) []byte
- func SlurpData(t *testing.T, source string) []byte
- func StageFile(t *testing.T, name, dest string) []byte
- func Testdata(t *testing.T, parts ...string) []byte
- func WithBundleDir(t *testing.T, fn func(dir string))
- type BundleGenerator
- type BundleGeneratorOption
- type CreateBundleFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBundleStubs ¶
func DefaultBundleStubs(t *testing.T, controller *gomock.Controller, config sheaf.BundleConfig, manifests []sheaf.BundleManifest) *mocks.MockBundle
DefaultBundleStubs are the default bundle stubs.
func GenerateBundle ¶
func GenerateBundle(t *testing.T, controller *gomock.Controller, options ...BundleGeneratorOption) *mocks.MockBundle
GenerateBundle generates a bundle mock.
func GenerateBundleConfig ¶
func GenerateBundleConfig(controller *gomock.Controller) *mocks.MockBundleConfig
GenerateBundleConfig generates a bundle config mock.
func NormalizeNewlines ¶
NormalizeNewlines converts newline conventions for mac and windows with their unix equivalent
func WithBundleDir ¶
WithBundleDir creates a bundle directory and runs a function.
Types ¶
type BundleGenerator ¶
type BundleGenerator struct {
// contains filtered or unexported fields
}
BundleGenerator generates a sheaf.Bundle mock.
type BundleGeneratorOption ¶
type BundleGeneratorOption func(generator BundleGenerator) BundleGenerator
BundleGeneratorOption is a functional option for configuring BundleGenerator.
func BundleGeneratorConfig ¶
func BundleGeneratorConfig(config sheaf.BundleConfig) BundleGeneratorOption
BundleGeneratorConfig sets config for BundleGenerator.
func BundleGeneratorCreateBundle ¶
func BundleGeneratorCreateBundle(fn CreateBundleFunc) BundleGeneratorOption
BundleGeneratorCreateBundle sets the bundle creator for BundleGenerator.
func BundleGeneratorManifests ¶
func BundleGeneratorManifests(list []sheaf.BundleManifest) BundleGeneratorOption
BundleGeneratorManifests sets the bundle manifests for BundleGenerator.
type CreateBundleFunc ¶
type CreateBundleFunc func(t *testing.T, controller *gomock.Controller, config sheaf.BundleConfig, manifests []sheaf.BundleManifest) *mocks.MockBundle
CreateBundleFunc is a function that create a Bundle mock.