Documentation ¶
Index ¶
- Variables
- type Config
- type Store
- func (s *Store) Close() error
- func (s *Store) Count(condition []*notification.Condition) (int, error)
- func (s *Store) List(condition []*notification.Condition, start string, asc bool, count int) (result []*notification.Notification, iter string, err error)
- func (s *Store) Open() error
- func (s *Store) Remove(id string) (*notification.Notification, error)
- func (s *Store) Save(n *notification.Notification) error
- func (s *Store) SupportedConditions() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var RequiredKvdbFeatures = kvdb.FeatureEmbedded | kvdb.FeatureStore | kvdb.FeatureNext | kvdb.FeaturePrev
RequiredKvdbFeatures required kvdb featuers
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { //Database kvdb config Database *kvdb.Config //Limit count limit,defalut value is notificationquque.DefaultStoreListLimit Limit int }
Config draft box config
func (*Config) CreateStore ¶
func (c *Config) CreateStore() (notification.Store, error)
CreateStore create draftbox with config
type Store ¶
Store draftbox struct
func (*Store) Count ¶
func (s *Store) Count(condition []*notification.Condition) (int, error)
Count draft box with given search conditions
func (*Store) List ¶
func (s *Store) List(condition []*notification.Condition, start string, asc bool, count int) (result []*notification.Notification, iter string, err error)
List list no more than count notifactions in draftbox with given search conditions form start position . Count should be greater than 0. Found notifications and next list position iter will be returnes. Return largest id notification if asc is false.
func (*Store) Remove ¶
func (s *Store) Remove(id string) (*notification.Notification, error)
Remove remove notification by given id and return removed notification.
func (*Store) Save ¶
func (s *Store) Save(n *notification.Notification) error
Save save given notificaiton to draft box. Notification with same id will be overwritten.
func (*Store) SupportedConditions ¶
SupportedConditions return supported condition keyword list
Click to show internal directories.
Click to hide internal directories.