Documentation ¶
Overview ¶
Package config is a generated GoMock package.
Index ¶
- Constants
- type ConfigMapConfig
- func (c *ConfigMapConfig) Get(ctx context.Context) (result testkube.Config, err error)
- func (c *ConfigMapConfig) GetTelemetryEnabled(ctx context.Context) (ok bool, err error)
- func (c *ConfigMapConfig) GetUniqueClusterId(ctx context.Context) (clusterId string, err error)
- func (c *ConfigMapConfig) Upsert(ctx context.Context, result testkube.Config) (updated testkube.Config, err error)
- type MockRepository
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) Get(arg0 context.Context) (testkube.Config, error)
- func (m *MockRepository) GetTelemetryEnabled(arg0 context.Context) (bool, error)
- func (m *MockRepository) GetUniqueClusterId(arg0 context.Context) (string, error)
- func (m *MockRepository) Upsert(arg0 context.Context, arg1 testkube.Config) (testkube.Config, error)
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) Get(arg0 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetTelemetryEnabled(arg0 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetUniqueClusterId(arg0 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Upsert(arg0, arg1 interface{}) *gomock.Call
- type MongoRepository
- func (r *MongoRepository) Get(ctx context.Context) (result testkube.Config, err error)
- func (r *MongoRepository) GetTelemetryEnabled(ctx context.Context) (ok bool, err error)
- func (r *MongoRepository) GetUniqueClusterId(ctx context.Context) (clusterId string, err error)
- func (r *MongoRepository) Upsert(ctx context.Context, result testkube.Config) (updated testkube.Config, err error)
- type Opt
- type Repository
Constants ¶
const CollectionName = "config"
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) 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
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
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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.
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) 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)
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) }