config

package
v0.0.0-...-7113a67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IConfig

type IConfig interface {
	Get(key string) any
	Set(key string, value any)
}

func NewViperConfig

func NewViperConfig(defautPath string, extraPaths []string, logger *zap.Logger) (cfg IConfig, err error)

interface and implementation

type MockIConfig

type MockIConfig struct {
	mock.Mock
}

MockIConfig is an autogenerated mock type for the IConfig type

func NewMockIConfig

func NewMockIConfig(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIConfig

NewMockIConfig creates a new instance of MockIConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockIConfig) Get

func (_m *MockIConfig) Get(key string) interface{}

Get provides a mock function with given fields: key

func (*MockIConfig) Set

func (_m *MockIConfig) Set(key string, value interface{})

Set provides a mock function with given fields: key, value

type ViperConfig

type ViperConfig struct {
}

func (*ViperConfig) Get

func (s *ViperConfig) Get(key string) any

func (*ViperConfig) Set

func (s *ViperConfig) Set(key string, value any)

Jump to

Keyboard shortcuts

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