settings

package
v0.0.0-...-4f88806 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package settings is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func All

func All() []setting

func Bool

func Bool(key string) (bool, error)

func Float

func Float(key string) (float64, error)

func Init

func Init() error

func Int

func Int(key string) (int64, error)

func Json

func Json(key string, res any) error

func Persist

func Persist() error

func SetBool

func SetBool(key string, val bool)

func SetFloat

func SetFloat(key string, val float64)

func SetInt

func SetInt(key string, val int64)

func SetJson

func SetJson(key string, val any) error

func SetString

func SetString(key string, val string)

func SetTime

func SetTime(key string, val time.Time)

func String

func String(key string) (string, error)

func Time

func Time(key string) (time.Time, error)

Types

type API

type API interface {
	String(key string) (string, error)
	SetString(key string, value string)
}

type MockAPI

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

MockAPI is a mock of API interface.

func NewMockAPI

func NewMockAPI(ctrl *gomock.Controller) *MockAPI

NewMockAPI creates a new mock instance.

func (*MockAPI) EXPECT

func (m *MockAPI) EXPECT() *MockAPIMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAPI) SetString

func (m *MockAPI) SetString(arg0, arg1 string)

SetString mocks base method.

func (*MockAPI) String

func (m *MockAPI) String(arg0 string) (string, error)

String mocks base method.

type MockAPIMockRecorder

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

MockAPIMockRecorder is the mock recorder for MockAPI.

func (*MockAPIMockRecorder) SetString

func (mr *MockAPIMockRecorder) SetString(arg0, arg1 any) *gomock.Call

SetString indicates an expected call of SetString.

func (*MockAPIMockRecorder) String

func (mr *MockAPIMockRecorder) String(arg0 any) *gomock.Call

String indicates an expected call of String.

type Settings

type Settings struct{}

wrapping Settings into a struct for better decoupling

func (Settings) SetString

func (s Settings) SetString(key string, value string)

func (Settings) String

func (s Settings) String(key string) (string, error)

Jump to

Keyboard shortcuts

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