configuration

package
v0.0.0-...-ed2735e Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUCKET_NAME = "configuration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	// SetProperty updates configuration sets.
	SetProperty(property map[string]interface{}) error

	// GetProperty returns a single configuration property specified by name parameter.
	GetProperty(name string) (map[string]interface{}, error)

	// GetProperties returns a list of configurations stored in database.
	GetProperties() ([]map[string]interface{}, error)
}

Interface of Service model's operations.

type Executor

type Executor struct {
}

func (Executor) GetProperties

func (Executor) GetProperties() ([]map[string]interface{}, error)

GetProperties returns a list of configurations stored in database. if succeed to get, return list of all configurations as slice. otherwise, return error.

func (Executor) GetProperty

func (Executor) GetProperty(name string) (map[string]interface{}, error)

GetProperty returns a single configuration property specified by name parameter. if succeed to get, returns an error as nil. otherwise, return error.

func (Executor) SetProperty

func (Executor) SetProperty(property map[string]interface{}) error

SetProperty inserts a map of configuration into the database. if succeed to add new configuration sets, returns an error as nil. otherwise, return error.

type Property

type Property struct {
	Name     string      `json:"name"`
	Value    interface{} `json:"value"`
	ReadOnly bool        `json:"readonly"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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