models

package
v0.0.0-...-2b023f0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertion

type Assertion struct {
	Group     string  `json:"group,omitempty" yaml:"group,omitempty"`
	Metric    string  `json:"metric" yaml:"metric"`
	Selector  string  `json:"selector,omitempty" yaml:"selector,omitempty"`
	Condition string  `json:"condition" yaml:"condition"`
	Expected  float32 `json:"expected" yaml:"expected"`
}

type Assertions

type Assertions []Assertion

func NewAssertionsFromFile

func NewAssertionsFromFile(path string) (a *Assertions, err error)

func NewAssertionsFromYAML

func NewAssertionsFromYAML(data []byte) (a *Assertions, err error)

func (*Assertions) Path

func (a *Assertions) Path() string

func (*Assertions) ToFile

func (a *Assertions) ToFile(path string) error

func (*Assertions) ToJSON

func (a *Assertions) ToJSON() ([]byte, error)

func (*Assertions) ToYAML

func (a *Assertions) ToYAML() ([]byte, error)

type Build

type Build struct {
	ID          int      `json:"id,omitempty" yaml:"id,omitempty"`
	CreatedAt   string   `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	Env         string   `json:"env" yaml:"env"`
	Label       string   `json:"label,omitempty" yaml:"label,omitempty"`
	Description string   `json:"description,omitempty" yaml:"description,omitempty"`
	Scm         *ScmInfo `json:"scm,omitempty" yaml:"scm,omitempty"`
	Links       []Link   `json:"links" yaml:"links"`
	Passed      *bool    `json:"passed,omitempty" yaml:"passed,omitempty"`
}

func NewBuildFromFile

func NewBuildFromFile(path string) (b *Build, err error)

func NewBuildFromYAML

func NewBuildFromYAML(data []byte) (b *Build, err error)

func (*Build) Path

func (b *Build) Path() string

func (*Build) ToFile

func (b *Build) ToFile(path string) error

func (*Build) ToJSON

func (b *Build) ToJSON() ([]byte, error)

func (*Build) ToYAML

func (b *Build) ToYAML() ([]byte, error)
type Link struct {
	Label string `json:"label" yaml:"label"`
	URL   string `json:"url" yaml:"url"`
}

type Project

type Project struct {
	ID    int    `json:"id,omitempty"`
	Alias string `json:"alias"`
	Name  string `json:"name"`
}

func NewProjectFromJSON

func NewProjectFromJSON(data []byte) (p *Project, err error)

type Report

type Report struct {
	ID          int      `json:"id,omitempty" yaml:"id,omitempty"`
	CreatedAt   string   `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	Label       string   `json:"label,omitempty" yaml:"label,omitempty"`
	Description string   `json:"description,omitempty" yaml:"description,omitempty"`
	Scm         *ScmInfo `json:"scm,omitempty" yaml:"scm,omitempty"`
	Links       []Link   `json:"links" yaml:"links"`
	Passed      *bool    `json:"passed,omitempty" yaml:"passed,omitempty"`
}

func NewReportFromFile

func NewReportFromFile(path string) (r *Report, err error)

func NewReportFromJSON

func NewReportFromJSON(data []byte) (r *Report, err error)

func NewReportFromYAML

func NewReportFromYAML(data []byte) (r *Report, err error)

func (*Report) Path

func (r *Report) Path() string

func (*Report) ToFile

func (r *Report) ToFile(path string) error

func (*Report) ToJSON

func (r *Report) ToJSON() ([]byte, error)

func (*Report) ToYAML

func (r *Report) ToYAML() ([]byte, error)

type ScmInfo

type ScmInfo struct {
	Vcs        *VcsInfo          `json:"vcs,omitempty" yaml:"vcs,omitempty"`
	Parameters map[string]string `json:"parameters" yaml:"parameters"`
}

type VcsInfo

type VcsInfo struct {
	Reference string  `json:"reference" yaml:"reference"`
	Revision  string  `json:"revision" yaml:"revision"`
	Title     *string `json:"title,omitempty" yaml:"title,omitempty"`
}

Jump to

Keyboard shortcuts

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