Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurable ¶
type Configurable interface { // Validate validates the configuration for a given channel Validate() error // Name returns the configuration name Name() string }
Configurable represents the contract to be implemented in order to comply with setting the configurations for the different notification channels
type GCS ¶
type GCS struct { Bucket string Context context.Context CredentialsFilePath string Directory string }
GCS represents the configuration for the Google Cloud Storage filesystem
type Local ¶
type Local struct {
Path string
}
Local represents the configuration for the local filesystem
type Storeable ¶
type Storeable interface { // Init initializes the store with the proper configs Init(config Configurable) (Storeable, error) // Put stores a file with the specified name Put(name string, reader io.Reader) error // Stream streams data into a file Stream() error // OpenStream initializes the stream OpenStream(name string) error // Channel returns the stream channel Channel(data string) // Close releases the streaming resources Close() error // List lists all the file/directory names in a directory List(name string) ([]string, error) // Open retrieves a file Open(name string) (io.Reader, error) }
Storeable represents the contract to be implemented by different filesystems in order to store, retrieve, stream and delete files.
func Build ¶
func Build(config Configurable) (Storeable, error)
Build returns a filesystem implementation based on the passed in configuration
Click to show internal directories.
Click to hide internal directories.