Documentation
¶
Index ¶
- Variables
- type BuildJSON
- type BuildQueueService
- type BuildReference
- type BuildService
- func (b *BuildService) GetArtifact(buildID, path string) (artifactBinary []byte, err error)
- func (b *BuildService) GetBuild(buildTypeID string, number string) (build BuildJSON, err error)
- func (b *BuildService) GetBuildResults(buildID string) (resultingProperties Properties, err error)
- func (b *BuildService) GetBuildsByBuildConf(buildTypeID string, count int) (builds Builds, err error)
- type BuildType
- type BuildTypeReference
- type BuildTypeReferences
- type BuildTypeService
- type Builds
- type Locator
- type LogService
- type Parameter
- type Parameters
- type Project
- type ProjectReference
- type ProjectService
- type ProjectsReferences
- type Properties
- type Property
- type Templates
- type Token
- type TokenService
- type Tokens
- type TriggerResult
- type TriggerResultJSON
- type TriggeredJSON
- type Type
- type User
Constants ¶
This section is empty.
Variables ¶
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 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 ¶
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
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 ¶
MarshalJSON implements JSON serialization for Parameter
func (*Parameter) UnmarshalJSON ¶
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 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 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