Documentation ¶
Overview ¶
Package properties implements a layer on top of the scoped store. It combineds a store for each scope as a single store, and allows the stores to be search either as one, or individually.
Index ¶
- type PropertyStore
- func (ps PropertyStore) Get(k []string) (string, bool, error)
- func (ps PropertyStore) GetInScope(s scope.Scope, k []string) (string, bool, error)
- func (ps PropertyStore) LookupAll(k []string) (map[scope.Scope]string, error)
- func (ps PropertyStore) Set(s scope.Scope, k []string, v string) error
- func (ps PropertyStore) Unset(s scope.Scope, k []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PropertyStore ¶
type PropertyStore struct {
// contains filtered or unexported fields
}
PropertyStore is used to store key values pairs that are dependent on a scope
func NewPropertyStore ¶
func NewPropertyStore(s storage.Storer, m *hugot.Message) PropertyStore
NewPropertyStore uese the provided store to store properties, under a prefix pfx
func (PropertyStore) Get ¶
func (ps PropertyStore) Get(k []string) (string, bool, error)
Get looks up a property. Scopes are searched in the following order:
ChanneUser User Channel Global
func (PropertyStore) GetInScope ¶
GetInScope looks up the property for the given message, in the reuested scope
Click to show internal directories.
Click to hide internal directories.