apis

package
v0.0.0-...-9bcc1a1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComparatorValues = []string{"Unknown", "LB", "HB"}

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel int
const (
	UnknownAccessLevel AccessLevel = iota
	UserAccessLevel
	GroupAccessLevel
	PublicAccessLevel
)

enumerate values for AccessLevel

func ParseAccessLevel

func ParseAccessLevel(value string) (AccessLevel, error)

ParseAccessLevel converts string to its enum representation

func (*AccessLevel) MarshalXML

func (l *AccessLevel) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements custom marshalling for the AccessLevel enumeration

func (*AccessLevel) String

func (l *AccessLevel) String() string

func (*AccessLevel) UnmarshalXML

func (l *AccessLevel) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements unmarshalling for the AccessLevel enumeration

type AccessType

type AccessType int
const (
	UnknownAccessType AccessType = iota
	ReadAccessType
	WriteAccessType
)

enumerate values for AccessType

func ParseAccessType

func ParseAccessType(value string) (AccessType, error)

ParseAccessType converts string to its enum representation

func (*AccessType) MarshalXML

func (p *AccessType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements custom marshalling for the AccessType enumeration

func (*AccessType) String

func (p *AccessType) String() string

func (*AccessType) UnmarshalXML

func (p *AccessType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements unmarshalling for the AccessType enumeration

type Attachment

type Attachment struct {
	File           io.Reader // data
	ContentType    string    // MimeType of the data
	TargetFileName string    // name under which the attachment will be stored in PerfRepo
}

Holds data related to an attachment for TestExecution

type Comparator

type Comparator int
const (
	UnknownComparator Comparator = iota
	LBComparator
	HBComparator
)

enumerate values for Comparator

func ParseComparator

func ParseComparator(value string) (Comparator, error)

ParseComparator converts string to its enum representation

func (*Comparator) MarshalXMLAttr

func (c *Comparator) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

MarshalXMLAttr implements custom marshalling for the Comparator enumeration

func (*Comparator) String

func (c *Comparator) String() string

func (*Comparator) UnmarshalXMLAttr

func (c *Comparator) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr implements unmarshalling for the Comparator enumeration

type CriteriaParameter

type CriteriaParameter struct {
	Name  string `xml:"name"`
	Value string `xml:"value"`
}

type GroupFilter

type GroupFilter int
const (
	UnknownGroupFilter GroupFilter = iota
	MyGroupFilter
	AllGroupFilter
)

enumerate values for GroupFilter

func ParseGroupFilter

func ParseGroupFilter(value string) (GroupFilter, error)

ParseGroupFilter converts string to its enum representation

func (*GroupFilter) MarshalXML

func (p *GroupFilter) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements custom marshalling for the GroupFilter enumeration

func (*GroupFilter) String

func (p *GroupFilter) String() string

func (*GroupFilter) UnmarshalXML

func (p *GroupFilter) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements unmarshalling for the GroupFilter enumeration

type JaxbTime

type JaxbTime struct {
	time.Time
}

func (*JaxbTime) MarshalXMLAttr

func (c *JaxbTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

MarshalXMLAttr implements custom marshalling of date/time attribute compatible with default JAXB format

func (*JaxbTime) String

func (c *JaxbTime) String() string

func (*JaxbTime) UnmarshalXMLAttr

func (c *JaxbTime) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr implements custom unmarshalling of date/time attribute compatible with default JAXB format

type Metric

type Metric struct {
	XMLName     xml.Name   `xml:"metric"`
	Comparator  Comparator `xml:"comparator,attr,omitempty"`
	Name        string     `xml:"name,attr"`
	ID          int64      `xml:"id,attr,omitempty"`
	Description string     `xml:"description,omitempty"`
}

type OrderBy

type OrderBy int
const (
	UnknownOrderBy OrderBy = iota
	DateAscOrderBy
	DateDescOrderBy
	ParameterAscOrderBy
	ParameterDescOrderBy
	VersionAscOrderBy
	VersionDescOrderBy
	NameAscOrderBy
	NameDescOrderBy
	UIDAscOrderBy
	UIDDescOrderBy
	GroupIDAscOrderBy
	GroupIDDescOrderBy
)

enumerate values for OrderBy

func ParseOrderBy

func ParseOrderBy(value string) (OrderBy, error)

ParseOrderBy converts string to its enum representation

func (*OrderBy) MarshalXML

func (p *OrderBy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements custom marshalling for the OrderBy enumeration

func (*OrderBy) String

func (p *OrderBy) String() string

func (*OrderBy) UnmarshalXML

func (p *OrderBy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements unmarshalling for the OrderBy enumeration

type Permission

type Permission struct {
	XMLName     xml.Name
	ID          int64       `xml:"id,omitempty"`
	GroupID     int64       `xml:"group-id,omitempty"`
	ReportID    int64       `xml:"report-id,omitempty"`
	UserID      int64       `xml:"user-id,omitempty"`
	AccessType  AccessType  `xml:"access-type,omitempty"`
	AccessLevel AccessLevel `xml:"access-level,omitempty"`
}

type PropertyMap

type PropertyMap map[string]string

func (*PropertyMap) MarshalXML

func (p *PropertyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals the property map to XML. Go doesn't support marshalling maps out of the box

func (*PropertyMap) UnmarshalXML

func (p *PropertyMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Unmarshall provides custom unmarshalling for the PropertyMap type

type Report

type Report struct {
	XMLName     xml.Name     `xml:"report"`
	ID          int64        `xml:"id,attr,omitempty"`
	Name        string       `xml:"name,attr"`
	Type        string       `xml:"type,attr"`
	User        string       `xml:"user,attr"`
	Permissions []Permission `xml:"permissions>permission,omitempty"`
	Properties  PropertyMap  `xml:"properties"`
}

type Tag

type Tag struct {
	XMLName xml.Name `xml:"tag"`
	ID      int64    `xml:"id,attr,omitempty"`
	Name    string   `xml:"name,attr"`
}

type Test

type Test struct {
	XMLName     xml.Name `xml:"test"`
	Name        string   `xml:"name,attr"`
	GroupID     string   `xml:"groupId,attr"`
	ID          int64    `xml:"id,attr,omitempty"`
	UID         string   `xml:"uid,attr"`
	Description string   `xml:"description,omitempty"`
	Metrics     []Metric `xml:"metrics>metric,omitempty"`
}

type TestExecution

type TestExecution struct {
	XMLName    xml.Name                 `xml:"testExecution"`
	Name       string                   `xml:"name,attr"`
	ID         int64                    `xml:"id,attr,omitempty"`
	Comment    string                   `xml:"comment,omitempty"`
	TestID     int64                    `xml:"testId,attr"`
	TestUID    string                   `xml:"testUid,attr"`
	Started    *JaxbTime                `xml:"started,attr"`
	Parameters []TestExecutionParameter `xml:"parameters>parameter,omitempty"`
	Tags       []Tag                    `xml:"tags>tag,omitempty"`
	Values     []Value                  `xml:"values>value,omitempty"`
}

func (*TestExecution) ParametersMap

func (t *TestExecution) ParametersMap() map[string]string

ParametersMap returns test execution parameters map where key is the t.Name and value is the t.Value

func (*TestExecution) SortedParameters

func (t *TestExecution) SortedParameters() []TestExecutionParameter

SortedParameters returns a sorted copy of the parameters slice

func (*TestExecution) SortedTags

func (t *TestExecution) SortedTags() []Tag

SortedTags returns a sorted copy of the tags slice

type TestExecutionParameter

type TestExecutionParameter struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type TestExecutionSearch

type TestExecutionSearch struct {
	XMLName          xml.Name            `xml:"test-execution-search"`
	GroupFilter      GroupFilter         `xml:"group-filter,omitempty"`
	IDS              *[]int64            `xml:"ids>id,omitempty"` //use pointer to array so that the parent ids element can be ommitted if empty/nil
	LabelParameter   string              `xml:"labelParameter,omitempty"`
	LimitFrom        int                 `xml:"limit-from,omitempty"`
	HowMany          int                 `xml:"how-many,omitempty"`
	OrderBy          OrderBy             `xml:"order-by,omitempty"`
	OrderByParameter string              `xml:"orderByParameter,omitempty"`
	Parameters       []CriteriaParameter `xml:"parameters>parameter,omitempty"`
	ExecutedAfter    *JaxbTime           `xml:"executed-after,omitempty"`
	ExecutedBefore   *JaxbTime           `xml:"executed-before,omitempty"`
	Tags             string              `xml:"tags,omitempty"`
	TestName         string              `xml:"test-name,omitempty"`
	TestUID          string              `xml:"test-uid,omitempty"`
}

type TestExecutions

type TestExecutions struct {
	XMLName        xml.Name        `xml:"testExecutions"`
	TestExecutions []TestExecution `xml:"testExecution"`
}

TestExecutions type holds results of SearchTestExecutions operation

type Value

type Value struct {
	MetricComparator Comparator       `xml:"metricComparator,attr,omitempty"`
	MetricName       string           `xml:"metricName,attr"`
	Result           float64          `xml:"result,attr"`
	Parameters       []ValueParameter `xml:"parameters>parameter,omitempty"`
}

type ValueParameter

type ValueParameter struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

Jump to

Keyboard shortcuts

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