Documentation ¶
Index ¶
- Constants
- Variables
- type Repository
- func (r *Repository) Count(ctx context.Context, query string) (int, error)
- func (r *Repository) Create(ctx context.Context, updated TestRunner) (TestRunner, error)
- func (r *Repository) Get(ctx context.Context, id id.ID) (TestRunner, error)
- func (r *Repository) GetDefault(ctx context.Context) TestRunner
- func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]TestRunner, error)
- func (r *Repository) Provision(ctx context.Context, testRunner TestRunner) error
- func (r *Repository) SetID(testRunner TestRunner, id id.ID) TestRunner
- func (*Repository) SortingFields() []string
- func (r *Repository) Update(ctx context.Context, updated TestRunner) (TestRunner, error)
- type RequiredGate
- type RequiredGatesResult
- type TestRunner
Constants ¶
View Source
const ( ResourceName = "TestRunner" ResourceNamePlural = "TestRunners" )
Variables ¶
View Source
var DefaultTestRunner = TestRunner{ ID: id.ID("current"), Name: "default", RequiredGates: []RequiredGate{ RequiredGateTestSpecs, RequiredGateAnalyzerRules, RequiredGateAnalyzerScore, }, }
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB) *Repository
func (*Repository) Create ¶
func (r *Repository) Create(ctx context.Context, updated TestRunner) (TestRunner, error)
func (*Repository) Get ¶
func (r *Repository) Get(ctx context.Context, id id.ID) (TestRunner, error)
func (*Repository) GetDefault ¶
func (r *Repository) GetDefault(ctx context.Context) TestRunner
func (*Repository) List ¶
func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]TestRunner, error)
func (*Repository) Provision ¶
func (r *Repository) Provision(ctx context.Context, testRunner TestRunner) error
func (*Repository) SetID ¶
func (r *Repository) SetID(testRunner TestRunner, id id.ID) TestRunner
func (*Repository) SortingFields ¶
func (*Repository) SortingFields() []string
func (*Repository) Update ¶
func (r *Repository) Update(ctx context.Context, updated TestRunner) (TestRunner, error)
type RequiredGate ¶
type RequiredGate string
var ( RequiredGateAnalyzerScore RequiredGate = "analyzer-score" RequiredGateAnalyzerRules RequiredGate = "analyzer-rules" RequiredGateTestSpecs RequiredGate = "test-specs" )
type RequiredGatesResult ¶
type RequiredGatesResult struct { Required []RequiredGate `json:"required"` Failed []RequiredGate `json:"failed"` Passed bool `json:"passed"` }
func NewRequiredGatesResult ¶
func NewRequiredGatesResult(required []RequiredGate) RequiredGatesResult
func (RequiredGatesResult) OnFailed ¶
func (r RequiredGatesResult) OnFailed(failed RequiredGate) RequiredGatesResult
type TestRunner ¶
type TestRunner struct { ID id.ID `json:"id"` Name string `json:"name"` RequiredGates []RequiredGate `json:"requiredGates"` }
func (TestRunner) GetID ¶
func (pp TestRunner) GetID() id.ID
func (TestRunner) HasID ¶
func (pp TestRunner) HasID() bool
func (TestRunner) Validate ¶
func (ppc TestRunner) Validate() error
Click to show internal directories.
Click to hide internal directories.