iconfig

package module
v0.0.0-...-a72eff7 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 6 Imported by: 1

README

airs-iconfig

Functional interface to read/write configs

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetConfig func(ctx context.Context, configName string, config interface{}) (ok bool, err error)

GetConfig fills passed config struct and returns ok == true, ok == false and err == nil if config doesn't exists and ok == false and err != nil if an error occurred

View Source
var PutConfig func(ctx context.Context, configName string, config interface{}) error

PutConfig saves config struct with given name or returns error if something went wrong

Functions

func TestGetWrongStruct

func TestGetWrongStruct(t *testing.T)

func TestImpl

func TestImpl(actx context.Context, t *testing.T)

TestImpl s.e. Storage must be empty before testing

func TestNilConfig

func TestNilConfig(t *testing.T)

func TestNoConfig

func TestNoConfig(t *testing.T)

func TestNotPointerInGet

func TestNotPointerInGet(t *testing.T)

func TestPutGet

func TestPutGet(t *testing.T)

func TestPutGetDifferentStructs

func TestPutGetDifferentStructs(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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