Documentation ¶
Index ¶
- func CreateTemplate(templatePath string) (*template.Template, error)
- func GetEnvIntOrDefault(key string, def int) int
- func GetEnvStringOrDefault(key, def string) string
- func GetRequiredEnvInt(key string) int
- func GetRequiredEnvString(key string) string
- func WaitForDir(path string, clock ClockInterface, interval time.Duration) error
- type Clock
- type ClockInterface
- type FileSystem
- type FileSystemInterface
- type MockClockInterface
- type MockFileSystemInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTemplate ¶
CreateTemplate takes in a path to a template file and parses the file to create a Template instance.
func GetEnvIntOrDefault ¶
func GetEnvStringOrDefault ¶
func GetRequiredEnvInt ¶
func GetRequiredEnvString ¶
func WaitForDir ¶
func WaitForDir(path string, clock ClockInterface, interval time.Duration) error
WaitForDir returns when the specified directory is located in the filesystem, or if there is an error opening the directory once it is found.
Types ¶
type Clock ¶
type Clock struct{}
Clock implements ClockInterface with the standard time library functions.
type ClockInterface ¶
ClockInterface allows for mocking out the functionality of the standard time library when testing.
type FileSystem ¶
type FileSystem struct{}
FileSystem provides utility functions for interacting with the file system.
type FileSystemInterface ¶
FileSystemInterface allows for mocking out the functionality of FileSystem to avoid calls to the actual file system during testing.
type MockClockInterface ¶
type MockClockInterface struct {
// contains filtered or unexported fields
}
Mock of ClockInterface interface
func NewMockClockInterface ¶
func NewMockClockInterface(ctrl *gomock.Controller) *MockClockInterface
func (*MockClockInterface) EXPECT ¶
func (_m *MockClockInterface) EXPECT() *_MockClockInterfaceRecorder
func (*MockClockInterface) Now ¶
func (_m *MockClockInterface) Now() time.Time
func (*MockClockInterface) Since ¶
func (_m *MockClockInterface) Since(_param0 time.Time) time.Duration
func (*MockClockInterface) Sleep ¶
func (_m *MockClockInterface) Sleep(_param0 time.Duration)
type MockFileSystemInterface ¶
type MockFileSystemInterface struct {
// contains filtered or unexported fields
}
Mock of FileSystemInterface interface
func NewMockFileSystemInterface ¶
func NewMockFileSystemInterface(ctrl *gomock.Controller) *MockFileSystemInterface
func (*MockFileSystemInterface) EXPECT ¶
func (_m *MockFileSystemInterface) EXPECT() *_MockFileSystemInterfaceRecorder
func (*MockFileSystemInterface) ListAllFiles ¶
func (_m *MockFileSystemInterface) ListAllFiles(_param0 string) ([]string, error)