mgr

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalKey

func MarshalKey(k *config.Key) string

MarshalKey marshals the key into a string

func UnmarshalKey

func UnmarshalKey(str string) (*config.Key, error)

UnmarshalKey creates a key from the given string

Types

type ConfigResults

type ConfigResults []*config.KeyValue

ConfigResults holds the results of a configuration query

func (ConfigResults) Filter

func (r ConfigResults) Filter(criteria *config.Criteria) ConfigResults

Filter filters the results based on the given criteria

type QueryManager

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

QueryManager allows you to query ledger configuration

func NewQueryManager

func NewQueryManager(namespace string, p state.RetrieverProvider) *QueryManager

NewQueryManager returns a new configuration manager

func (*QueryManager) Get added in v0.1.1

func (m *QueryManager) Get(key *config.Key) (*config.Value, error)

Get retrieves the configuration based on the provided config key.

func (*QueryManager) Query

func (m *QueryManager) Query(criteria *config.Criteria) ([]*config.KeyValue, error)

Query retrieves configuration based on the provided config key.

type UpdateManager

type UpdateManager struct {
	*QueryManager
	// contains filtered or unexported fields
}

UpdateManager allows you to query and update ledger configuration

func NewUpdateManager

func NewUpdateManager(namespace string, sp state.StoreProvider, validator validator) *UpdateManager

NewUpdateManager returns a new configuration update manager

func (*UpdateManager) Delete

func (m *UpdateManager) Delete(key *config.Criteria) error

Delete deletes one or more configuration items according to the given Criteria.

func (*UpdateManager) Save

func (m *UpdateManager) Save(txID string, cfg *config.Config) error

Save saves the configuration to the ledger

Jump to

Keyboard shortcuts

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