Versions in this module Expand all Collapse all v0 v0.1.0 Jun 3, 2019 Changes in this version + var ErrPinsetNotSupported = fmt.Errorf("pinset is not supported") + var ErrSearchNotSupported = fmt.Errorf("search not supported") + func DeregisterDataset(store Datasets, d *Dataset) error + func DeregisterProfile(store Profiles, p *Profile) error + func RegisterDataset(store Datasets, d *Dataset) error + func RegisterProfile(store Profiles, p *Profile) error + type Dataset struct + Commit *dataset.Commit + Handle string + Meta *dataset.Meta + Name string + Path string + ProfileID string + PublicKey string + Structure *dataset.Structure + func NewDataset(handle, name string, ds *dataset.Dataset, pubkey crypto.PubKey) (*Dataset, error) + func NewDatasetRef(peername, name, profileID, path string) *Dataset + func (d *Dataset) Key() string + func (d *Dataset) Validate() error + func (d *Dataset) Verify() error + type Datasets interface + Delete func(key string) + Len func() int + Load func(key string) (value *Dataset, ok bool) + Range func(iter func(key string, p *Dataset) (brk bool)) + SortedRange func(iter func(key string, p *Dataset) (brk bool)) + Store func(key string, value *Dataset) + type Indexer interface + IndexDatasets func([]*Dataset) error + UnindexDatasets func([]*Dataset) error + type MemDatasets struct + func NewMemDatasets() *MemDatasets + func (ds *MemDatasets) Delete(key string) + func (ds *MemDatasets) Len() int + func (ds *MemDatasets) Load(key string) (value *Dataset, ok bool) + func (ds *MemDatasets) Range(iter func(key string, p *Dataset) (brk bool)) + func (ds *MemDatasets) SortedRange(iter func(key string, p *Dataset) (brk bool)) + func (ds *MemDatasets) Store(key string, value *Dataset) + type MemProfiles struct + func NewMemProfiles() *MemProfiles + func (ps *MemProfiles) Delete(key string) + func (ps *MemProfiles) Len() int + func (ps *MemProfiles) Load(key string) (value *Profile, ok bool) + func (ps *MemProfiles) Range(iter func(key string, p *Profile) (brk bool)) + func (ps *MemProfiles) SortedRange(iter func(key string, p *Profile) (brk bool)) + func (ps *MemProfiles) Store(key string, value *Profile) + type MemReputations struct + func NewMemReputations() *MemReputations + func (rs *MemReputations) Add(r *Reputation) error + func (rs *MemReputations) Delete(key string) + func (rs *MemReputations) Len() int + func (rs *MemReputations) Load(key string) (value *Reputation, ok bool) + func (rs *MemReputations) Range(iter func(key string, r *Reputation) (brk bool)) + func (rs *MemReputations) SortedRange(iter func(key string, r *Reputation) (brk bool)) + func (rs *MemReputations) Store(key string, value *Reputation) + type MockSearch struct + Datasets Datasets + func (ms MockSearch) Search(p SearchParams) (results []Result, err error) + type NilSearch bool + func (ns NilSearch) Search(p SearchParams) ([]Result, error) + type Profile struct + Created time.Time + Handle string + ProfileID string + PublicKey string + Signature string + func ProfileFromPrivateKey(handle string, privKey crypto.PrivKey) (*Profile, error) + func (p *Profile) Validate() error + func (p *Profile) Verify() error + type Profiles interface + Delete func(key string) + Len func() int + Load func(key string) (value *Profile, ok bool) + Range func(iter func(key string, p *Profile) (brk bool)) + SortedRange func(iter func(key string, p *Profile) (brk bool)) + Store func(key string, value *Profile) + type Registry struct + Datasets Datasets + Indexer Indexer + Profiles Profiles + Reputations Reputations + Search Searchable + type Reputation struct + ProfileID string + Rep int + func NewReputation(id string) *Reputation + func (r *Reputation) Reputation() int + func (r *Reputation) SetReputation(reputation int) + func (r *Reputation) Validate() error + type ReputationResponse struct + Expiration time.Duration + Reputation *Reputation + type Reputations interface + Add func(r *Reputation) error + Delete func(key string) + Len func() int + Load func(key string) (value *Reputation, ok bool) + Range func(iter func(key string, r *Reputation) (brk bool)) + SortedRange func(iter func(key string, r *Reputation) (brk bool)) + Store func(key string, value *Reputation) + type Result struct + ID string + Type string + Value interface{} + type SearchParams struct + Limit int + Offset int + Q string + type Searchable interface + Search func(p SearchParams) ([]Result, error)