memory

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameSpaceStore

type NameSpaceStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NameSpaceStore is the default namespace.Store for namespace.Service.

Note: mutations in this store are ephemeral.

func NewNameSpaceStore

func NewNameSpaceStore() *NameSpaceStore

NewNameSpaceStore creates an in-memory namespace.Store.

func (*NameSpaceStore) Delete

func (ms *NameSpaceStore) Delete(ns *domain.NameSpace) error

Delete removes a NameSpace from the store

func (*NameSpaceStore) GetWithBase

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

func (ms *NameSpaceStore) GetWithPrefix(prefix string) (*domain.NameSpace, error)

GetWithPrefix returns a NameSpace from the store if the prefix is found.

func (*NameSpaceStore) Len

func (ms *NameSpaceStore) Len() int

Len returns the number of stored namespaces. Alternatives Base or Prefixes don't count towards the total.

func (*NameSpaceStore) List

func (ms *NameSpaceStore) List() ([]*domain.NameSpace, error)

List returns a list of all the stored NameSpace objects. An error is only returned when the underlying datastructure is unavailable.

func (*NameSpaceStore) Set

func (ms *NameSpaceStore) Set(ns *domain.NameSpace) error

Set stores the NameSpace in the Store

type OrganizationStore

type OrganizationStore struct {
	// contains filtered or unexported fields
}

func NewOrganizationStore

func NewOrganizationStore() *OrganizationStore

func (*OrganizationStore) Delete

func (*OrganizationStore) Filter added in v0.1.8

func (*OrganizationStore) Get

func (*OrganizationStore) Put

func (*OrganizationStore) Shutdown

func (ms *OrganizationStore) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL