Documentation ¶
Index ¶
- Constants
- type Authorizer
- type Branch
- type Branches
- type BranchesResponse
- type BuildInfo
- type Change
- type ChangeSet
- type Client
- type CloneService
- type CollectionMetadata
- type Comment
- type CommentService
- type Deploy
- type DeployEnvironment
- type DeployEnvironmentResults
- type DeployResponse
- type DeployService
- func (d *DeployService) CreateDeployVersion(deploymentProjectID int, planResultKey, versionName, nextVersionName string) (*DeployVersionResult, error)
- func (d *DeployService) DeployEnvironmentResults(id int) (*DeployEnvironmentResults, error)
- func (d *DeployService) DeployEnvironments(id int) (*DeployEnvironment, error)
- func (d *DeployService) DeployStatus(id int) (*DeployStatus, error)
- func (d *DeployService) ListDeploys() (DeploysResponse, error)
- func (d *DeployService) QueueDeploy(environmentID, versionID int) (*QueueDeployRequest, error)
- type DeployStatus
- type DeployVersionListResult
- type DeployVersionResult
- type DeploymentVersion
- type DeploysResponse
- type Group
- type InfoService
- type Label
- type LabelService
- type Link
- type Pagination
- type Permissions
- func (p *Permissions) AvailableGroupsPermissionsList(opts PermissionsOpts) ([]Group, *http.Response, error)
- func (p *Permissions) AvailableUsersPermissionsList(opts PermissionsOpts) ([]User, *http.Response, error)
- func (p *Permissions) GroupPermissions(group string, opts PermissionsOpts) ([]string, *http.Response, error)
- func (p *Permissions) GroupPermissionsList(opts PermissionsOpts) ([]Group, *http.Response, error)
- func (p *Permissions) RemoveAnonymousReadPermission(opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) RemoveGroupPermissions(group string, permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) RemoveLoggedInUsersPermissions(permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) RemoveUserPermissions(username string, permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) RolePermissionsList(opts PermissionsOpts) ([]Role, *http.Response, error)
- func (p *Permissions) SetAnonymousReadPermission(opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) SetGroupPermissions(group string, permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) SetLoggedInUsersPermissions(permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) SetUserPermissions(username string, permissions []string, opts PermissionsOpts) (*http.Response, error)
- func (p *Permissions) UserPermissions(username string, opts PermissionsOpts) (*User, *http.Response, error)
- func (p *Permissions) UserPermissionsList(opts PermissionsOpts) ([]User, *http.Response, error)
- type PermissionsOpts
- type Plan
- type PlanBranchExpandOptions
- type PlanBranchService
- type PlanCreateBranchOptions
- type PlanKey
- type PlanResponse
- type PlanService
- func (p *PlanService) CreatePlanBranch(planKey, branchName string, options *PlanCreateBranchOptions) (bool, *http.Response, error)
- func (p *PlanService) DisablePlan(planKey string) (*http.Response, error)
- func (p *PlanService) ListPlanKeys() ([]string, *http.Response, error)
- func (p *PlanService) ListPlanNames() ([]string, *http.Response, error)
- func (p *PlanService) ListPlans() ([]*Plan, *http.Response, error)
- func (p *PlanService) NumberOfPlans() (int, *http.Response, error)
- func (p *PlanService) PlanNameMap() (map[string]string, *http.Response, error)
- type Plans
- type Project
- type ProjectInformation
- type ProjectPlansInformation
- type ProjectResponse
- type ProjectService
- type Projects
- type QueueDeployRequest
- type ReindexState
- type ResourceMetadata
- type Result
- type ResultService
- type Results
- type ResultsResponse
- type Role
- type ServerInfo
- type ServerService
- func (s *ServerService) Pause() (*TransitionStateInfo, *http.Response, error)
- func (s *ServerService) PrepareForRestart() (*TransitionStateInfo, *http.Response, error)
- func (s *ServerService) Reindex() (*ReindexState, *http.Response, error)
- func (s *ServerService) ReindexStatus() (*ReindexState, *http.Response, error)
- func (s *ServerService) Resume() (*TransitionStateInfo, *http.Response, error)
- type SimpleCredentials
- type TokenCredentials
- type TransitionStateInfo
- type User
Constants ¶
const AdminPermission string = "ADMINISTRATION"
AdminPermission is the sting the API expects for admin permissions. Allows a user to edit all aspects of the plan including permissions and stages.
const BuildPermission string = "BUILD"
BuildPermission the sting the API expects for build permissions. Allows a user to trigger a manual build, or suspend and resume the plan.
const ClonePermission string = "CLONE"
ClonePermission the sting the API expects for clone permissions. Allows a user to clone the plan.
const CreatePermission string = "CREATE"
CreatePermission is the string the API expects when allowing a user/group to create a resource
const CreateRepositoryPermission string = "CREATEREPOSITORY"
CreateRepositoryPermission is the string the API expects when allowing a user/group to create a repository
const DeploymentResource string = "deployment"
DeploymentResource is the URL piece when getting deployment permissions
const EnvironmentResource string = "environment"
EnvironmentResource is the URL piece when getting environment permissions
const GlobalResource string = "global"
GlobalResource is the URL piece when getting global permissions
const PausedState string = "PAUSED"
PausedState is the state of a paused Bamboo server
const PausingState string = "PAUSING"
PausingState is when the Bamboo server is in the process of being paused
const PlanResource string = "plan"
PlanResource is the URL piece when getting plan permissions
const PreparingForRestartState string = "PREPARING_FOR_RESTART"
PreparingForRestartState is the state of a Bamboo server preparing to be restarted
const ProjectPlanResource string = "projectplan"
ProjectPlanResource is the URL piece when getting projectplan permissions
const ProjectResource string = "project"
ProjectResource is the URL piece when getting project permissions
const ReadPermission string = "READ"
ReadPermission the sting the API expects for read permissions. Allows a user to view the plan and its builds.
const ReadyForRestartState string = "READY_FOR_RESTART"
ReadyForRestartState is the state of a Bamboo server ready to be restarted
const RepositoryResource string = "repository"
RepositoryResource is the URL piece when getting repository permissions
const RunningState string = "RUNNING"
RunningState is the state of a running Bamboo server
const WritePermission string = "WRITE"
WritePermission the sting the API expects for write permissions. Allows a user to view and edit the configuration of the plan and its jobs, not including permissions or stages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Authorizer interface {
Authorization() string
}
Authorizer is the interface that wraps the Authorization method Authorization returns the string to be used in the Authorization value of header
type Branch ¶
type Branch struct { Description string `json:"description"` ShortName string `json:"shortName"` ShortKey string `json:"shortKey"` Enabled bool `json:"enabled"` Link *Link WorkflowType string `json:"workflowType"` *PlanKey Name string `json:"name,omitempty"` }
Branch represents a single plan branch
type Branches ¶
type Branches struct { *CollectionMetadata BranchList []*Branch `json:"branch"` }
Branches is the collection of branches
type BranchesResponse ¶
type BranchesResponse struct { *ResourceMetadata Branches *Branches `json:"branches"` }
BranchesResponse encapsulates the information from requesting plan branch information
type BuildInfo ¶
type BuildInfo struct { Version string `json:"version,omitempty"` Edition string `json:"edition,omitempty"` BuildDate string `json:"buildDate,omitempty"` BuildNumber string `json:"buildNumber,omitempty"` State string `json:"state,omitempty"` }
BuildInfo represents the build information of the Bamboo server
type ChangeSet ¶
type ChangeSet struct {
Set []Change `json:"change"`
}
ChangeSet represents a collection of type Change
type Client ¶
type Client struct { BaseURL *url.URL // Services used for talking to different parts of the Bamboo API Info *InfoService Plans *PlanService Deploys *DeployService Branches *PlanBranchService Projects *ProjectService Results *ResultService Comments *CommentService Labels *LabelService Clone *CloneService Server *ServerService Permissions *Permissions // contains filtered or unexported fields }
Client manages the communication with the Bamboo API
func NewClient ¶
func NewClient(httpClient *http.Client, creds Authorizer) *Client
NewClient returns a new Bamboo API client. If a nil httpClient is provided, http.DefaultClient will be used.
func NewSimpleClient ¶
NewSimpleClient returns a new Bamboo API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an admin username/password
func NewTokenClient ¶
NewSimpleClient returns a new Bamboo API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an admin username/password
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it. If rate limit is exceeded and reset time is in the future, Do returns *RateLimitError immediately without making a network API call.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type CloneService ¶
type CloneService service
CloneService handles the cloning of one Bamboo resource to another.
type CollectionMetadata ¶
type CollectionMetadata struct { Size int `json:"size"` Expand string `json:"expand"` StartIndex int `json:"start-index"` MaxResult int `json:"max-result"` }
CollectionMetadata holds metadata about a collection of Bamboo resources - Size: Number of resources - Expand: Element of the expand parameter used for the collection - StartIndex: Index from which to the request started gathering resources - MaxResult: The maximum number of returned resources for the request
type CommentService ¶
type CommentService service
CommentService handles communication with the comments on a plan result
func (*CommentService) AddComment ¶
AddComment will add a comment to the given result.
type Deploy ¶
type Deploy struct { ID int `json:"id"` PlanKey *PlanKey `json:"planKey,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Environments []*DeployEnvironment `json:"environments,omitempty"` }
Deploy is a single Deploy definition
type DeployEnvironment ¶
type DeployEnvironment struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` DeploymentProjectID int `json:"deploymentProjectId,omitempty"` }
DeployEnvironment is the information for an environment
type DeployEnvironmentResults ¶
type DeployEnvironmentResults struct { Name string `json:"name"` ID int `json:"id"` Results []*DeployStatus `json:"results"` }
DeployEnvironmentResults is the information for a single Deploy
type DeployResponse ¶
type DeployResponse struct {
*ResourceMetadata
}
DeployResponse is the REST response from the server
type DeployService ¶
type DeployService service
DeployService handles communication with the deploy related methods
func (*DeployService) CreateDeployVersion ¶
func (d *DeployService) CreateDeployVersion(deploymentProjectID int, planResultKey, versionName, nextVersionName string) (*DeployVersionResult, error)
CreateDeployVersion will take a deploy project id, plan result, version name and the next version name and create a release.
func (*DeployService) DeployEnvironmentResults ¶
func (d *DeployService) DeployEnvironmentResults(id int) (*DeployEnvironmentResults, error)
DeployEnvironmentResults returns result information for the requested environment
func (*DeployService) DeployEnvironments ¶
func (d *DeployService) DeployEnvironments(id int) (*DeployEnvironment, error)
DeployEnvironments returns information on the requested environment
func (*DeployService) DeployStatus ¶
func (d *DeployService) DeployStatus(id int) (*DeployStatus, error)
DeployStatus returns information on the requested deploy
func (*DeployService) ListDeploys ¶
func (d *DeployService) ListDeploys() (DeploysResponse, error)
ListDeploys lists all deployments
func (*DeployService) QueueDeploy ¶
func (d *DeployService) QueueDeploy(environmentID, versionID int) (*QueueDeployRequest, error)
QueueDeploy adds a deploy of the specified version to the given environment.
type DeployStatus ¶
type DeployStatus struct { DeploymentVersion *DeploymentVersion `json:"deploymentVersion"` DeploymentVersionName string `json:"deploymentVersionName"` DeploymentState string `json:"deploymentState"` LifeCycleState string `json:"lifeCycleState"` StartedDate int `json:"startedDate"` }
DeployStatus contains deploy status information
type DeployVersionListResult ¶
type DeployVersionListResult struct {
Versions []*DeployVersionResult `json:"versions"`
}
DeployVersionListResult stores a list of deployment versions
type DeployVersionResult ¶
DeployVersionResult will have the information for creating a new release/version for bamboo
type DeploymentVersion ¶
DeploymentVersion contains version information for a deployment
type DeploysResponse ¶
type DeploysResponse = []*Deploy
DeploysResponse is a collection of Deploy elements
type InfoService ¶
type InfoService service
InfoService retrieves server information
func (*InfoService) BuildInfo ¶
func (i *InfoService) BuildInfo() (*BuildInfo, *http.Response, error)
BuildInfo fetches the build information of the Bamboo server
func (*InfoService) ServerInfo ¶
func (i *InfoService) ServerInfo() (*ServerInfo, *http.Response, error)
ServerInfo fetches the Bamboo server information
type LabelService ¶
type LabelService service
LabelService handles communication with the labels on a plan result
type Link ¶
Link holds link information for the service - HREF: Relationship between link and element (defaults to "self") - Rel: URL for the project
type Pagination ¶
Pagination used to specify the start and limit indexes of a paginated API resource
type Permissions ¶
type Permissions service
Permissions is the container for all permissions related endpoints
func (*Permissions) AvailableGroupsPermissionsList ¶
func (p *Permissions) AvailableGroupsPermissionsList(opts PermissionsOpts) ([]Group, *http.Response, error)
AvailableGroupsPermissionsList returns a list of groups which weren't explicitly granted any permissions to the resource. Leave Key blank when setting permissions globally.
func (*Permissions) AvailableUsersPermissionsList ¶
func (p *Permissions) AvailableUsersPermissionsList(opts PermissionsOpts) ([]User, *http.Response, error)
AvailableUsersPermissionsList return a list of users which weren't explicitly granted any project plan permissions for the given project.
func (*Permissions) GroupPermissions ¶
func (p *Permissions) GroupPermissions(group string, opts PermissionsOpts) ([]string, *http.Response, error)
GroupPermissions returns the group's permissions for the given resource. Leave Key blank when setting permissions globally.
func (*Permissions) GroupPermissionsList ¶
func (p *Permissions) GroupPermissionsList(opts PermissionsOpts) ([]Group, *http.Response, error)
GroupPermissionsList returns a list of group permissions for the given resource. Leave Key blank when setting permissions globally.
func (*Permissions) RemoveAnonymousReadPermission ¶
func (p *Permissions) RemoveAnonymousReadPermission(opts PermissionsOpts) (*http.Response, error)
RemoveAnonymousReadPermission removes the ability for anonymous users to view plans
func (*Permissions) RemoveGroupPermissions ¶
func (p *Permissions) RemoveGroupPermissions(group string, permissions []string, opts PermissionsOpts) (*http.Response, error)
RemoveGroupPermissions removes the given permissions from the group's permissions for the given project's plans. Leave Key blank when setting permissions globally.
func (*Permissions) RemoveLoggedInUsersPermissions ¶
func (p *Permissions) RemoveLoggedInUsersPermissions(permissions []string, opts PermissionsOpts) (*http.Response, error)
RemoveLoggedInUsersPermissions removes the given permissions from the logged in users role's permissions for the given project's plans
func (*Permissions) RemoveUserPermissions ¶
func (p *Permissions) RemoveUserPermissions(username string, permissions []string, opts PermissionsOpts) (*http.Response, error)
RemoveUserPermissions removes the given permissions from the users permissions for the given project's plans
func (*Permissions) RolePermissionsList ¶
func (p *Permissions) RolePermissionsList(opts PermissionsOpts) ([]Role, *http.Response, error)
RolePermissionsList returns the list of permissions for the roles on the given entity in the given resource
func (*Permissions) SetAnonymousReadPermission ¶
func (p *Permissions) SetAnonymousReadPermission(opts PermissionsOpts) (*http.Response, error)
SetAnonymousReadPermission allows anonymous users to view plans
func (*Permissions) SetGroupPermissions ¶
func (p *Permissions) SetGroupPermissions(group string, permissions []string, opts PermissionsOpts) (*http.Response, error)
SetGroupPermissions sets the group's permissions for the given resource. Leave Key blank when setting permissions globally.
func (*Permissions) SetLoggedInUsersPermissions ¶
func (p *Permissions) SetLoggedInUsersPermissions(permissions []string, opts PermissionsOpts) (*http.Response, error)
SetLoggedInUsersPermissions sets the logged in users role's permissions for the given project's plans to the passed in permissions
func (*Permissions) SetUserPermissions ¶
func (p *Permissions) SetUserPermissions(username string, permissions []string, opts PermissionsOpts) (*http.Response, error)
SetUserPermissions sets the users permissions for the given project's plans to the passed in permissions array
func (*Permissions) UserPermissions ¶
func (p *Permissions) UserPermissions(username string, opts PermissionsOpts) (*User, *http.Response, error)
UserPermissions returns the permissions for the specified user on the given resource in the given service
func (*Permissions) UserPermissionsList ¶
func (p *Permissions) UserPermissionsList(opts PermissionsOpts) ([]User, *http.Response, error)
UserPermissionsList returns a list of users and their permissions for the given resource key in the service
type PermissionsOpts ¶
PermissionsOpts holds the name of the resource that permissions are being retrieved from and the key for the specific object in that resource. -- LEAVE KEY BLANK FOR GLOBAL PERMISSIONS --
type Plan ¶
type Plan struct { ShortName string `json:"shortName,omitempty"` ShortKey string `json:"shortKey,omitempty"` Type string `json:"type,omitempty"` Enabled bool `json:"enabled,omitempty"` Link *Link `json:"link,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` PlanKey *PlanKey `json:"planKey,omitempty"` }
Plan is the definition of a single plan
type PlanBranchExpandOptions ¶
PlanBranchExpandOptions are the optional parameters to a request for plan branch information.
type PlanBranchService ¶
type PlanBranchService service
PlanBranchService is a derivative of the plan service to handle interacting with plan branches
func (*PlanBranchService) BranchInfo ¶
func (pb *PlanBranchService) BranchInfo(planKey, branchName string) (*Branch, *http.Response, error)
BranchInfo retrieves the information from the given branch name
func (*PlanBranchService) ListPlanBranches ¶
ListPlanBranches lists all plan branches for a given plan
func (*PlanBranchService) ListVCSBranches ¶
ListVCSBranches returns a list of all VCS branches
type PlanCreateBranchOptions ¶
type PlanCreateBranchOptions struct {
VCSBranch string
}
PlanCreateBranchOptions specifies the optional parameters for the CreatePlanBranch method
type PlanKey ¶
type PlanKey struct {
Key string `json:"key,omitempty"`
}
PlanKey holds the plan-key for a plan
type PlanResponse ¶
type PlanResponse struct { *ResourceMetadata Plans *Plans `json:"plans"` }
PlanResponse encapsultes a response from the plan service
type PlanService ¶
type PlanService service
PlanService handles communication with the plan related methods
func (*PlanService) CreatePlanBranch ¶
func (p *PlanService) CreatePlanBranch(planKey, branchName string, options *PlanCreateBranchOptions) (bool, *http.Response, error)
CreatePlanBranch will create a plan branch with the given branch name for the specified build
func (*PlanService) DisablePlan ¶
func (p *PlanService) DisablePlan(planKey string) (*http.Response, error)
DisablePlan will disable a plan or plan branch
func (*PlanService) ListPlanKeys ¶
func (p *PlanService) ListPlanKeys() ([]string, *http.Response, error)
ListPlanKeys get all the plan keys for all build plans on Bamboo
func (*PlanService) ListPlanNames ¶
func (p *PlanService) ListPlanNames() ([]string, *http.Response, error)
ListPlanNames returns a list of ShortNames of all plans
func (*PlanService) ListPlans ¶
func (p *PlanService) ListPlans() ([]*Plan, *http.Response, error)
ListPlans gets information on all plans
func (*PlanService) NumberOfPlans ¶
func (p *PlanService) NumberOfPlans() (int, *http.Response, error)
NumberOfPlans returns the number of plans on the Bamboo server
func (*PlanService) PlanNameMap ¶
PlanNameMap returns a map[string]string where the PlanKey is the key and the ShortName is the value
type Plans ¶
type Plans struct { *CollectionMetadata PlanList []*Plan `json:"plan"` }
Plans is a collection of Plan objects
type Project ¶
type Project struct { Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Link *Link `json:"link,omitempty"` }
Project is a single project definition
type ProjectInformation ¶
type ProjectInformation struct { Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` NumPlans *ProjectPlansInformation `json:"plans"` }
ProjectInformation is the information for a single project
type ProjectPlansInformation ¶
type ProjectPlansInformation struct {
Size int `json:"size,omitempty"`
}
ProjectPlansInformation holds the number of plans in a project
type ProjectResponse ¶
type ProjectResponse struct { *ResourceMetadata Projects *Projects `json:"projects"` }
ProjectResponse the REST response from the server
type ProjectService ¶
type ProjectService service
ProjectService handles communication with the project related methods
func (*ProjectService) ListProjects ¶
func (p *ProjectService) ListProjects() ([]*Project, *http.Response, error)
ListProjects lists all projects
func (*ProjectService) ProjectInfo ¶
func (p *ProjectService) ProjectInfo(projectKey string) (*ProjectInformation, *http.Response, error)
ProjectInfo get the information on the specific project
func (*ProjectService) ProjectPlans ¶
ProjectPlans returns a list of plans for a given project
type Projects ¶
type Projects struct { *CollectionMetadata ProjectList []*Project `json:"project"` }
Projects is a collection of project elements
type QueueDeployRequest ¶
type QueueDeployRequest struct { DeploymentResultID int `json:"deploymentResultId"` Link *Link `json:"link"` }
QueueDeployRequest contains information from a queue deploy request
type ReindexState ¶
type ReindexState struct { ReindexInProgress bool `json:"reindexInProgress"` ReindexPending bool `json:"reindexPending"` }
ReindexState represents the state of a server reindex. ReindexInProgress - true if a reindex is in progress otherwise false ReindexPending - reindex is required (i.e. it failed before or some upgrade task asked for it)
type ResourceMetadata ¶
ResourceMetadata holds metadata about the API service response - Expand: Element of the expand parameter used for the service - Link: See ServiceLink
type Result ¶
type Result struct { ChangeSet `json:"changes"` ID int `json:"id"` PlanName string `json:"planName"` ProjectName string `json:"projectName"` BuildResultKey string `json:"buildResultKey"` LifeCycleState string `json:"lifeCycleState"` BuildStartedTime string `json:"buildStartedTime"` BuildCompletedTime string `json:"buildCompletedTime"` BuildDurationInSeconds int `json:"buildDurationInSeconds"` VcsRevisionKey string `json:"vcsRevisionKey"` BuildTestSummary string `json:"buildTestSummary"` SuccessfulTestCount int `json:"successfulTestCount"` FailedTestCount int `json:"failedTestCount"` QuarantinedTestCount int `json:"quarantinedTestCount"` SkippedTestCount int `json:"skippedTestCount"` Finished bool `json:"finished"` Successful bool `json:"successful"` BuildReason string `json:"buildReason"` ReasonSummary string `json:"reasonSummary"` Key string `json:"key"` State string `json:"state"` BuildState string `json:"buildState"` Number int `json:"number"` BuildNumber int `json:"buildNumber"` }
Result represents all the information associated with a build result
type ResultService ¶
type ResultService service
ResultService handles communication with build results
func (*ResultService) LatestResult ¶
LatestResult returns the latest result information for the given plan key
func (*ResultService) ListResults ¶
NumberedResult returns the result information for the given plan key which includes the build number of the desired result
func (*ResultService) NumberedResult ¶
NumberedResult returns the result information for the given plan key which includes the build number of the desired result
type Results ¶
type Results struct { *CollectionMetadata ResultList []*Result `json:"result"` }
Results is the collection of results
type ResultsResponse ¶
type ResultsResponse struct { *ResourceMetadata Results *Results `json:"results"` }
ResultsResponse encapsulates the information from requesting result information
type ServerInfo ¶
type ServerInfo struct { State string `json:"state"` ReindexInProgress bool `json:"reindexInProgress"` }
ServerInfo contains information on the Bamboo server
type ServerService ¶
type ServerService service
ServerService exposes server operations
func (*ServerService) Pause ¶
func (s *ServerService) Pause() (*TransitionStateInfo, *http.Response, error)
Pause will move the Bamboo server to the PAUSED state. The PAUSED state only prevents new builds from being scheduled. Change detection and other server operations will continue to run.
func (*ServerService) PrepareForRestart ¶
func (s *ServerService) PrepareForRestart() (*TransitionStateInfo, *http.Response, error)
PrepareForRestart will move the Bamboo server to the PREPARING_FOR_RESTART state. Change detection, indexing, ec2 instance ordering etc. are stopped to allow for a server restart.
func (*ServerService) Reindex ¶
func (s *ServerService) Reindex() (*ReindexState, *http.Response, error)
Reindex will start a server reindex
func (*ServerService) ReindexStatus ¶
func (s *ServerService) ReindexStatus() (*ReindexState, *http.Response, error)
ReindexStatus will start a server reindex
func (*ServerService) Resume ¶
func (s *ServerService) Resume() (*TransitionStateInfo, *http.Response, error)
Resume will move the Bamboo server to either the RUNNING or READY_FOR_RESTART state. The RUNNING state means the server was PAUSED and builds will resume. The READY_FOR_RESTART state means exactly what the name suggests and builds will not resume until the server is restarted.
type SimpleCredentials ¶
SimpleCredentials are the username and password used to communicate with the API
func (*SimpleCredentials) Authorization ¶
func (sc *SimpleCredentials) Authorization() string
type TokenCredentials ¶
type TokenCredentials struct {
Token string
}
TokenCredentials are the token used to communicate with the API https://developer.atlassian.com/server/bamboo/using-the-bamboo-rest-apis/
func (*TokenCredentials) Authorization ¶
func (tc *TokenCredentials) Authorization() string
type TransitionStateInfo ¶
type TransitionStateInfo struct { ServerInfo SetByUser string `json:"setByUser"` }
TransitionStateInfo represents the server state response after a server operation is preformed.