Documentation ¶
Index ¶
- Variables
- type Collection
- type CollectorFunc
- type Composite
- type CopierFunc
- type CreatorFunc
- type Entry
- type EnumeratorFunc
- type GetterFunc
- type Item
- type KeyFunc
- type MemberError
- type MutatorFunc
- type Option
- type Range
- type Schema
- func (cc *Schema) Cleared(v interface{}) interface{}
- func (cc *Schema) Collection(tag string) *Collection
- func (cc *Schema) CollectionEntries(collection *Collection, valkey *key.Key, col interface{}) []*Entry
- func (cc *Schema) Collections() []*Collection
- func (cc *Schema) CollectionsEntries(val interface{}) (entries []*Entry, err error)
- func (cc *Schema) Copy(v interface{}) interface{}
- func (cc *Schema) Create() (v interface{}, err error)
- func (cc *Schema) IdentifierKey(id interface{}) (k *key.Key, err error)
- func (cc *Schema) IdentifierWitness(id interface{}) (*Entry, error)
- func (cc *Schema) IsWitnessKey(key *key.Key) bool
- func (cc *Schema) KeyBaseName() string
- func (cc *Schema) KeyIdentifier(k *key.Key) (v interface{}, err error)
- func (cc *Schema) KeyWitness(key *key.Key) *key.Key
- func (cc *Schema) MustKeepRoot(val interface{}) bool
- func (cc *Schema) Name() string
- func (cc *Schema) RootEntry(val interface{}) (entry *Entry, err error)
- func (cc *Schema) SetIdentifier(val, id interface{}) (err error)
- func (cc *Schema) Singleton(tag string) *Singleton
- func (cc *Schema) Singletons() []*Singleton
- func (cc *Schema) SingletonsEntries(val interface{}) (entries []*Entry, err error)
- func (cc *Schema) ValueIdentifier(val interface{}) (id interface{}, err error)
- func (cc *Schema) ValueKey(val interface{}) (*key.Key, error)
- func (cc *Schema) ValueWitness(val interface{}) (*Entry, error)
- type SetterFunc
- type Singleton
- type Store
- type ValFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultMarshaling es el marshaling por defecto DefaultMarshaling = marshaling.JSON() // DefaultFiltering es el filtering por defecto DefaultFiltering = filtering.Copy() )
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Name string Tag string Field string Creator CreatorFunc Getter GetterFunc Setter SetterFunc Clear MutatorFunc Collector CollectorFunc Enumerator EnumeratorFunc ItemCreator CreatorFunc // contains filtered or unexported fields }
type CollectorFunc ¶
type CollectorFunc func(tgt interface{}, i Item)
func MapCollector ¶
func MapCollector() CollectorFunc
type Composite ¶
type Composite struct { Name string Creator CreatorFunc Copier CopierFunc IdentifierField string IdentifierGetter GetterFunc IdentifierSetter SetterFunc IdentifierKey KeyFunc KeyIdentifier ValFunc KeyBaseName string Singletons []Singleton Collections []Collection KeepRoot bool }
type CopierFunc ¶
type CopierFunc func(src interface{}) (new interface{})
type CreatorFunc ¶
type CreatorFunc func() (new interface{})
func ValueCreator ¶
func ValueCreator(ref interface{}) CreatorFunc
type EnumeratorFunc ¶
type EnumeratorFunc func(src interface{}) []Item
func MapEnumerator ¶
func MapEnumerator() EnumeratorFunc
type GetterFunc ¶
type GetterFunc func(src interface{}) interface{}
func FieldGetter ¶
func FieldGetter(name string) GetterFunc
type MemberError ¶
type MutatorFunc ¶
type MutatorFunc func(tgt interface{})
func FieldClear ¶
func FieldClear(name string) MutatorFunc
type Option ¶
type Option func(*simplestore)
func SetFiltering ¶
func SetMarshaling ¶
func SetMarshaling(m marshaling.Marshaling) Option
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func MustPrepare ¶
func (*Schema) Collection ¶
func (cc *Schema) Collection(tag string) *Collection
func (*Schema) CollectionEntries ¶
func (cc *Schema) CollectionEntries(collection *Collection, valkey *key.Key, col interface{}) []*Entry
func (*Schema) Collections ¶
func (cc *Schema) Collections() []*Collection
func (*Schema) CollectionsEntries ¶
func (*Schema) IdentifierKey ¶
func (*Schema) IdentifierWitness ¶
func (*Schema) KeyBaseName ¶
func (*Schema) KeyIdentifier ¶
func (*Schema) MustKeepRoot ¶
func (*Schema) SetIdentifier ¶
func (*Schema) Singletons ¶
func (*Schema) SingletonsEntries ¶
func (*Schema) ValueIdentifier ¶
func (*Schema) ValueWitness ¶
type SetterFunc ¶
type SetterFunc func(tgt interface{}, v interface{})
func FieldSetter ¶
func FieldSetter(name string) SetterFunc
type Singleton ¶
type Singleton struct { Name string Tag string Field string Creator CreatorFunc Getter GetterFunc Setter SetterFunc Clear MutatorFunc // contains filtered or unexported fields }
type Store ¶
type Store interface { PutComposite(s *Schema, val interface{}) error GetComposite(s *Schema, id interface{}) (interface{}, error) HasComposite(s *Schema, id interface{}) (bool, error) DelComposite(s *Schema, id interface{}) error GetCompositeAll(s *Schema) ([]interface{}, error) GetCompositeRange(s *Schema, r *Range) ([]interface{}, error) DelCompositeRange(s *Schema, r *Range) ([]interface{}, error) PutCompositeSingleton(s *Singleton, id interface{}, val interface{}) error GetCompositeSingleton(s *Singleton, id interface{}) (interface{}, error) PutCompositeCollection(c *Collection, id interface{}, col interface{}) error GetCompositeCollection(c *Collection, id interface{}) (interface{}, error) PutCompositeCollectionItem(c *Collection, id interface{}, itemid string, val interface{}) error GetCompositeCollectionItem(c *Collection, id interface{}, itemid string) (interface{}, error) DelCompositeCollectionItem(c *Collection, id interface{}, itemid string) error PutValue(key *key.Key, val interface{}) error GetValue(key *key.Key, val interface{}) (bool, error) HasValue(key *key.Key) (bool, error) DelValue(key *key.Key) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.