runtimeconfig

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerInfo

type APIServerInfo struct {
	Client     pb.APIServerClient
	SessionKey string
}

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 (_mock *MockRuntimeConfig) APIServerPeer() *pb.Gateway

APIServerPeer provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) BuildHelperConfiguration

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

BuildHelperConfiguration provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) ConnectToAPIServer

func (_mock *MockRuntimeConfig) ConnectToAPIServer(context1 context.Context) (pb.APIServerClient, func(), error)

ConnectToAPIServer provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) DialAPIServer

func (_mock *MockRuntimeConfig) DialAPIServer(context1 context.Context) (*grpc.ClientConn, error)

DialAPIServer provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) EXPECT

func (*MockRuntimeConfig) EnsureEnrolled

func (_mock *MockRuntimeConfig) EnsureEnrolled(context1 context.Context, s string) error

EnsureEnrolled provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) GetActiveTenant

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

GetActiveTenant provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) GetDomainFromToken

func (_mock *MockRuntimeConfig) GetDomainFromToken() string

GetDomainFromToken provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) GetJitaToken

func (_mock *MockRuntimeConfig) GetJitaToken(context1 context.Context) *oauth2.Token

GetJitaToken provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) GetTenantSession

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

GetTenantSession provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) GetToken

func (_mock *MockRuntimeConfig) GetToken(context1 context.Context) (string, error)

GetToken provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) LoadEnrollConfig

func (_mock *MockRuntimeConfig) LoadEnrollConfig() error

LoadEnrollConfig provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) PopulateTenants

func (_mock *MockRuntimeConfig) PopulateTenants(context1 context.Context) error

PopulateTenants provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) ResetEnrollConfig

func (_mock *MockRuntimeConfig) ResetEnrollConfig()

ResetEnrollConfig provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SaveEnrollConfig

func (_mock *MockRuntimeConfig) SaveEnrollConfig() error

SaveEnrollConfig provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SetAPIServerInfo

func (_mock *MockRuntimeConfig) SetAPIServerInfo(aPIServerClient pb.APIServerClient, s string)

SetAPIServerInfo provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SetActiveTenant

func (_mock *MockRuntimeConfig) SetActiveTenant(s string) error

SetActiveTenant provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SetJitaToken

func (_mock *MockRuntimeConfig) SetJitaToken(token *oauth2.Token)

SetJitaToken provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SetTenantSession

func (_mock *MockRuntimeConfig) SetTenantSession(session *pb.Session) error

SetTenantSession provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) SetToken

func (_mock *MockRuntimeConfig) SetToken(tokens *auth.Tokens)

SetToken provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) Tenants

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

Tenants provides a mock function for the type MockRuntimeConfig

func (*MockRuntimeConfig) WithAPIServer

func (_mock *MockRuntimeConfig) WithAPIServer(fn func(pb.APIServerClient, string) error) error

WithAPIServer provides a mock function for the type MockRuntimeConfig

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(context1 interface{}) *MockRuntimeConfig_ConnectToAPIServer_Call

ConnectToAPIServer is a helper method to define mock.On call

  • context1 context.Context

func (*MockRuntimeConfig_Expecter) DialAPIServer

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

DialAPIServer is a helper method to define mock.On call

  • context1 context.Context

func (*MockRuntimeConfig_Expecter) EnsureEnrolled

func (_e *MockRuntimeConfig_Expecter) EnsureEnrolled(context1 interface{}, s interface{}) *MockRuntimeConfig_EnsureEnrolled_Call

EnsureEnrolled is a helper method to define mock.On call

  • context1 context.Context
  • s string

func (*MockRuntimeConfig_Expecter) GetActiveTenant

GetActiveTenant is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) GetDomainFromToken

GetDomainFromToken is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) GetJitaToken

func (_e *MockRuntimeConfig_Expecter) GetJitaToken(context1 interface{}) *MockRuntimeConfig_GetJitaToken_Call

GetJitaToken is a helper method to define mock.On call

  • context1 context.Context

func (*MockRuntimeConfig_Expecter) GetTenantSession

GetTenantSession is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) GetToken

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

GetToken is a helper method to define mock.On call

  • context1 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(context1 interface{}) *MockRuntimeConfig_PopulateTenants_Call

PopulateTenants is a helper method to define mock.On call

  • context1 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) SetAPIServerInfo

func (_e *MockRuntimeConfig_Expecter) SetAPIServerInfo(aPIServerClient interface{}, s interface{}) *MockRuntimeConfig_SetAPIServerInfo_Call

SetAPIServerInfo is a helper method to define mock.On call

  • aPIServerClient pb.APIServerClient
  • s string

func (*MockRuntimeConfig_Expecter) SetActiveTenant

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

SetActiveTenant is a helper method to define mock.On call

  • s string

func (*MockRuntimeConfig_Expecter) SetJitaToken

func (_e *MockRuntimeConfig_Expecter) SetJitaToken(token interface{}) *MockRuntimeConfig_SetJitaToken_Call

SetJitaToken is a helper method to define mock.On call

  • token *oauth2.Token

func (*MockRuntimeConfig_Expecter) SetTenantSession

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

SetTenantSession is a helper method to define mock.On call

  • session *pb.Session

func (*MockRuntimeConfig_Expecter) SetToken

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

SetToken is a helper method to define mock.On call

  • tokens *auth.Tokens

func (*MockRuntimeConfig_Expecter) Tenants

Tenants is a helper method to define mock.On call

func (*MockRuntimeConfig_Expecter) WithAPIServer

func (_e *MockRuntimeConfig_Expecter) WithAPIServer(fn interface{}) *MockRuntimeConfig_WithAPIServer_Call

WithAPIServer is a helper method to define mock.On call

  • fn func(pb.APIServerClient, string) error

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_GetDomainFromToken_Call

type MockRuntimeConfig_GetDomainFromToken_Call struct {
	*mock.Call
}

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

func (*MockRuntimeConfig_GetDomainFromToken_Call) Return

func (*MockRuntimeConfig_GetDomainFromToken_Call) Run

func (*MockRuntimeConfig_GetDomainFromToken_Call) RunAndReturn

type MockRuntimeConfig_GetJitaToken_Call

type MockRuntimeConfig_GetJitaToken_Call struct {
	*mock.Call
}

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

func (*MockRuntimeConfig_GetJitaToken_Call) Return

func (*MockRuntimeConfig_GetJitaToken_Call) Run

func (*MockRuntimeConfig_GetJitaToken_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_SetAPIServerInfo_Call

type MockRuntimeConfig_SetAPIServerInfo_Call struct {
	*mock.Call
}

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

func (*MockRuntimeConfig_SetAPIServerInfo_Call) Return

func (*MockRuntimeConfig_SetAPIServerInfo_Call) Run

func (*MockRuntimeConfig_SetAPIServerInfo_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_SetJitaToken_Call

type MockRuntimeConfig_SetJitaToken_Call struct {
	*mock.Call
}

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

func (*MockRuntimeConfig_SetJitaToken_Call) Return

func (*MockRuntimeConfig_SetJitaToken_Call) Run

func (*MockRuntimeConfig_SetJitaToken_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

func (_c *MockRuntimeConfig_SetToken_Call) RunAndReturn(run func(tokens *auth.Tokens)) *MockRuntimeConfig_SetToken_Call

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 MockRuntimeConfig_WithAPIServer_Call

type MockRuntimeConfig_WithAPIServer_Call struct {
	*mock.Call
}

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

func (*MockRuntimeConfig_WithAPIServer_Call) Return

func (*MockRuntimeConfig_WithAPIServer_Call) Run

func (*MockRuntimeConfig_WithAPIServer_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)

	GetDomainFromToken() string
	GetToken(context.Context) (string, error)
	SetToken(*auth.Tokens)
	SetTenantSession(*pb.Session) error
	GetJitaToken(context.Context) *oauth2.Token
	SetJitaToken(*oauth2.Token)

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

	WithAPIServer(func(pb.APIServerClient, string) error) error
	SetAPIServerInfo(pb.APIServerClient, string)
}

func New

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

Jump to

Keyboard shortcuts

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