Documentation ¶
Index ¶
- Constants
- Variables
- type MongoStorage
- func (self *MongoStorage) Get(ns string, id string) ([]string, error)
- func (self *MongoStorage) Query(ns string, tags []string) ([]string, error)
- func (self *MongoStorage) Remove(ns string, id string) error
- func (self *MongoStorage) Tag(ns string, id string, tags []string) error
- func (self *MongoStorage) Untag(ns string, id string, tags []string) error
- type MongoStorageOption
- type Storage
Constants ¶
View Source
const ( MONGO_TAG_ID = "##id" MONGO_TAG_NS = "##ns" MONGO_TAG_PAD = "x" )
Variables ¶
View Source
var ( ErrUnknownDriver = errors.New("unknown driver") ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type MongoStorage ¶
type MongoStorage struct {
// contains filtered or unexported fields
}
type MongoStorageOption ¶
type MongoStorageOption struct { Uri string Database string Collection string Timeout time.Duration }
func NewMongoStorageOption ¶
func NewMongoStorageOption() *MongoStorageOption
type Storage ¶
type Storage interface { Tag(ns string, id string, tags []string) error Untag(ns string, id string, tags []string) error Remove(ns string, id string) error Get(ns string, id string) ([]string, error) Query(ns string, tags []string) ([]string, error) }
func NewMongoStorage ¶
func NewStorage ¶
Click to show internal directories.
Click to hide internal directories.