toolrecord

package
v1.250.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toolrecord

type Toolrecord struct {
	RecordVersion int

	ToolName     string
	ToolInstance string

	// tool agnostic convenience aggregations
	// picks the most specific URL + concatenate the dimension names
	// for easy dashboard / xls creation
	DisplayName string
	DisplayURL  string

	// detailed keydata - needs tool-specific parsing
	Keys []keydataset

	// place for additional context information
	Context map[string]interface{}
	// contains filtered or unexported fields
}

Toolrecord holds all data to locate a tool result in the tool's backend

func New

func New(fileUtils fileWriteUtils, workspace, toolName, toolInstance string) *Toolrecord

New - initialize a new toolrecord

func (*Toolrecord) AddContext

func (tr *Toolrecord) AddContext(label string, data interface{}) error

AddContext - add additional context information second call with the same label will overwrite the first call's data

func (*Toolrecord) AddKeyData

func (tr *Toolrecord) AddKeyData(keyname, keyvalue, displayname, url string) error

AddKeyData - add one key to the current toolrecord calls must follow the tool's hierachy ( e.g. org -> project) as DisplayName & DisplayURL are based on the call sequence

func (*Toolrecord) GenerateDefaultDisplayData added in v1.166.0

func (tr *Toolrecord) GenerateDefaultDisplayData()

GenerateDefaultDisplayData - default aggregation for overall displayName and URL can be overriden by calling SetOverallDisplayData

func (*Toolrecord) GetFileName

func (tr *Toolrecord) GetFileName() string

GetFileName - local filename for the current record

func (*Toolrecord) Persist

func (tr *Toolrecord) Persist() error

Persist - write the current record to file system

func (*Toolrecord) SetOverallDisplayData added in v1.165.0

func (tr *Toolrecord) SetOverallDisplayData(newName, newURL string)

SetOverallDisplayData - override the default generation for DisplayName & DisplayURL

Jump to

Keyboard shortcuts

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