Documentation ¶
Index ¶
- Constants
- 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) (err error)
- type Repository
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) 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)
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) }
Click to show internal directories.
Click to hide internal directories.