tools

package
v2.6.6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package tools provides utility functions for the service package.

Index

Constants

This section is empty.

Variables

View Source
var ErrGitHubAPIUnresponsive = errors.New("GitHub API is unresponsive")

Functions

func RenderIfTemplatized added in v2.4.2

func RenderIfTemplatized(val interface{}) (bool, interface{}, error)

Types

type Service

type Service interface {
	Update(ctx context.Context) error
	CreateConfig(ctx context.Context, filePath string, config string) error
	SendTelemetry(event string, output ...*sync.Map)
	Login(ctx context.Context) bool
	Export(ctx context.Context) error
	Import(ctx context.Context, path, basePath string) error
	Templatize(ctx context.Context) error
}

func NewTools

func NewTools(logger *zap.Logger, testsetConfig TestSetConfig, testDB TestDB, telemetry teleDB, auth service.Auth, config *config.Config) Service

type TestDB added in v2.4.2

type TestDB interface {
	GetAllTestSetIDs(ctx context.Context) ([]string, error)
	GetTestCases(ctx context.Context, testSetID string) ([]*models.TestCase, error)
	UpdateTestCase(ctx context.Context, testCase *models.TestCase, testSetID string, enableLog bool) error
	DeleteTests(ctx context.Context, testSetID string, testCaseIDs []string) error
	DeleteTestSet(ctx context.Context, testSetID string) error
}

type TestSetConfig added in v2.4.2

type TestSetConfig interface {
	Read(ctx context.Context, testSetID string) (*models.TestSet, error)
	Write(ctx context.Context, testSetID string, testSet *models.TestSet) error
}

type Tools

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

func (*Tools) CreateConfig

func (t *Tools) CreateConfig(_ context.Context, filePath string, configData string) error

func (*Tools) Export

func (t *Tools) Export(ctx context.Context) error

func (*Tools) IgnoreTestSet

func (t *Tools) IgnoreTestSet(_ context.Context, _ string) error

func (*Tools) IgnoreTests

func (t *Tools) IgnoreTests(_ context.Context, _ string, _ []string) error

func (*Tools) Import

func (t *Tools) Import(ctx context.Context, path, basePath string) error

func (*Tools) Login

func (t *Tools) Login(ctx context.Context) bool

func (*Tools) ProcessTestCases added in v2.4.2

func (t *Tools) ProcessTestCases(ctx context.Context, tcs []*models.TestCase, testSetID string) error

func (*Tools) SendTelemetry

func (t *Tools) SendTelemetry(event string, output ...*sync.Map)

func (*Tools) Templatize added in v2.4.2

func (t *Tools) Templatize(ctx context.Context) error

func (*Tools) Update

func (t *Tools) Update(ctx context.Context) error

Update initiates the tools process for the Keploy binary file.

Jump to

Keyboard shortcuts

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