config

package
v0.0.0-...-834e164 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(pConfigName string) error

Types

type ConfigInterface

type ConfigInterface interface {
	ReadConfig(*pflag.FlagSet) error
	Stop()
	GetString(key string) string
	GetFloat64(key string) float64
	GetInt(key string) int
	GetInt32(key string) int32
	GetInt64(key string) int64
	GetUint(key string) uint
	GetUint16(key string) uint16
	GetUint32(key string) uint32
	GetUint64(key string) uint64
	GetBool(key string) bool

	GetStringSlice(key string) []string
	GetIntSlice(key string) []int

	Set(key string, value interface{})
	SetDefault(key string, value interface{})
}

func GetConfig

func GetConfig() (ConfigInterface, error)

该函数可以并发访问

type MockConfigInterface

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

MockConfigInterface is a mock of ConfigInterface interface.

func NewMockConfigInterface

func NewMockConfigInterface(ctrl *gomock.Controller) *MockConfigInterface

NewMockConfigInterface creates a new mock instance.

func RegisterAndUseMockConfig

func RegisterAndUseMockConfig(mockCtl *gomock.Controller) *MockConfigInterface

func (*MockConfigInterface) EXPECT

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

func (*MockConfigInterface) GetBool

func (m *MockConfigInterface) GetBool(key string) bool

GetBool mocks base method.

func (*MockConfigInterface) GetFloat64

func (m *MockConfigInterface) GetFloat64(key string) float64

GetFloat64 mocks base method.

func (*MockConfigInterface) GetInt

func (m *MockConfigInterface) GetInt(key string) int

GetInt mocks base method.

func (*MockConfigInterface) GetInt32

func (m *MockConfigInterface) GetInt32(key string) int32

GetInt32 mocks base method.

func (*MockConfigInterface) GetInt64

func (m *MockConfigInterface) GetInt64(key string) int64

GetInt64 mocks base method.

func (*MockConfigInterface) GetIntSlice

func (m *MockConfigInterface) GetIntSlice(key string) []int

GetIntSlice mocks base method.

func (*MockConfigInterface) GetString

func (m *MockConfigInterface) GetString(key string) string

GetString mocks base method.

func (*MockConfigInterface) GetStringSlice

func (m *MockConfigInterface) GetStringSlice(key string) []string

GetStringSlice mocks base method.

func (*MockConfigInterface) GetUint

func (m *MockConfigInterface) GetUint(key string) uint

GetUint mocks base method.

func (*MockConfigInterface) GetUint16

func (m *MockConfigInterface) GetUint16(key string) uint16

GetUint16 mocks base method.

func (*MockConfigInterface) GetUint32

func (m *MockConfigInterface) GetUint32(key string) uint32

GetUint32 mocks base method.

func (*MockConfigInterface) GetUint64

func (m *MockConfigInterface) GetUint64(key string) uint64

GetUint64 mocks base method.

func (*MockConfigInterface) ReadConfig

func (m *MockConfigInterface) ReadConfig(arg0 *pflag.FlagSet) error

ReadConfig mocks base method.

func (*MockConfigInterface) Set

func (m *MockConfigInterface) Set(key string, value interface{})

Set mocks base method.

func (*MockConfigInterface) SetDefault

func (m *MockConfigInterface) SetDefault(key string, value interface{})

SetDefault mocks base method.

func (*MockConfigInterface) Stop

func (m *MockConfigInterface) Stop()

Stop mocks base method.

type MockConfigInterfaceMockRecorder

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

MockConfigInterfaceMockRecorder is the mock recorder for MockConfigInterface.

func (*MockConfigInterfaceMockRecorder) GetBool

func (mr *MockConfigInterfaceMockRecorder) GetBool(key interface{}) *gomock.Call

GetBool indicates an expected call of GetBool.

func (*MockConfigInterfaceMockRecorder) GetFloat64

func (mr *MockConfigInterfaceMockRecorder) GetFloat64(key interface{}) *gomock.Call

GetFloat64 indicates an expected call of GetFloat64.

func (*MockConfigInterfaceMockRecorder) GetInt

func (mr *MockConfigInterfaceMockRecorder) GetInt(key interface{}) *gomock.Call

GetInt indicates an expected call of GetInt.

func (*MockConfigInterfaceMockRecorder) GetInt32

func (mr *MockConfigInterfaceMockRecorder) GetInt32(key interface{}) *gomock.Call

GetInt32 indicates an expected call of GetInt32.

func (*MockConfigInterfaceMockRecorder) GetInt64

func (mr *MockConfigInterfaceMockRecorder) GetInt64(key interface{}) *gomock.Call

GetInt64 indicates an expected call of GetInt64.

func (*MockConfigInterfaceMockRecorder) GetIntSlice

func (mr *MockConfigInterfaceMockRecorder) GetIntSlice(key interface{}) *gomock.Call

GetIntSlice indicates an expected call of GetIntSlice.

func (*MockConfigInterfaceMockRecorder) GetString

func (mr *MockConfigInterfaceMockRecorder) GetString(key interface{}) *gomock.Call

GetString indicates an expected call of GetString.

func (*MockConfigInterfaceMockRecorder) GetStringSlice

func (mr *MockConfigInterfaceMockRecorder) GetStringSlice(key interface{}) *gomock.Call

GetStringSlice indicates an expected call of GetStringSlice.

func (*MockConfigInterfaceMockRecorder) GetUint

func (mr *MockConfigInterfaceMockRecorder) GetUint(key interface{}) *gomock.Call

GetUint indicates an expected call of GetUint.

func (*MockConfigInterfaceMockRecorder) GetUint16

func (mr *MockConfigInterfaceMockRecorder) GetUint16(key interface{}) *gomock.Call

GetUint16 indicates an expected call of GetUint16.

func (*MockConfigInterfaceMockRecorder) GetUint32

func (mr *MockConfigInterfaceMockRecorder) GetUint32(key interface{}) *gomock.Call

GetUint32 indicates an expected call of GetUint32.

func (*MockConfigInterfaceMockRecorder) GetUint64

func (mr *MockConfigInterfaceMockRecorder) GetUint64(key interface{}) *gomock.Call

GetUint64 indicates an expected call of GetUint64.

func (*MockConfigInterfaceMockRecorder) ReadConfig

func (mr *MockConfigInterfaceMockRecorder) ReadConfig(arg0 interface{}) *gomock.Call

ReadConfig indicates an expected call of ReadConfig.

func (*MockConfigInterfaceMockRecorder) Set

func (mr *MockConfigInterfaceMockRecorder) Set(key, value interface{}) *gomock.Call

Set indicates an expected call of Set.

func (*MockConfigInterfaceMockRecorder) SetDefault

func (mr *MockConfigInterfaceMockRecorder) SetDefault(key, value interface{}) *gomock.Call

SetDefault indicates an expected call of SetDefault.

func (*MockConfigInterfaceMockRecorder) Stop

Stop indicates an expected call of Stop.

Jump to

Keyboard shortcuts

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