storage

package
v0.0.0-...-bcbb5c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 3 Imported by: 3

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL