runtimeconfig

package
v0.0.0-...-86e854f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(log *logrus.Entry, cfg *config.Config) (*runtimeConfig, error)

Types

type MockRuntimeConfig

type MockRuntimeConfig struct {
	mock.Mock
}

MockRuntimeConfig is an autogenerated mock type for the RuntimeConfig type

func NewMockRuntimeConfig

func NewMockRuntimeConfig(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockRuntimeConfig

NewMockRuntimeConfig creates a new instance of MockRuntimeConfig. 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 (*MockRuntimeConfig) APIServerPeer

func (_m *MockRuntimeConfig) APIServerPeer() *pb.Gateway

APIServerPeer provides a mock function with given fields:

func (*MockRuntimeConfig) BuildHelperConfiguration

func (_m *MockRuntimeConfig) BuildHelperConfiguration(peers []*pb.Gateway) *pb.Configuration

BuildHelperConfiguration provides a mock function with given fields: peers

func (*MockRuntimeConfig) ConnectToAPIServer

func (_m *MockRuntimeConfig) ConnectToAPIServer(_a0 context.Context) (pb.APIServerClient, func(), error)

ConnectToAPIServer provides a mock function with given fields: _a0

func (*MockRuntimeConfig) DialAPIServer

func (_m *MockRuntimeConfig) DialAPIServer(_a0 context.Context) (*grpc.ClientConn, error)

DialAPIServer provides a mock function with given fields: _a0

func (*MockRuntimeConfig) EXPECT

func (*MockRuntimeConfig) EnsureEnrolled

func (_m *MockRuntimeConfig) EnsureEnrolled(_a0 context.Context, _a1 string) error

EnsureEnrolled provides a mock function with given fields: _a0, _a1

func (*MockRuntimeConfig) GetActiveTenant

func (_m *MockRuntimeConfig) GetActiveTenant() *pb.Tenant

GetActiveTenant provides a mock function with given fields:

func (*MockRuntimeConfig) GetTenantSession

func (_m *MockRuntimeConfig) GetTenantSession() (*pb.Session, error)

GetTenantSession provides a mock function with given fields:

func (*MockRuntimeConfig) GetToken

func (_m *MockRuntimeConfig) GetToken(_a0 context.Context) (string, error)

GetToken provides a mock function with given fields: _a0

func (*MockRuntimeConfig) LoadEnrollConfig

func (_m *MockRuntimeConfig) LoadEnrollConfig() error

LoadEnrollConfig provides a mock function with given fields:

func (*MockRuntimeConfig) PopulateTenants

func (_m *MockRuntimeConfig) PopulateTenants(_a0 context.Context) error

PopulateTenants provides a mock function with given fields: _a0

func (*MockRuntimeConfig) ResetEnrollConfig

func (_m *MockRuntimeConfig) ResetEnrollConfig()

ResetEnrollConfig provides a mock function with given fields:

func (*MockRuntimeConfig) SaveEnrollConfig

func (_m *MockRuntimeConfig) SaveEnrollConfig() error

SaveEnrollConfig provides a mock function with given fields:

func (*MockRuntimeConfig) SetActiveTenant

func (_m *MockRuntimeConfig) SetActiveTenant(_a0 string) error

SetActiveTenant provides a mock function with given fields: _a0

func (*MockRuntimeConfig) SetTenantSession

func (_m *MockRuntimeConfig) SetTenantSession(_a0 *pb.Session) error

SetTenantSession provides a mock function with given fields: _a0

func (*MockRuntimeConfig) SetToken

func (_m *MockRuntimeConfig) SetToken(_a0 *auth.Tokens)

SetToken provides a mock function with given fields: _a0

func (*MockRuntimeConfig) Tenants

func (_m *MockRuntimeConfig) Tenants() []*pb.Tenant

Tenants provides a mock function with given fields:

type MockRuntimeConfig_APIServerPeer_Call

type MockRuntimeConfig_APIServerPeer_Call struct {
	*mock.Call
}

MockRuntimeConfig_APIServerPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'APIServerPeer'

func (*MockRuntimeConfig_APIServerPeer_Call) Return

func (*MockRuntimeConfig_APIServerPeer_Call) Run

func (*MockRuntimeConfig_APIServerPeer_Call) RunAndReturn

type MockRuntimeConfig_BuildHelperConfiguration_Call

type MockRuntimeConfig_BuildHelperConfiguration_Call struct {
	*mock.Call
}

MockRuntimeConfig_BuildHelperConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildHelperConfiguration'

func (*MockRuntimeConfig_BuildHelperConfiguration_Call) Return

func (*MockRuntimeConfig_BuildHelperConfiguration_Call) Run

func (*MockRuntimeConfig_BuildHelperConfiguration_Call) RunAndReturn

type MockRuntimeConfig_ConnectToAPIServer_Call

type MockRuntimeConfig_ConnectToAPIServer_Call struct {
	*mock.Call
}

MockRuntimeConfig_ConnectToAPIServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectToAPIServer'

func (*MockRuntimeConfig_ConnectToAPIServer_Call) Return

func (*MockRuntimeConfig_ConnectToAPIServer_Call) Run

func (*MockRuntimeConfig_ConnectToAPIServer_Call) RunAndReturn

type MockRuntimeConfig_DialAPIServer_Call

type MockRuntimeConfig_DialAPIServer_Call struct {
	*mock.Call
}

MockRuntimeConfig_DialAPIServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DialAPIServer'

func (*MockRuntimeConfig_DialAPIServer_Call) Return

func (*MockRuntimeConfig_DialAPIServer_Call) Run

func (*MockRuntimeConfig_DialAPIServer_Call) RunAndReturn

type MockRuntimeConfig_EnsureEnrolled_Call

type MockRuntimeConfig_EnsureEnrolled_Call struct {
	*mock.Call
}

MockRuntimeConfig_EnsureEnrolled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureEnrolled'

func (*MockRuntimeConfig_EnsureEnrolled_Call) Return

func (*MockRuntimeConfig_EnsureEnrolled_Call) Run

func (*MockRuntimeConfig_EnsureEnrolled_Call) RunAndReturn

type MockRuntimeConfig_Expecter

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

func (*MockRuntimeConfig_Expecter) APIServerPeer

APIServerPeer is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) BuildHelperConfiguration

func (_e *MockRuntimeConfig_Expecter) BuildHelperConfiguration(peers interface{}) *MockRuntimeConfig_BuildHelperConfiguration_Call

BuildHelperConfiguration is a helper method to define mock.On call

  • peers []*pb.Gateway

func (*MockRuntimeConfig_Expecter) ConnectToAPIServer

func (_e *MockRuntimeConfig_Expecter) ConnectToAPIServer(_a0 interface{}) *MockRuntimeConfig_ConnectToAPIServer_Call

ConnectToAPIServer is a helper method to define mock.On call

  • _a0 context.Context

func (*MockRuntimeConfig_Expecter) DialAPIServer

func (_e *MockRuntimeConfig_Expecter) DialAPIServer(_a0 interface{}) *MockRuntimeConfig_DialAPIServer_Call

DialAPIServer is a helper method to define mock.On call

  • _a0 context.Context

func (*MockRuntimeConfig_Expecter) EnsureEnrolled

func (_e *MockRuntimeConfig_Expecter) EnsureEnrolled(_a0 interface{}, _a1 interface{}) *MockRuntimeConfig_EnsureEnrolled_Call

EnsureEnrolled is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string

func (*MockRuntimeConfig_Expecter) GetActiveTenant

GetActiveTenant is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) GetTenantSession

GetTenantSession is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) GetToken

func (_e *MockRuntimeConfig_Expecter) GetToken(_a0 interface{}) *MockRuntimeConfig_GetToken_Call

GetToken is a helper method to define mock.On call

  • _a0 context.Context

func (*MockRuntimeConfig_Expecter) LoadEnrollConfig

LoadEnrollConfig is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) PopulateTenants

func (_e *MockRuntimeConfig_Expecter) PopulateTenants(_a0 interface{}) *MockRuntimeConfig_PopulateTenants_Call

PopulateTenants is a helper method to define mock.On call

  • _a0 context.Context

func (*MockRuntimeConfig_Expecter) ResetEnrollConfig

ResetEnrollConfig is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) SaveEnrollConfig

SaveEnrollConfig is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) SetActiveTenant

func (_e *MockRuntimeConfig_Expecter) SetActiveTenant(_a0 interface{}) *MockRuntimeConfig_SetActiveTenant_Call

SetActiveTenant is a helper method to define mock.On call

  • _a0 string

func (*MockRuntimeConfig_Expecter) SetTenantSession

func (_e *MockRuntimeConfig_Expecter) SetTenantSession(_a0 interface{}) *MockRuntimeConfig_SetTenantSession_Call

SetTenantSession is a helper method to define mock.On call

  • _a0 *pb.Session

func (*MockRuntimeConfig_Expecter) SetToken

func (_e *MockRuntimeConfig_Expecter) SetToken(_a0 interface{}) *MockRuntimeConfig_SetToken_Call

SetToken is a helper method to define mock.On call

  • _a0 *auth.Tokens

func (*MockRuntimeConfig_Expecter) Tenants

Tenants is a helper method to define mock.On call

type MockRuntimeConfig_GetActiveTenant_Call

type MockRuntimeConfig_GetActiveTenant_Call struct {
	*mock.Call
}

MockRuntimeConfig_GetActiveTenant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveTenant'

func (*MockRuntimeConfig_GetActiveTenant_Call) Return

func (*MockRuntimeConfig_GetActiveTenant_Call) Run

func (*MockRuntimeConfig_GetActiveTenant_Call) RunAndReturn

type MockRuntimeConfig_GetTenantSession_Call

type MockRuntimeConfig_GetTenantSession_Call struct {
	*mock.Call
}

MockRuntimeConfig_GetTenantSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTenantSession'

func (*MockRuntimeConfig_GetTenantSession_Call) Return

func (*MockRuntimeConfig_GetTenantSession_Call) Run

func (*MockRuntimeConfig_GetTenantSession_Call) RunAndReturn

type MockRuntimeConfig_GetToken_Call

type MockRuntimeConfig_GetToken_Call struct {
	*mock.Call
}

MockRuntimeConfig_GetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetToken'

func (*MockRuntimeConfig_GetToken_Call) Return

func (*MockRuntimeConfig_GetToken_Call) Run

func (*MockRuntimeConfig_GetToken_Call) RunAndReturn

type MockRuntimeConfig_LoadEnrollConfig_Call

type MockRuntimeConfig_LoadEnrollConfig_Call struct {
	*mock.Call
}

MockRuntimeConfig_LoadEnrollConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadEnrollConfig'

func (*MockRuntimeConfig_LoadEnrollConfig_Call) Return

func (*MockRuntimeConfig_LoadEnrollConfig_Call) Run

func (*MockRuntimeConfig_LoadEnrollConfig_Call) RunAndReturn

type MockRuntimeConfig_PopulateTenants_Call

type MockRuntimeConfig_PopulateTenants_Call struct {
	*mock.Call
}

MockRuntimeConfig_PopulateTenants_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopulateTenants'

func (*MockRuntimeConfig_PopulateTenants_Call) Return

func (*MockRuntimeConfig_PopulateTenants_Call) Run

func (*MockRuntimeConfig_PopulateTenants_Call) RunAndReturn

type MockRuntimeConfig_ResetEnrollConfig_Call

type MockRuntimeConfig_ResetEnrollConfig_Call struct {
	*mock.Call
}

MockRuntimeConfig_ResetEnrollConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetEnrollConfig'

func (*MockRuntimeConfig_ResetEnrollConfig_Call) Return

func (*MockRuntimeConfig_ResetEnrollConfig_Call) Run

func (*MockRuntimeConfig_ResetEnrollConfig_Call) RunAndReturn

type MockRuntimeConfig_SaveEnrollConfig_Call

type MockRuntimeConfig_SaveEnrollConfig_Call struct {
	*mock.Call
}

MockRuntimeConfig_SaveEnrollConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveEnrollConfig'

func (*MockRuntimeConfig_SaveEnrollConfig_Call) Return

func (*MockRuntimeConfig_SaveEnrollConfig_Call) Run

func (*MockRuntimeConfig_SaveEnrollConfig_Call) RunAndReturn

type MockRuntimeConfig_SetActiveTenant_Call

type MockRuntimeConfig_SetActiveTenant_Call struct {
	*mock.Call
}

MockRuntimeConfig_SetActiveTenant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetActiveTenant'

func (*MockRuntimeConfig_SetActiveTenant_Call) Return

func (*MockRuntimeConfig_SetActiveTenant_Call) Run

func (*MockRuntimeConfig_SetActiveTenant_Call) RunAndReturn

type MockRuntimeConfig_SetTenantSession_Call

type MockRuntimeConfig_SetTenantSession_Call struct {
	*mock.Call
}

MockRuntimeConfig_SetTenantSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTenantSession'

func (*MockRuntimeConfig_SetTenantSession_Call) Return

func (*MockRuntimeConfig_SetTenantSession_Call) Run

func (*MockRuntimeConfig_SetTenantSession_Call) RunAndReturn

type MockRuntimeConfig_SetToken_Call

type MockRuntimeConfig_SetToken_Call struct {
	*mock.Call
}

MockRuntimeConfig_SetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetToken'

func (*MockRuntimeConfig_SetToken_Call) Return

func (*MockRuntimeConfig_SetToken_Call) Run

func (*MockRuntimeConfig_SetToken_Call) RunAndReturn

type MockRuntimeConfig_Tenants_Call

type MockRuntimeConfig_Tenants_Call struct {
	*mock.Call
}

MockRuntimeConfig_Tenants_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tenants'

func (*MockRuntimeConfig_Tenants_Call) Return

func (*MockRuntimeConfig_Tenants_Call) Run

func (*MockRuntimeConfig_Tenants_Call) RunAndReturn

type RuntimeConfig

type RuntimeConfig interface {
	DialAPIServer(context.Context) (*grpc.ClientConn, error)
	APIServerPeer() *pb.Gateway
	ConnectToAPIServer(context.Context) (pb.APIServerClient, func(), error)

	EnsureEnrolled(context.Context, string) error
	ResetEnrollConfig()
	LoadEnrollConfig() error
	SaveEnrollConfig() error

	Tenants() []*pb.Tenant
	GetActiveTenant() *pb.Tenant
	SetActiveTenant(string) error
	PopulateTenants(context.Context) error

	GetTenantSession() (*pb.Session, error)

	GetToken(context.Context) (string, error)
	SetToken(*auth.Tokens)
	SetTenantSession(*pb.Session) error

	BuildHelperConfiguration(peers []*pb.Gateway) *pb.Configuration
}

Jump to

Keyboard shortcuts

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