config

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package config is a generated GoMock package.

Index

Constants

View Source
const CollectionName = "config"
View Source
const Id = "api"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapConfig added in v1.9.18

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

ConfigMapConfig contains configmap config properties

func NewConfigMapConfig added in v1.9.18

func NewConfigMapConfig(name, namespace string) (*ConfigMapConfig, error)

NewConfigMapConfig is a constructor for configmap config

func (*ConfigMapConfig) Get added in v1.9.18

func (c *ConfigMapConfig) Get(ctx context.Context) (result testkube.Config, err error)

Get config

func (*ConfigMapConfig) GetTelemetryEnabled added in v1.9.18

func (c *ConfigMapConfig) GetTelemetryEnabled(ctx context.Context) (ok bool, err error)

GetTelemetryEnabled get telemetry enabled

func (*ConfigMapConfig) GetUniqueClusterId added in v1.9.18

func (c *ConfigMapConfig) GetUniqueClusterId(ctx context.Context) (clusterId string, err error)

GetUniqueClusterId gets unique cluster based ID

func (*ConfigMapConfig) Upsert added in v1.9.18

func (c *ConfigMapConfig) Upsert(ctx context.Context, result testkube.Config) (updated testkube.Config, err error)

Upsert inserts record if not exists, updates otherwise

type MockRepository added in v1.9.18

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

MockRepository is a mock of Repository interface.

func NewMockRepository added in v1.9.18

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) EXPECT added in v1.9.18

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

func (*MockRepository) Get added in v1.9.18

Get mocks base method.

func (*MockRepository) GetTelemetryEnabled added in v1.9.18

func (m *MockRepository) GetTelemetryEnabled(arg0 context.Context) (bool, error)

GetTelemetryEnabled mocks base method.

func (*MockRepository) GetUniqueClusterId added in v1.9.18

func (m *MockRepository) GetUniqueClusterId(arg0 context.Context) (string, error)

GetUniqueClusterId mocks base method.

func (*MockRepository) Upsert added in v1.9.18

func (m *MockRepository) Upsert(arg0 context.Context, arg1 testkube.Config) (testkube.Config, error)

Upsert mocks base method.

type MockRepositoryMockRecorder added in v1.9.18

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

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) Get added in v1.9.18

func (mr *MockRepositoryMockRecorder) Get(arg0 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockRepositoryMockRecorder) GetTelemetryEnabled added in v1.9.18

func (mr *MockRepositoryMockRecorder) GetTelemetryEnabled(arg0 interface{}) *gomock.Call

GetTelemetryEnabled indicates an expected call of GetTelemetryEnabled.

func (*MockRepositoryMockRecorder) GetUniqueClusterId added in v1.9.18

func (mr *MockRepositoryMockRecorder) GetUniqueClusterId(arg0 interface{}) *gomock.Call

GetUniqueClusterId indicates an expected call of GetUniqueClusterId.

func (*MockRepositoryMockRecorder) Upsert added in v1.9.18

func (mr *MockRepositoryMockRecorder) Upsert(arg0, arg1 interface{}) *gomock.Call

Upsert indicates an expected call of Upsert.

type MongoRepository

type MongoRepository struct {
	Coll *mongo.Collection
}

func NewMongoRepository added in v1.8.36

func NewMongoRepository(db *mongo.Database, opts ...Opt) *MongoRepository

func (*MongoRepository) Get

func (r *MongoRepository) Get(ctx context.Context) (result testkube.Config, err error)

func (*MongoRepository) GetTelemetryEnabled

func (r *MongoRepository) GetTelemetryEnabled(ctx context.Context) (ok bool, err error)

func (*MongoRepository) GetUniqueClusterId

func (r *MongoRepository) GetUniqueClusterId(ctx context.Context) (clusterId string, err error)

func (*MongoRepository) Upsert

func (r *MongoRepository) Upsert(ctx context.Context, result testkube.Config) (updated testkube.Config, err error)

type Opt added in v1.8.36

type Opt func(*MongoRepository)

func WithMongoRepositoryCollection added in v1.9.18

func WithMongoRepositoryCollection(collection *mongo.Collection) Opt

type Repository

type Repository interface {
	// GetUniqueClusterId gets unique cluster based ID
	GetUniqueClusterId(ctx context.Context) (string, error)

	// GetTelemetryEnabled get telemetry enabled
	GetTelemetryEnabled(ctx context.Context) (ok bool, err error)

	// Get gets execution result by id
	Get(ctx context.Context) (testkube.Config, error)

	// Upsert inserts record if not exists, updates otherwise
	Upsert(ctx context.Context, config testkube.Config) (testkube.Config, error)
}

Jump to

Keyboard shortcuts

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