Documentation ¶
Overview ¶
Package storage provides an interface to implement storage providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStorage ¶
func RegisterStorage(name string, strg StorageInterface)
RegisterStorage registers a storage. Must be called from the init() function of the storage implementation.
Types ¶
type StorageInterface ¶
type StorageInterface interface { Init(cfg map[string]interface{}) error GetAllReactions() ([]handler.Reaction, error) GetReactionsForEvent(event string) ([]handler.Reaction, error) GetReaction(event string, name string) (handler.Reaction, error) CreateReaction(handler.Reaction) error DeleteReaction(event string, name string) error Stop() error }
StorageInterface is the interface defining a storage provider.
func GetStorage ¶
func GetStorage(name string) (StorageInterface, error)
GetStorage returns the storage provider by its name.
Click to show internal directories.
Click to hide internal directories.