store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package store implements the go-micro store interface

Package store implements the go-micro store interface

Package store implements the go-micro store interface

Index

Constants

This section is empty.

Variables

View Source
var (
	// Name is the default name for the settings store
	Name = "ocis-settings-store"
)

Functions

func New

func New(cfg *config.Config) settings.Manager

New creates a new store

Types

type Store

type Store struct {
	Logger olog.Logger
	// contains filtered or unexported fields
}

Store interacts with the filesystem to manage settings information

func (Store) ListBundles

func (s Store) ListBundles(identifier *proto.Identifier) ([]*proto.SettingsBundle, error)

ListBundles returns all bundles in the mountPath folder belonging to the given extension

func (Store) ListValues

func (s Store) ListValues(identifier *proto.Identifier) ([]*proto.SettingsValue, error)

ListValues reads all values within the scope of the given identifier AccountUuid is required.

func (Store) ReadBundle

func (s Store) ReadBundle(identifier *proto.Identifier) (*proto.SettingsBundle, error)

ReadBundle tries to find a bundle by the given identifier within the mountPath. Extension and BundleKey within the identifier are required.

func (Store) ReadValue

func (s Store) ReadValue(identifier *proto.Identifier) (*proto.SettingsValue, error)

ReadValue tries to find a value by the given identifier attributes within the mountPath All identifier fields are required.

func (Store) WriteBundle

func (s Store) WriteBundle(record *proto.SettingsBundle) (*proto.SettingsBundle, error)

WriteBundle writes the given record into a file within the mountPath Extension and BundleKey within the record identifier are required.

func (Store) WriteValue

func (s Store) WriteValue(value *proto.SettingsValue) (*proto.SettingsValue, error)

WriteValue writes the given SettingsValue into a file within the mountPath All identifier fields within the value are required.

Jump to

Keyboard shortcuts

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