config

package
v1.4.24-beta003 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoRepository

type MongoRepository struct {
	Coll *mongo.Collection
}

func NewMongoRespository

func NewMongoRespository(db *mongo.Database) *MongoRepository

func (*MongoRepository) Get

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

func (*MongoRepository) GetTelemetryEnabled added in v1.2.34

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) (err error)

type Repository

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

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

	// Upserts 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