Documentation ¶
Index ¶
- Variables
- type NameSpaceStore
- func (ms *NameSpaceStore) Delete(id string) error
- func (ms *NameSpaceStore) Get(id string) (*domain.Namespace, error)
- func (ms *NameSpaceStore) GetWithBase(base string) (*domain.Namespace, error)
- func (ms *NameSpaceStore) GetWithPrefix(prefix string) (*domain.Namespace, error)
- func (ms *NameSpaceStore) Len() int
- func (ms *NameSpaceStore) List() ([]*domain.Namespace, error)
- func (ms *NameSpaceStore) Put(ns *domain.Namespace) error
- type OrganizationStore
- func (ms *OrganizationStore) Delete(ctx context.Context, id domain.OrganizationID) error
- func (ms *OrganizationStore) Filter(ctx context.Context, filter ...domain.OrganizationFilter) ([]*domain.Organization, error)
- func (ms *OrganizationStore) Get(ctx context.Context, id domain.OrganizationID) (*domain.Organization, error)
- func (ms *OrganizationStore) Put(ctx context.Context, org *domain.Organization) error
- func (ms *OrganizationStore) Shutdown(ctx context.Context) error
- type TextIndex
- type TextQuery
Constants ¶
This section is empty.
Variables ¶
var (
ErrSearchNoMatch = errors.New("the search query does not match the index")
)
Functions ¶
This section is empty.
Types ¶
type NameSpaceStore ¶ added in v0.3.0
NameSpaceStore is the default namespace.Store for namespace.Service.
Note: mutations in this store are ephemeral.
func NewNameSpaceStore ¶ added in v0.3.0
func NewNameSpaceStore() *NameSpaceStore
NewNameSpaceStore creates an in-memory namespace.Store.
func (*NameSpaceStore) Delete ¶ added in v0.3.0
func (ms *NameSpaceStore) Delete(id string) error
Delete removes a NameSpace from the store.
When the Namespace is not found it returns an domain.ErrNameSpaceNotFound error.
func (*NameSpaceStore) Get ¶ added in v0.3.0
func (ms *NameSpaceStore) Get(id string) (*domain.Namespace, error)
func (*NameSpaceStore) GetWithBase ¶ added in v0.3.0
func (ms *NameSpaceStore) GetWithBase(base string) (*domain.Namespace, error)
GetWithBase returns a NameSpace from the store if the base URI is found.
func (*NameSpaceStore) GetWithPrefix ¶ added in v0.3.0
func (ms *NameSpaceStore) GetWithPrefix(prefix string) (*domain.Namespace, error)
GetWithPrefix returns a NameSpace from the store if the prefix is found.
func (*NameSpaceStore) Len ¶ added in v0.3.0
func (ms *NameSpaceStore) Len() int
Len returns the number of stored namespaces. Alternatives Base or Prefixes don't count towards the total.
type OrganizationStore ¶ added in v0.3.0
type OrganizationStore struct {
// contains filtered or unexported fields
}
func NewOrganizationStore ¶ added in v0.3.0
func NewOrganizationStore() *OrganizationStore
func (*OrganizationStore) Delete ¶ added in v0.3.0
func (ms *OrganizationStore) Delete(ctx context.Context, id domain.OrganizationID) error
func (*OrganizationStore) Filter ¶ added in v0.3.0
func (ms *OrganizationStore) Filter(ctx context.Context, filter ...domain.OrganizationFilter) ([]*domain.Organization, error)
Filter returns a subset of the available domains. When the filter returns no result domain.ErrOrgNotFound is returned.
func (*OrganizationStore) Get ¶ added in v0.3.0
func (ms *OrganizationStore) Get(ctx context.Context, id domain.OrganizationID) (*domain.Organization, error)
func (*OrganizationStore) Put ¶ added in v0.3.0
func (ms *OrganizationStore) Put(ctx context.Context, org *domain.Organization) error
type TextIndex ¶
type TextIndex struct { Terms map[string]*search.Vectors DocCount int Docs map[int]bool // contains filtered or unexported fields }
TestIndex is a single document full-text index. This means that all data you append to it will have its position incremented and appends to the known state. It is not replaced. To reset the index to an empty state you have to call the reset method.
func NewTextIndex ¶
func NewTextIndex() *TextIndex
func (*TextIndex) AppendBytes ¶
AppendBytes extract words from bytes and updates the TextIndex.
func (*TextIndex) AppendString ¶
AppendString extract words from bytes and updates the TextIndex.
type TextQuery ¶
type TextQuery struct { Hits *search.Matches EmStartTag string EmStyleClass string // contains filtered or unexported fields }