Documentation ¶
Overview ¶
Package internal implements the internals for bulk operations
Index ¶
- Variables
- func Append(stateFile string, req generator.GenerateRequest, openFileFn OpenFileFn) error
- func Finalize(stateFile, rootDir string, openFn OpenFn, generateFn GenerateFn) error
- func Initialize(stateFile, rootDir string, createFn CreateFn) error
- type CreateFn
- type GenerateFn
- type OpenFileFn
- type OpenFn
- type ReadWriteSeekCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadAppendRequest is returned when a caller passes bad parameters to // Append ErrBadAppendRequest = errors.New("bad request") // ErrBulkState is returned when the bulk state is invalid ErrBulkState = errors.New("bulk state error") )
Functions ¶
func Append ¶
func Append(stateFile string, req generator.GenerateRequest, openFileFn OpenFileFn) error
Append appends a mock generate request to the bulk state
func Finalize ¶
func Finalize(stateFile, rootDir string, openFn OpenFn, generateFn GenerateFn) error
Finalize complete bulk processing by generating all the requested mocks
func Initialize ¶
Initialize initializes bulk processing and creates the bulk processing state file
Types ¶
type CreateFn ¶
type CreateFn func(name string) (file io.WriteCloser, err error)
CreateFn is the function type of os.Create
type GenerateFn ¶
type GenerateFn func(reqs ...generator.GenerateRequest) error
GenerateFn is the function type of generator.Generate
type OpenFileFn ¶
OpenFileFn is the function type of os.OpenFile
Click to show internal directories.
Click to hide internal directories.