view

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WidgetParamJunitIsApi              = "is_api"
	WidgetParamJunitDir                = "directory"
	WidgetParamJunitScreenshotDirs     = "screenshot_directories"
	WidgetParamJunitScreenshotFilemask = "screenshot_filemask"
	WidgetParamJunitVideoDirs          = "video_directories"
	WidgetParamJunitVideoFilemask      = "video_filemask"
	WidgetInternalParamJunitTestSuites = "test_suites"
)
View Source
const (
	WidgetTypeJunit = "Junit"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	FindJunitWidgets(ctx context.Context) ([]Widget, error)
	FindJunitWidgetsTestSuiteIDs(ctx context.Context,
		widgetIDs []string) (testSuiteIDs []string, err error)
	AddTestSuitesToJunitWidgets(
		ctx context.Context,
		widgetIDs, testSuiteIDs []string,
	) error
	RemoveTestSuitesFromJunitWidgets(
		ctx context.Context,
		testSuiteIDs []string,
	) error
}

func NewMongoAdapter

func NewMongoAdapter(client mongo.DbClient) Adapter

type Group

type Group struct {
	ID       string        `bson:"_id"`
	Title    string        `bson:"title"`
	Author   string        `bson:"author"`
	Position int64         `bson:"position"`
	Created  types.CpsTime `bson:"created"`
	Updated  types.CpsTime `bson:"updated"`
}

type Tab

type Tab struct {
	ID      string   `bson:"_id" json:"_id"`
	Title   string   `bson:"title" json:"title"`
	Widgets []Widget `bson:"widgets" json:"widgets"`
}

type View

type View struct {
	ID              string                     `bson:"_id"`
	Enabled         bool                       `bson:"enabled"`
	Title           string                     `bson:"title"`
	Description     string                     `bson:"description"`
	Group           string                     `bson:"group_id"`
	Tabs            []Tab                      `bson:"tabs"`
	Tags            []string                   `bson:"tags"`
	PeriodicRefresh *types.DurationWithEnabled `bson:"periodic_refresh"`
	Author          string                     `bson:"author"`
	Position        int64                      `bson:"position"`
	Created         types.CpsTime              `bson:"created"`
	Updated         types.CpsTime              `bson:"updated"`
}

type Widget

type Widget struct {
	ID                 string                 `bson:"_id" json:"_id"`
	Title              string                 `bson:"title" json:"title"`
	Type               string                 `bson:"type" json:"type"`
	GridParameters     map[string]interface{} `bson:"grid_parameters" json:"grid_parameters"`
	Parameters         map[string]interface{} `bson:"parameters" json:"parameters"`
	InternalParameters map[string]interface{} `bson:"internal_parameters,omitempty" json:"-"`
}

func (Widget) GetBoolParameter

func (w Widget) GetBoolParameter(k string, defaultVal bool) bool

func (Widget) GetDurationParameter

func (w Widget) GetDurationParameter(k string, defaultVal time.Duration) time.Duration

func (Widget) GetStringParameter

func (w Widget) GetStringParameter(k, defaultVal string) string

func (Widget) GetStringsInternalParameter

func (w Widget) GetStringsInternalParameter(k string, defaultVal []string) []string

func (Widget) GetStringsParameter

func (w Widget) GetStringsParameter(k string, defaultVal []string) []string

Jump to

Keyboard shortcuts

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