subapi

package
v0.0.0-...-8385e2e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ParameterTypes = struct {
		Configuration       paramType
		System              paramType
		EnvironmentVariable paramType
	}{
		Configuration:       configParamType,
		System:              systemParamType,
		EnvironmentVariable: envVarParamType,
	}
)

ParameterTypes represent the possible parameter types

Functions

This section is empty.

Types

type BuildJSON

type BuildJSON struct {
	ID                  int        `json:"id"`
	Number              string     `json:"number"`
	Status              string     `json:"status"`
	StatusText          string     `json:"statusText"`
	State               string     `json:"state"`
	BuildTypeID         string     `json:"buildTypeId"`
	Progress            int        `json:"progress"`
	Properties          Parameters `json:"properties"`
	ResultingProperties Properties

	QueuedDate string `json:"queuedDate"`
	StartDate  string `json:"startDate"`
	FinishDate string `json:"finishDate"`
}

BuildJSON represents TeamCity project build.

type BuildQueueService

type BuildQueueService struct {
	// contains filtered or unexported fields
}

func NewBuildQueueService

func NewBuildQueueService(base *sling.Sling, client sling.Doer) *BuildQueueService

func (*BuildQueueService) RunBuildByBuildConfID

func (s *BuildQueueService) RunBuildByBuildConfID(buildconfID string) (result TriggerResult, err error)

type BuildReference

type BuildReference struct {
	ID     int    `json:"id,omitempty" xml:"id"`
	Number string `json:"number"`
	Status string `json:"status"`
	State  string `json:"state"`
}

type BuildService

type BuildService struct {
	// contains filtered or unexported fields
}

func NewBuildService

func NewBuildService(base *sling.Sling, client sling.Doer) *BuildService

func (*BuildService) GetArtifact

func (b *BuildService) GetArtifact(buildID, path string) (artifactBinary []byte, err error)

func (*BuildService) GetBuild

func (b *BuildService) GetBuild(buildTypeID string, number string) (build BuildJSON, err error)

func (*BuildService) GetBuildResults

func (b *BuildService) GetBuildResults(buildID string) (resultingProperties Properties, err error)

func (*BuildService) GetBuildsByBuildConf

func (b *BuildService) GetBuildsByBuildConf(buildTypeID string, count int) (builds Builds, err error)

type BuildType

type BuildType struct {
	ProjectID   string
	ID          string
	Name        string
	Description string
	Disabled    bool
	IsTemplate  bool
	// steps are a bit complex and useless for now
	Templates *Templates

	Parameters *Parameters
}

BuildType represents a build configuration or a build configuration template

func (*BuildType) UnmarshalJSON

func (b *BuildType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements JSON deserialization for TriggerSchedule

type BuildTypeReference

type BuildTypeReference struct {
	ID        string `json:"id,omitempty" xml:"id"`
	Name      string `json:"name,omitempty" xml:"name"`
	ProjectID string `json:"projectId,omitempty" xml:"projectId"`
}

BuildTypeReference represents a brief of a BuildType

type BuildTypeReferences

type BuildTypeReferences struct {
	Count int32                 `json:"count,omitempty" xml:"count"`
	Items []*BuildTypeReference `json:"buildType"`
}

BuildTypeReferences represents a collection of *BuildTypeReference

type BuildTypeService

type BuildTypeService struct {
	// contains filtered or unexported fields
}

BuildTypeService has operations for handling build configurations and templates

func NewBuildTypeService

func NewBuildTypeService(base *sling.Sling, httpClient sling.Doer) *BuildTypeService

type Builds

type Builds struct {
	Count int               `json:"count,omitempty" xml:"count"`
	Items []*BuildReference `json:"build" xml:"build"`
}

type Locator

type Locator string

Locator represents an arbitrary locator to be used when querying resources

func LocatorID

func LocatorID(id string) Locator

LocatorID creates a locator by ID

func (Locator) String

func (l Locator) String() string

type LogService

type LogService struct {
	// contains filtered or unexported fields
}

func NewLogService

func NewLogService(base *sling.Sling, client sling.Doer) *LogService

func (*LogService) GetBuildLog

func (l *LogService) GetBuildLog(buildID string) (out []byte, err error)

type Parameter

type Parameter struct {
	Name      string `json:"name,omitempty" xml:"name"`
	Value     string `json:"value" xml:"value"`
	Type      string `json:"-"`
	Inherited bool   `json:"inherited,omitempty" xml:"inherited"`
}

Parameter represents a project or build configuration parameter

func (*Parameter) MarshalJSON

func (p *Parameter) MarshalJSON() ([]byte, error)

MarshalJSON implements JSON serialization for Parameter

func (*Parameter) Property

func (p *Parameter) Property() *Property

Property converts a Parameter instance to a Property

func (*Parameter) UnmarshalJSON

func (p *Parameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements JSON deserialization for Parameter

type Parameters

type Parameters struct {
	Count int32        `json:"count,omitempty" xml:"count"`
	Href  string       `json:"href,omitempty" xml:"href"`
	Items []*Parameter `json:"property,omitempty"`
}

Parameters is a collection of Parameters.

type Project

type Project struct {
	Archived        *bool               `json:"archived,omitempty" xml:"archived"`
	Description     string              `json:"description,omitempty" xml:"description"`
	Href            string              `json:"href,omitempty" xml:"href"`
	ID              string              `json:"id,omitempty" xml:"id"`
	Name            string              `json:"name,omitempty" xml:"name"`
	Parameters      *Parameters         `json:"parameters,omitempty"`
	ParentProject   *ProjectReference   `json:"parentProject,omitempty"`
	ParentProjectID string              `json:"parentProjectId,omitempty" xml:"parentProjectId"`
	WebURL          string              `json:"webUrl,omitempty" xml:"webUrl"`
	BuildTypes      BuildTypeReferences `json:"buildTypes,omitempty" xml:"buildTypes"`
	ChildProjects   ProjectsReferences  `json:"projects,omitempty" xml:"projects"`
}

Project is the model for project entity.

type ProjectReference

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

ProjectReference contains reduced information on a project which is returned when list is being asked.

type ProjectService

type ProjectService struct {
	// contains filtered or unexported fields
}

ProjectService is a service for requesting projects.

func NewProjectService

func NewProjectService(base *sling.Sling, client sling.Doer) *ProjectService

func (*ProjectService) GetBuildTypesList

func (s *ProjectService) GetBuildTypesList(projectID string) (refs BuildTypeReferences, err error)

GetBuildTypesList retrieves build types list of project specified by id

func (*ProjectService) GetList

func (s *ProjectService) GetList() (refs ProjectsReferences, err error)

GetList retrieves a projects list.

type ProjectsReferences

type ProjectsReferences struct {
	Count int                 `json:"count,omitempty" xml:"count"`
	Items []*ProjectReference `json:"project,omitempty"`
}

ProjectsReferences represents list of projects

type Properties

type Properties struct {
	Count int32       `json:"count,omitempty" xml:"count"`
	Href  string      `json:"href,omitempty" xml:"href"`
	Items []*Property `json:"property"`
}

Properties represents a collection of key/value properties for a resource

type Property

type Property struct {
	Name      string `json:"name,omitempty" xml:"name"`
	Value     string `json:"value" xml:"value"`
	Type      *Type  `json:"type,omitempty"`
	Inherited *bool  `json:"inherited,omitempty" xml:"inherited"`
}

Property represents a key/value/type structure of properties present in several other entities

type Templates

type Templates struct {
	Count int32                 `json:"count,omitempty" xml:"count"`
	Items []*BuildTypeReference `json:"buildType"`
}

Templates represents a collection of BuildTypeReference.

type Token

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

type TokenService

type TokenService struct {
	// contains filtered or unexported fields
}

func NewTokenService

func NewTokenService(base *sling.Sling, client sling.Doer) *TokenService

func (*TokenService) TokenCreate

func (s *TokenService) TokenCreate(username, tokenName string) (token Token, err error)

func (*TokenService) TokenList

func (s *TokenService) TokenList(userID string) (tokens Tokens, err error)

func (*TokenService) TokenRemove

func (s *TokenService) TokenRemove(userID string, tokenName string) (err error)

type Tokens

type Tokens struct {
	Count int      `json:"count,omitempty" xml:"count"`
	Items []*Token `json:"token" xml:"token"`
}

type TriggerResult

type TriggerResult struct {
	BuildID     string
	BuildState  string
	TriggeredBy string
	Parameters  Parameters
}

type TriggerResultJSON

type TriggerResultJSON struct {
	ID    int    `json:"id,omitempty" xml:"id"`
	State string `json:"state,omitempty" xml:"state"`

	Triggered  TriggeredJSON `json:"triggered,omitempty" xml:"triggered"`
	Properties Parameters    `json:"properties,omitempty" xml:"properties"`
}

func (TriggerResultJSON) TriggerResult

func (t TriggerResultJSON) TriggerResult() TriggerResult

type TriggeredJSON

type TriggeredJSON struct {
	User User   `json:"user,omitempty" xml:"user"`
	Date string `json:"date,omitempty" xml:"date"`
}

type Type

type Type struct {
	RawValue string `json:"rawValue,omitempty" xml:"rawValue"`
}

Type represents a parameter type.

type User

type User struct {
	Username string `json:"username,omitempty" xml:"username"`
	Name     string `json:"name,omitempty" xml:"name"`
}

Jump to

Keyboard shortcuts

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