config

package
v0.0.0-...-c092c37 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Overview

Package config is a generated GoMock package.

Index

Constants

View Source
const (

	// ProviderFile constant represents correct string value of program parameter.
	ProviderFile = "file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BlockCacheSize              int                               `mapstructure:"block_cache_size"`
	PoolSize                    int                               `mapstructure:"pool_size"`
	Runners                     int                               `mapstructure:"runners"`
	RemoteConfigRefreshInterval time.Duration                     `mapstructure:"remote_config_refresh_interval"`
	CommonParameters            map[string]map[string]interface{} `mapstructure:"common_parameters"`
	Rules                       model.Rules                       `mapstructure:"rules"`
}

Config represents config for webhooker. It contains common settings and rules.

func New

func New(
	readFileFunc func(string) ([]byte, error),
	configer configer,
	provider, rawPath string,
	logger *logrus.Logger,
	taskExecutors map[string]executor.TaskExecutor,
	refreshIterations int,
) (*Config, error)

New creates Config instance.

type Mockconfiger

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

Mockconfiger is a mock of configer interface

func NewMockconfiger

func NewMockconfiger(ctrl *gomock.Controller) *Mockconfiger

NewMockconfiger creates a new mock instance

func (*Mockconfiger) AddRemoteProvider

func (m *Mockconfiger) AddRemoteProvider(provider, endpoint, path string) error

AddRemoteProvider mocks base method

func (*Mockconfiger) EXPECT

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

func (*Mockconfiger) ReadConfig

func (m *Mockconfiger) ReadConfig(in io.Reader) error

ReadConfig mocks base method

func (*Mockconfiger) ReadRemoteConfig

func (m *Mockconfiger) ReadRemoteConfig() error

ReadRemoteConfig mocks base method

func (*Mockconfiger) SetConfigType

func (m *Mockconfiger) SetConfigType(in string)

SetConfigType mocks base method

func (*Mockconfiger) Unmarshal

func (m *Mockconfiger) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error

Unmarshal mocks base method

func (*Mockconfiger) WatchRemoteConfig

func (m *Mockconfiger) WatchRemoteConfig() error

WatchRemoteConfig mocks base method

type MockconfigerMockRecorder

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

MockconfigerMockRecorder is the mock recorder for Mockconfiger

func (*MockconfigerMockRecorder) AddRemoteProvider

func (mr *MockconfigerMockRecorder) AddRemoteProvider(provider, endpoint, path interface{}) *gomock.Call

AddRemoteProvider indicates an expected call of AddRemoteProvider

func (*MockconfigerMockRecorder) ReadConfig

func (mr *MockconfigerMockRecorder) ReadConfig(in interface{}) *gomock.Call

ReadConfig indicates an expected call of ReadConfig

func (*MockconfigerMockRecorder) ReadRemoteConfig

func (mr *MockconfigerMockRecorder) ReadRemoteConfig() *gomock.Call

ReadRemoteConfig indicates an expected call of ReadRemoteConfig

func (*MockconfigerMockRecorder) SetConfigType

func (mr *MockconfigerMockRecorder) SetConfigType(in interface{}) *gomock.Call

SetConfigType indicates an expected call of SetConfigType

func (*MockconfigerMockRecorder) Unmarshal

func (mr *MockconfigerMockRecorder) Unmarshal(rawVal interface{}, opts ...interface{}) *gomock.Call

Unmarshal indicates an expected call of Unmarshal

func (*MockconfigerMockRecorder) WatchRemoteConfig

func (mr *MockconfigerMockRecorder) WatchRemoteConfig() *gomock.Call

WatchRemoteConfig indicates an expected call of WatchRemoteConfig

Jump to

Keyboard shortcuts

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