Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface { // CreateGCSGateway is used to create a storage gateway. In normal use it should be a GCS // gateway, that uses the given bucket to store files. CreateGCSGateway(bucket string) (storage.Gateway, error) }
Factory is used to create dependencies used elsewhere in the application. It's primary reason for existence is to facilitate testing, by allowing us to pass a factory into a command (or a subset of a factory) to create it's dependencies "dynamically" in a test. The factory should produce interfaces, meaning the actual implementations of anything it creates could be fake.
func NewCLIFactory ¶
func NewCLIFactory() Factory
NewCLIFactory produces a new instance of cliFactory.
Click to show internal directories.
Click to hide internal directories.