types

package
v0.0.0-...-0e6d151 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Unknown = State(iota)
	Queued
	Started
	Finished
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentPool

type AgentPool struct {
	ID   int    `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Href string `json:"href,omitempty"`
}

type AgentPoolAttachment

type AgentPoolAttachment struct {
	ProjectID string `json:"id,omitempty"`
}

type AgentPoolId

type AgentPoolId int

func (AgentPoolId) MarshalJSON

func (v AgentPoolId) MarshalJSON() ([]byte, error)

type AgentPools

type AgentPools struct {
	ID       int      `json:"id,omitempty"`
	Name     string   `json:"name,omitempty"`
	Href     string   `json:"href,omitempty"`
	Projects Projects `json:"projects,omitempty"`
}

type AttachedProjects

type AttachedProjects map[string]string

type Build

type Build struct {
	ID          int64
	BuildTypeID string
	BuildType   struct {
		ID          string
		Name        string
		Description string
		ProjectName string
		ProjectID   string
		HREF        string
		WebURL      string
	}
	Triggered struct {
		Type string
		Date JSONTime
		User struct {
			Username string
		}
	}
	Changes struct {
		Change []Change
	}

	QueuedDate    JSONTime
	StartDate     JSONTime
	FinishDate    JSONTime
	Number        string
	Status        string
	StatusText    string
	State         string
	BranchName    string
	Personal      bool
	Running       bool
	Pinned        bool
	DefaultBranch bool
	HREF          string
	WebURL        string
	Agent         struct {
		ID     int64
		Name   string
		TypeID int64
		HREF   string
	}

	ProblemOccurrences struct {
		ProblemOccurrence []ProblemOccurrence
	}

	TestOccurrences struct {
		TestOccurrence []TestOccurrence
	}

	Tags []string `json:"tags,omitempty"`

	Properties Properties `json:"properties"`
}

Build represents a TeamCity build, along with its metadata.

func (*Build) ComputedState

func (b *Build) ComputedState() State

func (*Build) String

func (b *Build) String() string

type BuildAgentRequirement

type BuildAgentRequirement struct {
	ID         string     `json:"id"`
	Type       string     `json:"type"`
	Properties Properties `json:"properties"`
}

type BuildAgentRequirements

type BuildAgentRequirements []BuildAgentRequirement

func (BuildAgentRequirements) MarshalJSON

func (bf BuildAgentRequirements) MarshalJSON() ([]byte, error)

func (*BuildAgentRequirements) UnmarshalJSON

func (bf *BuildAgentRequirements) UnmarshalJSON(b []byte) error

type BuildArtifactDependencies

type BuildArtifactDependencies []BuildArtifactDependency

func (BuildArtifactDependencies) MarshalJSON

func (bsd BuildArtifactDependencies) MarshalJSON() ([]byte, error)

func (*BuildArtifactDependencies) UnmarshalJSON

func (bsd *BuildArtifactDependencies) UnmarshalJSON(b []byte) error

type BuildArtifactDependency

type BuildArtifactDependency struct {
	ID              string     `json:"id"`
	Type            string     `json:"type"`
	Properties      Properties `json:"properties"`
	SourceBuildType BuildType  `json:"source-buildType"`
}

type BuildConfiguration

type BuildConfiguration struct {
	ID                   string                    `json:"id,omitempty"`
	ProjectID            string                    `json:"projectId"`
	TemplateFlag         bool                      `json:"templateFlag"`
	TemplateID           TemplateId                `json:"template,omitempty"`
	Name                 string                    `json:"name"`
	Description          string                    `json:"description,omitempty"`
	VcsRootEntries       VcsRootEntries            `json:"vcs-root-entries,omitempty"`
	Settings             BuildSettings             `json:"settings,omitempty"`
	Parameters           Parameters                `json:"parameters,omitempty"`
	Steps                BuildSteps                `json:"steps,omitempty"`
	Features             BuildFeatures             `json:"features,omitempty"`
	Triggers             BuildTriggers             `json:"triggers,omitempty"`
	SnapshotDependencies BuildSnapshotDependencies `json:"snapshot-dependencies,omitempty"`
	ArtifactDependencies BuildArtifactDependencies `json:"artifact-dependencies,omitempty"`
	AgentRequirements    BuildAgentRequirements    `json:"agent-requirements,omitempty"`
}

type BuildConfigurationShort

type BuildConfigurationShort struct {
	ID           string `json:"id"`
	ProjectID    string `json:"projectId,omitempty"`
	TemplateFlag bool   `json:"templateFlag,omitempty"`
	Name         string `json:"name,omitempty"`
	Href         string `json:"href,omitempty"`
}

type BuildConfigurations

type BuildConfigurations map[string]BuildConfiguration

func (BuildConfigurations) MarshalJSON

func (bc BuildConfigurations) MarshalJSON() ([]byte, error)

func (*BuildConfigurations) UnmarshalJSON

func (bc *BuildConfigurations) UnmarshalJSON(b []byte) error

type BuildFeature

type BuildFeature struct {
	ID         string     `json:"id"`
	Type       string     `json:"type"`
	Properties Properties `json:"properties"`
}

type BuildFeatures

type BuildFeatures []BuildFeature

func (BuildFeatures) MarshalJSON

func (bf BuildFeatures) MarshalJSON() ([]byte, error)

func (*BuildFeatures) UnmarshalJSON

func (bf *BuildFeatures) UnmarshalJSON(b []byte) error

type BuildSetting

type BuildSetting struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type BuildSettings

type BuildSettings []BuildSetting

func (BuildSettings) MarshalJSON

func (s BuildSettings) MarshalJSON() ([]byte, error)

func (*BuildSettings) UnmarshalJSON

func (s *BuildSettings) UnmarshalJSON(b []byte) error

type BuildSnapshotDependencies

type BuildSnapshotDependencies []BuildSnapshotDependency

func (BuildSnapshotDependencies) MarshalJSON

func (bsd BuildSnapshotDependencies) MarshalJSON() ([]byte, error)

func (*BuildSnapshotDependencies) UnmarshalJSON

func (bsd *BuildSnapshotDependencies) UnmarshalJSON(b []byte) error

type BuildSnapshotDependency

type BuildSnapshotDependency struct {
	ID              string     `json:"id"`
	Type            string     `json:"type"`
	Properties      Properties `json:"properties"`
	SourceBuildType BuildType  `json:"source-buildType"`
}

type BuildStep

type BuildStep struct {
	ID         string     `json:"id"`
	Type       string     `json:"type"`
	Name       string     `json:"name"`
	Properties Properties `json:"properties"`
}

type BuildSteps

type BuildSteps []BuildStep

func (BuildSteps) MarshalJSON

func (bs BuildSteps) MarshalJSON() ([]byte, error)

func (*BuildSteps) UnmarshalJSON

func (bs *BuildSteps) UnmarshalJSON(b []byte) error

type BuildTrigger

type BuildTrigger struct {
	ID         string     `json:"id"`
	Type       string     `json:"type"`
	Properties Properties `json:"properties"`
}

type BuildTriggers

type BuildTriggers []BuildTrigger

func (BuildTriggers) MarshalJSON

func (bt BuildTriggers) MarshalJSON() ([]byte, error)

func (*BuildTriggers) UnmarshalJSON

func (bt *BuildTriggers) UnmarshalJSON(b []byte) error

type BuildType

type BuildType struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	ProjectName string `json:"projectName"`
	ProjectID   string `json:"projectId"`
	Href        string `json:"href,omitempty"`
	// contains filtered or unexported fields
}

type Change

type Change struct {
	Username string
	ID       int
	Date     string
	HREF     string
	Version  string
	WebURL   string
}

type Changes

type Changes []Change

type CheckboxType

type CheckboxType struct {
	Checked   string
	Unchecked string
}

func (CheckboxType) TypeName

func (t CheckboxType) TypeName() string

func (CheckboxType) Values

func (t CheckboxType) Values() map[string]string

type Display

type Display int
const (
	Normal Display = iota
	Hidden
	Prompt
)

func (Display) String

func (s Display) String() string

type JSONTime

type JSONTime string

JSONTime is just a string wrapper for Team City's date format.

func (JSONTime) Empty

func (t JSONTime) Empty() bool

Empty checks if the JSONTime was specified at all

func (JSONTime) IsZero

func (t JSONTime) IsZero() bool

IsZero returns whether the date is zero.

func (JSONTime) Time

func (t JSONTime) Time() time.Time

Time parses the string to extract a time.Time object.

type NamedParameter

type NamedParameter struct {
	Name string
	Parameter
}

func (NamedParameter) MarshalJSON

func (p NamedParameter) MarshalJSON() ([]byte, error)

type Parameter

type Parameter struct {
	Value string
	Spec  *ParameterSpec
}

type ParameterSpec

type ParameterSpec struct {
	Label       string
	Description string
	Display     Display
	ReadOnly    ReadOnly
	Type        ParameterType
}

func (ParameterSpec) String

func (s ParameterSpec) String() string

type ParameterType

type ParameterType interface {
	TypeName() string
	Values() map[string]string
}

type Parameters

type Parameters map[string]Parameter

func (Parameters) MarshalJSON

func (p Parameters) MarshalJSON() ([]byte, error)

func (*Parameters) UnmarshalJSON

func (p *Parameters) UnmarshalJSON(b []byte) error

type PasswordType

type PasswordType struct {
}

func (PasswordType) TypeName

func (t PasswordType) TypeName() string

func (PasswordType) Values

func (t PasswordType) Values() map[string]string

type ProblemOccurrence

type ProblemOccurrence struct {
	ID       string
	Type     string
	Identity string
	HREF     string
	Details  string
}

type Project

type Project struct {
	ID                  string              `json:"id,omitempty"`
	Name                string              `json:"name"`
	Description         string              `json:"description,omitempty"`
	Href                string              `json:"href,omitempty"`
	WebUrl              string              `json:"webUrl,omitempty"`
	ParentProjectID     ProjectId           `json:"parentProject,omitempty"`
	BuildConfigurations BuildConfigurations `json:"buildTypes,omitempty"`
	Templates           BuildConfigurations `json:"templates,omitempty"`
	Parameters          Parameters          `json:"parameters,omitempty"`
	Projects            Projects            `json:"projects,omitempty"`
}

type ProjectId

type ProjectId string

func (ProjectId) MarshalJSON

func (p ProjectId) MarshalJSON() ([]byte, error)

func (*ProjectId) UnmarshalJSON

func (p *ProjectId) UnmarshalJSON(b []byte) error

type ProjectShort

type ProjectShort struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Description     string `json:"description,omitempty"`
	ParentProjectID string `json:"parentProjectId"`
	Href            string `json:"href"`
	WebURL          string `json:"webUrl"`
}

type Projects

type Projects map[string]Project

func (Projects) MarshalJSON

func (p Projects) MarshalJSON() ([]byte, error)

func (*Projects) UnmarshalJSON

func (p *Projects) UnmarshalJSON(b []byte) error

type Properties

type Properties map[string]string

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(b []byte) error

type ReadOnly

type ReadOnly bool

func (ReadOnly) String

func (s ReadOnly) String() string

type SelectItem

type SelectItem struct {
	Label string
	Value string
}

type SelectType

type SelectType struct {
	AllowMultiple  bool
	ValueSeparator string
	Items          []SelectItem
}

func (SelectType) TypeName

func (t SelectType) TypeName() string

func (SelectType) Values

func (t SelectType) Values() map[string]string

type Server

type Server struct {
	Version      string
	VersionMajor uint
	VersionMinor uint
	StartTime    JSONTime
	CurrentTime  JSONTime
	BuildNumber  string
	BuildDate    JSONTime
}

type State

type State int

type Tags

type Tags []string

func (Tags) MarshalJSON

func (tags Tags) MarshalJSON() ([]byte, error)

func (*Tags) UnmarshalJSON

func (tags *Tags) UnmarshalJSON(b []byte) error

type TemplateID

type TemplateID struct {
	ID        string `json:"id"`
	ProjectID string `json:"projectId,omitempty"`
}

type TemplateId

type TemplateId string

func (TemplateId) MarshalJSON

func (p TemplateId) MarshalJSON() ([]byte, error)

func (*TemplateId) UnmarshalJSON

func (p *TemplateId) UnmarshalJSON(b []byte) error

type TestOccurrence

type TestOccurrence struct {
	ID                    string
	Name                  string
	Status                string
	Muted                 bool
	Duration              int64
	CurrentlyMuted        bool
	CurrentlyInvestigated bool
	HREF                  string
	Details               string
}

type TextType

type TextType struct {
	ValidationMode string
}

func (TextType) TypeName

func (t TextType) TypeName() string

func (TextType) Values

func (t TextType) Values() map[string]string

type VcsRoot

type VcsRoot struct {
	ID         string     `json:"id,omitempty"`
	Name       string     `json:"name,omitempty"`
	VcsName    string     `json:"vcsName,omitempty"`
	Href       string     `json:"href,omitempty"`
	ProjectID  ProjectId  `json:"project,omitempty"`
	Properties Properties `json:"properties,omitempty"`
}

type VcsRootEntries

type VcsRootEntries []VcsRootEntry

func (VcsRootEntries) MarshalJSON

func (vre VcsRootEntries) MarshalJSON() ([]byte, error)

func (*VcsRootEntries) UnmarshalJSON

func (vre *VcsRootEntries) UnmarshalJSON(b []byte) error

type VcsRootEntry

type VcsRootEntry struct {
	ID            string    `json:"id,omitempty"`
	VcsRootID     VcsRootId `json:"vcs-root"`
	CheckoutRules string    `json:"checkout-rules"`
}

type VcsRootId

type VcsRootId string

func (VcsRootId) MarshalJSON

func (v VcsRootId) MarshalJSON() ([]byte, error)

func (*VcsRootId) UnmarshalJSON

func (v *VcsRootId) UnmarshalJSON(b []byte) error

type VcsRootShort

type VcsRootShort struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Href string `json:"href"`
}

type VcsRoots

type VcsRoots []VcsRootShort

func (VcsRoots) MarshalJSON

func (vc VcsRoots) MarshalJSON() ([]byte, error)

func (*VcsRoots) UnmarshalJSON

func (vc *VcsRoots) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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