buildbucket

package
v0.0.0-...-d60a78d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package buildbucket provides access to the Build Bucket Service.

Usage example:

import "github.com/TriggerMail/luci-go/common/api/buildbucket/buildbucket/v1"
...
buildbucketService, err := buildbucket.New(oauthHttpClient)

Index

Constants

View Source
const (
	// StatusScheduled means a build was created, but did not start or
	// complete.
	// The initial state of a build.
	StatusScheduled = "SCHEDULED"
	// StatusStarted means a build has started.
	StatusStarted = "STARTED"
	// StatusCompleted means a build has completed. See its Result.
	StatusCompleted = "COMPLETED"
)

Build statuses.

View Source
const (
	// ResultFailure means a build has failed, with or without an infra-failure.
	ResultFailure = "FAILURE"
	// ResultSuccess means a build has succeeded.
	ResultSuccess = "SUCCESS"
	// ResultCanceled means a build was cancelled or timed out.
	ResultCanceled = "CANCELED"
)
View Source
const (
	// TagBuilder is the key of builder name tag.
	TagBuilder = "builder"
	// TagBuildAddress is the key of the build address tag.
	// See also Build.Address().
	TagBuildAddress = "build_address"
	// TagBuildSet is a key of a tag used to group related builds.
	// See also ParseBuildSet.
	// When a build triggers a new build, the buildset tag must be copied.
	TagBuildSet = "buildset"
)
View Source
const (
	// ReasonNotFound means the given build ID was not found on the BuildBucket service.
	ReasonNotFound = "BUILD_NOT_FOUND"
)
View Source
const (
	// StatusFilterIncomplete matches StatusScheduled or StatusStarted.
	StatusFilterIncomplete = "INCOMPLETE"
)

Build status filters. Can be used only when searching. A build cannot have any of these statuses.

Any build status defined above can be used as a status filter too.

View Source
const (
	// https://www.googleapis.com/auth/userinfo.email
	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

func FormatBuildAddress

func FormatBuildAddress(id int64, bucket, builder string, number int) string

FormatBuildAddress returns a value for TagBuildAddress tag. If number is positive, returns "<bucket>/<builder>/<number>", otherwise returns "<id>"

See also ParseBuildAddress.

func FormatTimestamp

func FormatTimestamp(t time.Time) int64

FormatTimestamp converts t to a buildbucket timestamp.

func ParseBuildAddress

func ParseBuildAddress(address string) (id int64, project, bucket, builder string, number int, err error)

ParseBuildAddress parses a value of a TagBuildAddress tag. See also FormatBuildAddress.

If id is non-zero, project, bucket and builder are zero. If bucket is non-zero, id is zero.

func ParseTimestamp

func ParseTimestamp(usec int64) time.Time

ParseTimestamp parses a buildbucket timestamp.

func ProjectFromBucket

func ProjectFromBucket(bucket string) string

ProjectFromBucket tries to retrieve project id from bucket name. Returns "" on failure.

func ValidateBuildAddress

func ValidateBuildAddress(address string) error

ValidateBuildAddress returns an error if the build address is invalid.

Types

type ApiBucketMessage

type ApiBucketMessage struct {
	ConfigFileContent string `json:"config_file_content,omitempty"`

	ConfigFileRev string `json:"config_file_rev,omitempty"`

	ConfigFileUrl string `json:"config_file_url,omitempty"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	Name string `json:"name,omitempty"`

	ProjectId string `json:"project_id,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ConfigFileContent")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ConfigFileContent") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

func (*ApiBucketMessage) MarshalJSON

func (s *ApiBucketMessage) MarshalJSON() ([]byte, error)

type ApiBuildResponseMessage

type ApiBuildResponseMessage struct {
	// Build: Describes model.Build, see its docstring.
	Build *ApiCommonBuildMessage `json:"build,omitempty"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Build") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Build") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiBuildResponseMessage) MarshalJSON

func (s *ApiBuildResponseMessage) MarshalJSON() ([]byte, error)

type ApiCancelBatchRequestMessage

type ApiCancelBatchRequestMessage struct {
	BuildIds googleapi.Int64s `json:"build_ids,omitempty"`

	ResultDetailsJson string `json:"result_details_json,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BuildIds") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BuildIds") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiCancelBatchRequestMessage) MarshalJSON

func (s *ApiCancelBatchRequestMessage) MarshalJSON() ([]byte, error)

type ApiCancelBatchResponseMessage

type ApiCancelBatchResponseMessage struct {
	Error *ApiErrorMessage `json:"error,omitempty"`

	Results []*ApiCancelBatchResponseMessageOneResult `json:"results,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Error") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Error") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiCancelBatchResponseMessage) MarshalJSON

func (s *ApiCancelBatchResponseMessage) MarshalJSON() ([]byte, error)

type ApiCancelBatchResponseMessageOneResult

type ApiCancelBatchResponseMessageOneResult struct {
	// Build: Describes model.Build, see its docstring.
	Build *ApiCommonBuildMessage `json:"build,omitempty"`

	BuildId int64 `json:"build_id,omitempty,string"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Build") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Build") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiCancelBatchResponseMessageOneResult) MarshalJSON

func (s *ApiCancelBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)

type ApiCancelRequestBodyMessage

type ApiCancelRequestBodyMessage struct {
	ResultDetailsJson string `json:"result_details_json,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ResultDetailsJson")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ResultDetailsJson") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

func (*ApiCancelRequestBodyMessage) MarshalJSON

func (s *ApiCancelRequestBodyMessage) MarshalJSON() ([]byte, error)

type ApiCommonBuildMessage

type ApiCommonBuildMessage struct {
	Bucket string `json:"bucket,omitempty"`

	Canary bool `json:"canary,omitempty"`

	// Possible values:
	//   "AUTO"
	//   "CANARY"
	//   "PROD"
	CanaryPreference string `json:"canary_preference,omitempty"`

	// Possible values:
	//   "CANCELED_EXPLICITLY"
	//   "TIMEOUT"
	CancelationReason string `json:"cancelation_reason,omitempty"`

	CompletedTs int64 `json:"completed_ts,omitempty,string"`

	CreatedBy string `json:"created_by,omitempty"`

	CreatedTs int64 `json:"created_ts,omitempty,string"`

	Experimental bool `json:"experimental,omitempty"`

	// Possible values:
	//   "BUILDBUCKET_FAILURE"
	//   "BUILD_FAILURE"
	//   "INFRA_FAILURE"
	//   "INVALID_BUILD_DEFINITION"
	FailureReason string `json:"failure_reason,omitempty"`

	Id int64 `json:"id,omitempty,string"`

	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	LeaseKey int64 `json:"lease_key,omitempty,string"`

	ParametersJson string `json:"parameters_json,omitempty"`

	Project string `json:"project,omitempty"`

	// Possible values:
	//   "CANCELED"
	//   "FAILURE"
	//   "SUCCESS"
	Result string `json:"result,omitempty"`

	ResultDetailsJson string `json:"result_details_json,omitempty"`

	RetryOf int64 `json:"retry_of,omitempty,string"`

	ServiceAccount string `json:"service_account,omitempty"`

	StartedTs int64 `json:"started_ts,omitempty,string"`

	// Possible values:
	//   "COMPLETED"
	//   "SCHEDULED"
	//   "STARTED"
	Status string `json:"status,omitempty"`

	StatusChangedTs int64 `json:"status_changed_ts,omitempty,string"`

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

	UpdatedTs int64 `json:"updated_ts,omitempty,string"`

	Url string `json:"url,omitempty"`

	UtcnowTs int64 `json:"utcnow_ts,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Bucket") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Bucket") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ApiCommonBuildMessage: Describes model.Build, see its docstring.

func GetByAddress

func GetByAddress(c context.Context, client *Service, address string) (*ApiCommonBuildMessage, error)

GetByAddress fetches a build by its address. Returns (nil, nil) if build is not found.

func (*ApiCommonBuildMessage) MarshalJSON

func (s *ApiCommonBuildMessage) MarshalJSON() ([]byte, error)

type ApiDeleteManyBuildsResponse

type ApiDeleteManyBuildsResponse struct {
	Error *ApiErrorMessage `json:"error,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Error") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Error") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiDeleteManyBuildsResponse) MarshalJSON

func (s *ApiDeleteManyBuildsResponse) MarshalJSON() ([]byte, error)

type ApiErrorMessage

type ApiErrorMessage struct {
	Message string `json:"message,omitempty"`

	// Possible values:
	//   "BUILDER_NOT_FOUND"
	//   "BUILD_IS_COMPLETED"
	//   "BUILD_NOT_FOUND"
	//   "CANNOT_LEASE_BUILD"
	//   "INVALID_BUILD_STATE"
	//   "INVALID_INPUT"
	//   "LEASE_EXPIRED"
	Reason string `json:"reason,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Message") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Message") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiErrorMessage) MarshalJSON

func (s *ApiErrorMessage) MarshalJSON() ([]byte, error)

type ApiFailRequestBodyMessage

type ApiFailRequestBodyMessage struct {
	// Possible values:
	//   "BUILDBUCKET_FAILURE"
	//   "BUILD_FAILURE"
	//   "INFRA_FAILURE"
	//   "INVALID_BUILD_DEFINITION"
	FailureReason string `json:"failure_reason,omitempty"`

	LeaseKey int64 `json:"lease_key,omitempty,string"`

	NewTags []string `json:"new_tags,omitempty"`

	ResultDetailsJson string `json:"result_details_json,omitempty"`

	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FailureReason") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "FailureReason") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiFailRequestBodyMessage) MarshalJSON

func (s *ApiFailRequestBodyMessage) MarshalJSON() ([]byte, error)

type ApiHeartbeatBatchRequestMessage

type ApiHeartbeatBatchRequestMessage struct {
	Heartbeats []*ApiHeartbeatBatchRequestMessageOneHeartbeat `json:"heartbeats,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Heartbeats") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Heartbeats") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiHeartbeatBatchRequestMessage) MarshalJSON

func (s *ApiHeartbeatBatchRequestMessage) MarshalJSON() ([]byte, error)

type ApiHeartbeatBatchRequestMessageOneHeartbeat

type ApiHeartbeatBatchRequestMessageOneHeartbeat struct {
	BuildId int64 `json:"build_id,omitempty,string"`

	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	LeaseKey int64 `json:"lease_key,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "BuildId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BuildId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiHeartbeatBatchRequestMessageOneHeartbeat) MarshalJSON

type ApiHeartbeatBatchResponseMessage

type ApiHeartbeatBatchResponseMessage struct {
	Error *ApiErrorMessage `json:"error,omitempty"`

	Results []*ApiHeartbeatBatchResponseMessageOneHeartbeatResult `json:"results,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Error") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Error") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiHeartbeatBatchResponseMessage) MarshalJSON

func (s *ApiHeartbeatBatchResponseMessage) MarshalJSON() ([]byte, error)

type ApiHeartbeatBatchResponseMessageOneHeartbeatResult

type ApiHeartbeatBatchResponseMessageOneHeartbeatResult struct {
	BuildId int64 `json:"build_id,omitempty,string"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "BuildId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BuildId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiHeartbeatBatchResponseMessageOneHeartbeatResult) MarshalJSON

type ApiHeartbeatRequestBodyMessage

type ApiHeartbeatRequestBodyMessage struct {
	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	LeaseKey int64 `json:"lease_key,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "LeaseExpirationTs")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LeaseExpirationTs") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

func (*ApiHeartbeatRequestBodyMessage) MarshalJSON

func (s *ApiHeartbeatRequestBodyMessage) MarshalJSON() ([]byte, error)

type ApiLeaseRequestBodyMessage

type ApiLeaseRequestBodyMessage struct {
	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "LeaseExpirationTs")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LeaseExpirationTs") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

func (*ApiLeaseRequestBodyMessage) MarshalJSON

func (s *ApiLeaseRequestBodyMessage) MarshalJSON() ([]byte, error)

type ApiPauseResponse

type ApiPauseResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

type ApiPubSubCallbackMessage

type ApiPubSubCallbackMessage struct {
	AuthToken string `json:"auth_token,omitempty"`

	Topic string `json:"topic,omitempty"`

	UserData string `json:"user_data,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AuthToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AuthToken") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiPubSubCallbackMessage) MarshalJSON

func (s *ApiPubSubCallbackMessage) MarshalJSON() ([]byte, error)

type ApiPutBatchRequestMessage

type ApiPutBatchRequestMessage struct {
	Builds []*ApiPutRequestMessage `json:"builds,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Builds") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Builds") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiPutBatchRequestMessage) MarshalJSON

func (s *ApiPutBatchRequestMessage) MarshalJSON() ([]byte, error)

type ApiPutBatchResponseMessage

type ApiPutBatchResponseMessage struct {
	Error *ApiErrorMessage `json:"error,omitempty"`

	Results []*ApiPutBatchResponseMessageOneResult `json:"results,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Error") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Error") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiPutBatchResponseMessage) MarshalJSON

func (s *ApiPutBatchResponseMessage) MarshalJSON() ([]byte, error)

type ApiPutBatchResponseMessageOneResult

type ApiPutBatchResponseMessageOneResult struct {
	// Build: Describes model.Build, see its docstring.
	Build *ApiCommonBuildMessage `json:"build,omitempty"`

	ClientOperationId string `json:"client_operation_id,omitempty"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Build") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Build") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiPutBatchResponseMessageOneResult) MarshalJSON

func (s *ApiPutBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)

type ApiPutRequestMessage

type ApiPutRequestMessage struct {
	Bucket string `json:"bucket,omitempty"`

	// Possible values:
	//   "AUTO"
	//   "CANARY"
	//   "PROD"
	CanaryPreference string `json:"canary_preference,omitempty"`

	ClientOperationId string `json:"client_operation_id,omitempty"`

	Experimental bool `json:"experimental,omitempty"`

	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	ParametersJson string `json:"parameters_json,omitempty"`

	PubsubCallback *ApiPubSubCallbackMessage `json:"pubsub_callback,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "Bucket") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Bucket") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiPutRequestMessage) MarshalJSON

func (s *ApiPutRequestMessage) MarshalJSON() ([]byte, error)

type ApiRetryRequestMessage

type ApiRetryRequestMessage struct {
	ClientOperationId string `json:"client_operation_id,omitempty"`

	LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

	PubsubCallback *ApiPubSubCallbackMessage `json:"pubsub_callback,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ClientOperationId")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ClientOperationId") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

func (*ApiRetryRequestMessage) MarshalJSON

func (s *ApiRetryRequestMessage) MarshalJSON() ([]byte, error)

type ApiSearchResponseMessage

type ApiSearchResponseMessage struct {
	// Builds: Describes model.Build, see its docstring.
	Builds []*ApiCommonBuildMessage `json:"builds,omitempty"`

	Error *ApiErrorMessage `json:"error,omitempty"`

	NextCursor string `json:"next_cursor,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Builds") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Builds") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiSearchResponseMessage) MarshalJSON

func (s *ApiSearchResponseMessage) MarshalJSON() ([]byte, error)

type ApiStartRequestBodyMessage

type ApiStartRequestBodyMessage struct {
	Canary bool `json:"canary,omitempty"`

	LeaseKey int64 `json:"lease_key,omitempty,string"`

	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Canary") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Canary") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiStartRequestBodyMessage) MarshalJSON

func (s *ApiStartRequestBodyMessage) MarshalJSON() ([]byte, error)

type ApiSucceedRequestBodyMessage

type ApiSucceedRequestBodyMessage struct {
	LeaseKey int64 `json:"lease_key,omitempty,string"`

	NewTags []string `json:"new_tags,omitempty"`

	ResultDetailsJson string `json:"result_details_json,omitempty"`

	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "LeaseKey") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LeaseKey") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*ApiSucceedRequestBodyMessage) MarshalJSON

func (s *ApiSucceedRequestBodyMessage) MarshalJSON() ([]byte, error)

type BackfillTagIndexCall

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

func (*BackfillTagIndexCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackfillTagIndexCall) Do

Do executes the "buildbucket.backfill_tag_index" call.

func (*BackfillTagIndexCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackfillTagIndexCall) Header

func (c *BackfillTagIndexCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CancelBatchCall

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

func (*CancelBatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CancelBatchCall) Do

Do executes the "buildbucket.cancel_batch" call. Exactly one of *ApiCancelBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiCancelBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CancelBatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CancelBatchCall) Header

func (c *CancelBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CancelCall

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

func (*CancelCall) Context

func (c *CancelCall) Context(ctx context.Context) *CancelCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CancelCall) Do

Do executes the "buildbucket.cancel" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CancelCall) Fields

func (c *CancelCall) Fields(s ...googleapi.Field) *CancelCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CancelCall) Header

func (c *CancelCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DeleteManyBuildsCall

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

func (*DeleteManyBuildsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DeleteManyBuildsCall) CreatedBy

func (c *DeleteManyBuildsCall) CreatedBy(createdBy string) *DeleteManyBuildsCall

CreatedBy sets the optional parameter "created_by":

func (*DeleteManyBuildsCall) Do

Do executes the "buildbucket.delete_many_builds" call. Exactly one of *ApiDeleteManyBuildsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiDeleteManyBuildsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DeleteManyBuildsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DeleteManyBuildsCall) Header

func (c *DeleteManyBuildsCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*DeleteManyBuildsCall) Tag

Tag sets the optional parameter "tag":

type FailCall

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

func (*FailCall) Context

func (c *FailCall) Context(ctx context.Context) *FailCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FailCall) Do

Do executes the "buildbucket.fail" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FailCall) Fields

func (c *FailCall) Fields(s ...googleapi.Field) *FailCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*FailCall) Header

func (c *FailCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type GetBucketCall

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

func (*GetBucketCall) Context

func (c *GetBucketCall) Context(ctx context.Context) *GetBucketCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GetBucketCall) Do

Do executes the "buildbucket.get_bucket" call. Exactly one of *ApiBucketMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBucketMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GetBucketCall) Fields

func (c *GetBucketCall) Fields(s ...googleapi.Field) *GetBucketCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GetBucketCall) Header

func (c *GetBucketCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*GetBucketCall) IfNoneMatch

func (c *GetBucketCall) IfNoneMatch(entityTag string) *GetBucketCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GetCall

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

func (*GetCall) Context

func (c *GetCall) Context(ctx context.Context) *GetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GetCall) Do

Do executes the "buildbucket.get" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GetCall) Fields

func (c *GetCall) Fields(s ...googleapi.Field) *GetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GetCall) Header

func (c *GetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*GetCall) IfNoneMatch

func (c *GetCall) IfNoneMatch(entityTag string) *GetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type HeartbeatBatchCall

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

func (*HeartbeatBatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*HeartbeatBatchCall) Do

Do executes the "buildbucket.heartbeat_batch" call. Exactly one of *ApiHeartbeatBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiHeartbeatBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*HeartbeatBatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*HeartbeatBatchCall) Header

func (c *HeartbeatBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type HeartbeatCall

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

func (*HeartbeatCall) Context

func (c *HeartbeatCall) Context(ctx context.Context) *HeartbeatCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*HeartbeatCall) Do

Do executes the "buildbucket.heartbeat" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*HeartbeatCall) Fields

func (c *HeartbeatCall) Fields(s ...googleapi.Field) *HeartbeatCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*HeartbeatCall) Header

func (c *HeartbeatCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LeaseCall

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

func (*LeaseCall) Context

func (c *LeaseCall) Context(ctx context.Context) *LeaseCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LeaseCall) Do

Do executes the "buildbucket.lease" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LeaseCall) Fields

func (c *LeaseCall) Fields(s ...googleapi.Field) *LeaseCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LeaseCall) Header

func (c *LeaseCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PauseCall

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

func (*PauseCall) Context

func (c *PauseCall) Context(ctx context.Context) *PauseCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PauseCall) Do

Do executes the "buildbucket.pause" call. Exactly one of *ApiPauseResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiPauseResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PauseCall) Fields

func (c *PauseCall) Fields(s ...googleapi.Field) *PauseCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PauseCall) Header

func (c *PauseCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PeekCall

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

func (*PeekCall) Bucket

func (c *PeekCall) Bucket(bucket ...string) *PeekCall

Bucket sets the optional parameter "bucket":

func (*PeekCall) Context

func (c *PeekCall) Context(ctx context.Context) *PeekCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PeekCall) Do

Do executes the "buildbucket.peek" call. Exactly one of *ApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiSearchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeekCall) Fields

func (c *PeekCall) Fields(s ...googleapi.Field) *PeekCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PeekCall) Header

func (c *PeekCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*PeekCall) IfNoneMatch

func (c *PeekCall) IfNoneMatch(entityTag string) *PeekCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PeekCall) MaxBuilds

func (c *PeekCall) MaxBuilds(maxBuilds int64) *PeekCall

MaxBuilds sets the optional parameter "max_builds":

func (*PeekCall) StartCursor

func (c *PeekCall) StartCursor(startCursor string) *PeekCall

StartCursor sets the optional parameter "start_cursor":

type PutBatchCall

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

func (*PutBatchCall) Context

func (c *PutBatchCall) Context(ctx context.Context) *PutBatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PutBatchCall) Do

Do executes the "buildbucket.put_batch" call. Exactly one of *ApiPutBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiPutBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PutBatchCall) Fields

func (c *PutBatchCall) Fields(s ...googleapi.Field) *PutBatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PutBatchCall) Header

func (c *PutBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PutCall

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

func (*PutCall) Context

func (c *PutCall) Context(ctx context.Context) *PutCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PutCall) Do

Do executes the "buildbucket.put" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PutCall) Fields

func (c *PutCall) Fields(s ...googleapi.Field) *PutCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PutCall) Header

func (c *PutCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type ReputBuildsCall

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

func (*ReputBuildsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ReputBuildsCall) Do

func (c *ReputBuildsCall) Do(opts ...googleapi.CallOption) error

Do executes the "buildbucket.reput_builds" call.

func (*ReputBuildsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ReputBuildsCall) Header

func (c *ReputBuildsCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type ResetCall

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

func (*ResetCall) Context

func (c *ResetCall) Context(ctx context.Context) *ResetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ResetCall) Do

Do executes the "buildbucket.reset" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ResetCall) Fields

func (c *ResetCall) Fields(s ...googleapi.Field) *ResetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ResetCall) Header

func (c *ResetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type RetryCall

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

func (*RetryCall) Context

func (c *RetryCall) Context(ctx context.Context) *RetryCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*RetryCall) Do

Do executes the "buildbucket.retry" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*RetryCall) Fields

func (c *RetryCall) Fields(s ...googleapi.Field) *RetryCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*RetryCall) Header

func (c *RetryCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SearchCall

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

func (*SearchCall) Bucket

func (c *SearchCall) Bucket(bucket ...string) *SearchCall

Bucket sets the optional parameter "bucket":

func (*SearchCall) Canary

func (c *SearchCall) Canary(canary bool) *SearchCall

Canary sets the optional parameter "canary":

func (*SearchCall) CancelationReason

func (c *SearchCall) CancelationReason(cancelationReason string) *SearchCall

CancelationReason sets the optional parameter "cancelation_reason":

Possible values:

"CANCELED_EXPLICITLY"
"TIMEOUT"

func (*SearchCall) Context

func (c *SearchCall) Context(ctx context.Context) *SearchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SearchCall) CreatedBy

func (c *SearchCall) CreatedBy(createdBy string) *SearchCall

CreatedBy sets the optional parameter "created_by":

func (*SearchCall) CreationTsHigh

func (c *SearchCall) CreationTsHigh(creationTsHigh int64) *SearchCall

CreationTsHigh sets the optional parameter "creation_ts_high":

func (*SearchCall) CreationTsLow

func (c *SearchCall) CreationTsLow(creationTsLow int64) *SearchCall

CreationTsLow sets the optional parameter "creation_ts_low":

func (*SearchCall) Do

Do executes the "buildbucket.search" call. Exactly one of *ApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiSearchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SearchCall) FailureReason

func (c *SearchCall) FailureReason(failureReason string) *SearchCall

FailureReason sets the optional parameter "failure_reason":

Possible values:

"BUILDBUCKET_FAILURE"
"BUILD_FAILURE"
"INFRA_FAILURE"
"INVALID_BUILD_DEFINITION"

func (*SearchCall) Fetch

func (c *SearchCall) Fetch(limit int, ret retry.Factory) ([]*ApiCommonBuildMessage, string, error)

Fetch fetches builds matching the search criteria. It stops when all builds are found or when context is cancelled. The order of returned builds is from most-recently-created to least-recently-created.

c.MaxBuilds value is used as a result page size, defaults to 100. limit, if >0, specifies the maximum number of builds to return.

If ret is nil, retries transient errors with exponential back-off. Logs errors on retries.

Returns nil only if the search results are exhausted. May return context.Canceled.

func (*SearchCall) Fields

func (c *SearchCall) Fields(s ...googleapi.Field) *SearchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SearchCall) Header

func (c *SearchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SearchCall) IfNoneMatch

func (c *SearchCall) IfNoneMatch(entityTag string) *SearchCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SearchCall) IncludeExperimental

func (c *SearchCall) IncludeExperimental(includeExperimental bool) *SearchCall

IncludeExperimental sets the optional parameter "include_experimental":

func (*SearchCall) MaxBuilds

func (c *SearchCall) MaxBuilds(maxBuilds int64) *SearchCall

MaxBuilds sets the optional parameter "max_builds":

func (*SearchCall) Result

func (c *SearchCall) Result(result string) *SearchCall

Result sets the optional parameter "result":

Possible values:

"CANCELED"
"FAILURE"
"SUCCESS"

func (*SearchCall) RetryOf

func (c *SearchCall) RetryOf(retryOf int64) *SearchCall

RetryOf sets the optional parameter "retry_of":

func (*SearchCall) Run

func (c *SearchCall) Run(builds chan<- *ApiCommonBuildMessage, limit int, ret retry.Factory) (cursor string, err error)

Run is like Fetch, but sends results to a channel and the default page size is defined by the server (10 as of Sep 2017).

Run blocks on sending.

func (*SearchCall) StartCursor

func (c *SearchCall) StartCursor(startCursor string) *SearchCall

StartCursor sets the optional parameter "start_cursor":

func (*SearchCall) Status

func (c *SearchCall) Status(status string) *SearchCall

Status sets the optional parameter "status":

Possible values:

"COMPLETED"
"INCOMPLETE"
"SCHEDULED"
"STARTED"

func (*SearchCall) Tag

func (c *SearchCall) Tag(tag ...string) *SearchCall

Tag sets the optional parameter "tag":

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

func (*Service) BackfillTagIndex

func (s *Service) BackfillTagIndex(tagKey string) *BackfillTagIndexCall

BackfillTagIndex: Backfills TagIndex entites from builds.

func (*Service) Cancel

func (s *Service) Cancel(id int64, apicancelrequestbodymessage *ApiCancelRequestBodyMessage) *CancelCall

Cancel: Cancels a build.

func (*Service) CancelBatch

func (s *Service) CancelBatch(apicancelbatchrequestmessage *ApiCancelBatchRequestMessage) *CancelBatchCall

CancelBatch: Cancels builds.

func (*Service) DeleteManyBuilds

func (s *Service) DeleteManyBuilds(bucket string, status string) *DeleteManyBuildsCall

DeleteManyBuilds: Deletes scheduled or started builds in a bucket.

func (*Service) Fail

func (s *Service) Fail(id int64, apifailrequestbodymessage *ApiFailRequestBodyMessage) *FailCall

Fail: Marks a build as failed.

func (*Service) Get

func (s *Service) Get(id int64) *GetCall

Get: Returns a build by id.

func (*Service) GetBucket

func (s *Service) GetBucket(bucket string) *GetBucketCall

GetBucket: Returns bucket information.

func (*Service) Heartbeat

func (s *Service) Heartbeat(id int64, apiheartbeatrequestbodymessage *ApiHeartbeatRequestBodyMessage) *HeartbeatCall

Heartbeat: Updates build lease.

func (*Service) HeartbeatBatch

func (s *Service) HeartbeatBatch(apiheartbeatbatchrequestmessage *ApiHeartbeatBatchRequestMessage) *HeartbeatBatchCall

HeartbeatBatch: Updates multiple build leases.

func (*Service) Lease

func (s *Service) Lease(id int64, apileaserequestbodymessage *ApiLeaseRequestBodyMessage) *LeaseCall

Lease: Leases a build. Response may contain an error.

func (*Service) Pause

func (s *Service) Pause(bucket string, isPaused bool) *PauseCall

Pause: Pauses or unpause a bucket.

func (*Service) Peek

func (s *Service) Peek() *PeekCall

Peek: Returns available builds.

func (*Service) Put

func (s *Service) Put(apiputrequestmessage *ApiPutRequestMessage) *PutCall

Put: Creates a new build.

func (*Service) PutBatch

func (s *Service) PutBatch(apiputbatchrequestmessage *ApiPutBatchRequestMessage) *PutBatchCall

PutBatch: Creates builds.

func (*Service) ReputBuilds

func (s *Service) ReputBuilds() *ReputBuildsCall

ReputBuilds: Reputs every build, recomputing its properties.

func (*Service) Reset

func (s *Service) Reset(id int64) *ResetCall

Reset: Forcibly unleases a build and resets its state to SCHEDULED.

func (*Service) Retry

func (s *Service) Retry(id int64, apiretryrequestmessage *ApiRetryRequestMessage) *RetryCall

Retry: Retries an existing build.

func (*Service) Search

func (s *Service) Search() *SearchCall

Search: Searches for builds.

func (*Service) Start

func (s *Service) Start(id int64, apistartrequestbodymessage *ApiStartRequestBodyMessage) *StartCall

Start: Marks a build as started.

func (*Service) Succeed

func (s *Service) Succeed(id int64, apisucceedrequestbodymessage *ApiSucceedRequestBodyMessage) *SucceedCall

Succeed: Marks a build as succeeded.

type StartCall

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

func (*StartCall) Context

func (c *StartCall) Context(ctx context.Context) *StartCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*StartCall) Do

Do executes the "buildbucket.start" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*StartCall) Fields

func (c *StartCall) Fields(s ...googleapi.Field) *StartCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*StartCall) Header

func (c *StartCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SucceedCall

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

func (*SucceedCall) Context

func (c *SucceedCall) Context(ctx context.Context) *SucceedCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SucceedCall) Do

Do executes the "buildbucket.succeed" call. Exactly one of *ApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SucceedCall) Fields

func (c *SucceedCall) Fields(s ...googleapi.Field) *SucceedCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SucceedCall) Header

func (c *SucceedCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

Jump to

Keyboard shortcuts

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