Documentation ¶
Overview ¶
Package buildbucket provides access to the Build Bucket Service.
Creating a client ¶
Usage example:
import "go.chromium.org/luci/common/api/buildbucket/buildbucket/v1" ... ctx := context.Background() buildbucketService, err := buildbucket.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
buildbucketService, err := buildbucket.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) buildbucketService, err := buildbucket.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- func FormatBuildAddress(id int64, bucket, builder string, number int) string
- func FormatTimestamp(t time.Time) int64
- func ParseBuildAddress(address string) (id int64, project, bucket, builder string, number int, err error)
- func ParseTimestamp(usec int64) time.Time
- func ProjectFromBucket(bucket string) string
- func ValidateBuildAddress(address string) error
- type BackfillTagIndexCall
- type CancelBatchCall
- type CancelCall
- type DeleteManyBuildsCall
- func (c *DeleteManyBuildsCall) Context(ctx context.Context) *DeleteManyBuildsCall
- func (c *DeleteManyBuildsCall) CreatedBy(createdBy string) *DeleteManyBuildsCall
- func (c *DeleteManyBuildsCall) Do(opts ...googleapi.CallOption) (*LegacyApiDeleteManyBuildsResponse, error)
- func (c *DeleteManyBuildsCall) Fields(s ...googleapi.Field) *DeleteManyBuildsCall
- func (c *DeleteManyBuildsCall) Header() http.Header
- func (c *DeleteManyBuildsCall) Tag(tag ...string) *DeleteManyBuildsCall
- type FailCall
- type FixBuildsCall
- type GetBucketCall
- func (c *GetBucketCall) Context(ctx context.Context) *GetBucketCall
- func (c *GetBucketCall) Do(opts ...googleapi.CallOption) (*LegacyApiBucketMessage, error)
- func (c *GetBucketCall) Fields(s ...googleapi.Field) *GetBucketCall
- func (c *GetBucketCall) Header() http.Header
- func (c *GetBucketCall) IfNoneMatch(entityTag string) *GetBucketCall
- type GetCall
- type HeartbeatBatchCall
- func (c *HeartbeatBatchCall) Context(ctx context.Context) *HeartbeatBatchCall
- func (c *HeartbeatBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiHeartbeatBatchResponseMessage, error)
- func (c *HeartbeatBatchCall) Fields(s ...googleapi.Field) *HeartbeatBatchCall
- func (c *HeartbeatBatchCall) Header() http.Header
- type HeartbeatCall
- type LeaseCall
- type LegacyApiBucketMessage
- type LegacyApiBuildResponseMessage
- type LegacyApiCancelBatchRequestMessage
- type LegacyApiCancelBatchResponseMessage
- type LegacyApiCancelBatchResponseMessageOneResult
- type LegacyApiCancelRequestBodyMessage
- type LegacyApiCommonBuildMessage
- type LegacyApiDeleteManyBuildsResponse
- type LegacyApiErrorMessage
- type LegacyApiFailRequestBodyMessage
- type LegacyApiHeartbeatBatchRequestMessage
- type LegacyApiHeartbeatBatchRequestMessageOneHeartbeat
- type LegacyApiHeartbeatBatchResponseMessage
- type LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult
- type LegacyApiHeartbeatRequestBodyMessage
- type LegacyApiLeaseRequestBodyMessage
- type LegacyApiPauseResponse
- type LegacyApiPubSubCallbackMessage
- type LegacyApiPutBatchRequestMessage
- type LegacyApiPutBatchResponseMessage
- type LegacyApiPutBatchResponseMessageOneResult
- type LegacyApiPutRequestMessage
- type LegacyApiRetryRequestMessage
- type LegacyApiSearchResponseMessage
- type LegacyApiStartRequestBodyMessage
- type LegacyApiSucceedRequestBodyMessage
- type PauseCall
- type PeekCall
- func (c *PeekCall) Bucket(bucket ...string) *PeekCall
- func (c *PeekCall) Context(ctx context.Context) *PeekCall
- func (c *PeekCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)
- func (c *PeekCall) Fields(s ...googleapi.Field) *PeekCall
- func (c *PeekCall) Header() http.Header
- func (c *PeekCall) IfNoneMatch(entityTag string) *PeekCall
- func (c *PeekCall) MaxBuilds(maxBuilds int64) *PeekCall
- func (c *PeekCall) StartCursor(startCursor string) *PeekCall
- type PutBatchCall
- type PutCall
- type ResetCall
- type RetryCall
- type SearchCall
- func (c *SearchCall) Bucket(bucket ...string) *SearchCall
- func (c *SearchCall) Canary(canary bool) *SearchCall
- func (c *SearchCall) CancelationReason(cancelationReason string) *SearchCall
- func (c *SearchCall) Context(ctx context.Context) *SearchCall
- func (c *SearchCall) CreatedBy(createdBy string) *SearchCall
- func (c *SearchCall) CreationTsHigh(creationTsHigh int64) *SearchCall
- func (c *SearchCall) CreationTsLow(creationTsLow int64) *SearchCall
- func (c *SearchCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)
- func (c *SearchCall) FailureReason(failureReason string) *SearchCall
- func (c *SearchCall) Fetch(limit int, ret retry.Factory) ([]*LegacyApiCommonBuildMessage, string, error)
- func (c *SearchCall) Fields(s ...googleapi.Field) *SearchCall
- func (c *SearchCall) Header() http.Header
- func (c *SearchCall) IfNoneMatch(entityTag string) *SearchCall
- func (c *SearchCall) IncludeExperimental(includeExperimental bool) *SearchCall
- func (c *SearchCall) MaxBuilds(maxBuilds int64) *SearchCall
- func (c *SearchCall) Result(result string) *SearchCall
- func (c *SearchCall) RetryOf(retryOf int64) *SearchCall
- func (c *SearchCall) Run(builds chan<- *LegacyApiCommonBuildMessage, limit int, ret retry.Factory) (cursor string, err error)
- func (c *SearchCall) StartCursor(startCursor string) *SearchCall
- func (c *SearchCall) Status(status string) *SearchCall
- func (c *SearchCall) Tag(tag ...string) *SearchCall
- type Service
- func (s *Service) BackfillTagIndex(tagKey string) *BackfillTagIndexCall
- func (s *Service) Cancel(id int64, legacyapicancelrequestbodymessage *LegacyApiCancelRequestBodyMessage) *CancelCall
- func (s *Service) CancelBatch(legacyapicancelbatchrequestmessage *LegacyApiCancelBatchRequestMessage) *CancelBatchCall
- func (s *Service) DeleteManyBuilds(bucket string, status string) *DeleteManyBuildsCall
- func (s *Service) Fail(id int64, legacyapifailrequestbodymessage *LegacyApiFailRequestBodyMessage) *FailCall
- func (s *Service) FixBuilds() *FixBuildsCall
- func (s *Service) Get(id int64) *GetCall
- func (s *Service) GetBucket(bucket string) *GetBucketCall
- func (s *Service) Heartbeat(id int64, ...) *HeartbeatCall
- func (s *Service) HeartbeatBatch(legacyapiheartbeatbatchrequestmessage *LegacyApiHeartbeatBatchRequestMessage) *HeartbeatBatchCall
- func (s *Service) Lease(id int64, legacyapileaserequestbodymessage *LegacyApiLeaseRequestBodyMessage) *LeaseCall
- func (s *Service) Pause(bucket string, isPaused bool) *PauseCall
- func (s *Service) Peek() *PeekCall
- func (s *Service) Put(legacyapiputrequestmessage *LegacyApiPutRequestMessage) *PutCall
- func (s *Service) PutBatch(legacyapiputbatchrequestmessage *LegacyApiPutBatchRequestMessage) *PutBatchCall
- func (s *Service) Reset(id int64) *ResetCall
- func (s *Service) Retry(id int64, legacyapiretryrequestmessage *LegacyApiRetryRequestMessage) *RetryCall
- func (s *Service) Search() *SearchCall
- func (s *Service) Start(id int64, legacyapistartrequestbodymessage *LegacyApiStartRequestBodyMessage) *StartCall
- func (s *Service) Succeed(id int64, ...) *SucceedCall
- type StartCall
- type SucceedCall
Constants ¶
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.
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" )
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" )
const (
// ReasonNotFound means the given build ID was not found on the BuildBucket service.
ReasonNotFound = "BUILD_NOT_FOUND"
)
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.
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 ¶
FormatBuildAddress returns a value for TagBuildAddress tag. If number is positive, returns "<bucket>/<builder>/<number>", otherwise returns "<id>"
See also ParseBuildAddress.
func FormatTimestamp ¶
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 ¶
ParseTimestamp parses a buildbucket timestamp.
func ProjectFromBucket ¶
ProjectFromBucket tries to retrieve project id from bucket name. Returns "" on failure.
func ValidateBuildAddress ¶
ValidateBuildAddress returns an error if the build address is invalid.
Types ¶
type BackfillTagIndexCall ¶
type BackfillTagIndexCall struct {
// contains filtered or unexported fields
}
func (*BackfillTagIndexCall) Context ¶
func (c *BackfillTagIndexCall) Context(ctx context.Context) *BackfillTagIndexCall
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 ¶
func (c *BackfillTagIndexCall) Do(opts ...googleapi.CallOption) error
Do executes the "buildbucket.backfill_tag_index" call.
func (*BackfillTagIndexCall) Fields ¶
func (c *BackfillTagIndexCall) Fields(s ...googleapi.Field) *BackfillTagIndexCall
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 ¶
func (c *CancelBatchCall) Context(ctx context.Context) *CancelBatchCall
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 ¶
func (c *CancelBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiCancelBatchResponseMessage, error)
Do executes the "buildbucket.cancel_batch" call. Exactly one of *LegacyApiCancelBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiCancelBatchResponseMessage.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 ¶
func (c *CancelBatchCall) Fields(s ...googleapi.Field) *CancelBatchCall
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 ¶
func (c *CancelCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.cancel" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
func (c *DeleteManyBuildsCall) Context(ctx context.Context) *DeleteManyBuildsCall
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 ¶
func (c *DeleteManyBuildsCall) Do(opts ...googleapi.CallOption) (*LegacyApiDeleteManyBuildsResponse, error)
Do executes the "buildbucket.delete_many_builds" call. Exactly one of *LegacyApiDeleteManyBuildsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiDeleteManyBuildsResponse.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 ¶
func (c *DeleteManyBuildsCall) Fields(s ...googleapi.Field) *DeleteManyBuildsCall
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 ¶
func (c *DeleteManyBuildsCall) Tag(tag ...string) *DeleteManyBuildsCall
Tag sets the optional parameter "tag":
type FailCall ¶
type FailCall struct {
// contains filtered or unexported fields
}
func (*FailCall) 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 (*FailCall) Do ¶
func (c *FailCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.fail" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type FixBuildsCall ¶
type FixBuildsCall struct {
// contains filtered or unexported fields
}
func (*FixBuildsCall) Context ¶
func (c *FixBuildsCall) Context(ctx context.Context) *FixBuildsCall
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 (*FixBuildsCall) Do ¶
func (c *FixBuildsCall) Do(opts ...googleapi.CallOption) error
Do executes the "buildbucket.fix_builds" call.
func (*FixBuildsCall) Fields ¶
func (c *FixBuildsCall) Fields(s ...googleapi.Field) *FixBuildsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*FixBuildsCall) Header ¶
func (c *FixBuildsCall) 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 ¶
func (c *GetBucketCall) Do(opts ...googleapi.CallOption) (*LegacyApiBucketMessage, error)
Do executes the "buildbucket.get_bucket" call. Exactly one of *LegacyApiBucketMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBucketMessage.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 ¶
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 ¶
func (c *GetCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.get" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetCall) Header ¶
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetCall) IfNoneMatch ¶
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 ¶
func (c *HeartbeatBatchCall) Context(ctx context.Context) *HeartbeatBatchCall
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 ¶
func (c *HeartbeatBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiHeartbeatBatchResponseMessage, error)
Do executes the "buildbucket.heartbeat_batch" call. Exactly one of *LegacyApiHeartbeatBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiHeartbeatBatchResponseMessage.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 ¶
func (c *HeartbeatBatchCall) Fields(s ...googleapi.Field) *HeartbeatBatchCall
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 ¶
func (c *HeartbeatCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.heartbeat" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
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 ¶
func (c *LeaseCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.lease" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type LegacyApiBucketMessage ¶
type LegacyApiBucketMessage struct { ConfigFileContent string `json:"config_file_content,omitempty"` ConfigFileRev string `json:"config_file_rev,omitempty"` ConfigFileUrl string `json:"config_file_url,omitempty"` Error *LegacyApiErrorMessage `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 (*LegacyApiBucketMessage) MarshalJSON ¶
func (s *LegacyApiBucketMessage) MarshalJSON() ([]byte, error)
type LegacyApiBuildResponseMessage ¶
type LegacyApiBuildResponseMessage struct { // Build: Describes model.Build, see its docstring. Build *LegacyApiCommonBuildMessage `json:"build,omitempty"` Error *LegacyApiErrorMessage `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 (*LegacyApiBuildResponseMessage) MarshalJSON ¶
func (s *LegacyApiBuildResponseMessage) MarshalJSON() ([]byte, error)
type LegacyApiCancelBatchRequestMessage ¶
type LegacyApiCancelBatchRequestMessage 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 (*LegacyApiCancelBatchRequestMessage) MarshalJSON ¶
func (s *LegacyApiCancelBatchRequestMessage) MarshalJSON() ([]byte, error)
type LegacyApiCancelBatchResponseMessage ¶
type LegacyApiCancelBatchResponseMessage struct { Error *LegacyApiErrorMessage `json:"error,omitempty"` Results []*LegacyApiCancelBatchResponseMessageOneResult `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 (*LegacyApiCancelBatchResponseMessage) MarshalJSON ¶
func (s *LegacyApiCancelBatchResponseMessage) MarshalJSON() ([]byte, error)
type LegacyApiCancelBatchResponseMessageOneResult ¶
type LegacyApiCancelBatchResponseMessageOneResult struct { // Build: Describes model.Build, see its docstring. Build *LegacyApiCommonBuildMessage `json:"build,omitempty"` BuildId int64 `json:"build_id,omitempty,string"` Error *LegacyApiErrorMessage `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 (*LegacyApiCancelBatchResponseMessageOneResult) MarshalJSON ¶
func (s *LegacyApiCancelBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)
type LegacyApiCancelRequestBodyMessage ¶
type LegacyApiCancelRequestBodyMessage 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 (*LegacyApiCancelRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiCancelRequestBodyMessage) MarshalJSON() ([]byte, error)
type LegacyApiCommonBuildMessage ¶
type LegacyApiCommonBuildMessage 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:"-"` }
LegacyApiCommonBuildMessage: Describes model.Build, see its docstring.
func GetByAddress ¶
func GetByAddress(c context.Context, client *Service, address string) (*LegacyApiCommonBuildMessage, error)
GetByAddress fetches a build by its address. Returns (nil, nil) if build is not found.
func (*LegacyApiCommonBuildMessage) MarshalJSON ¶
func (s *LegacyApiCommonBuildMessage) MarshalJSON() ([]byte, error)
type LegacyApiDeleteManyBuildsResponse ¶
type LegacyApiDeleteManyBuildsResponse struct { Error *LegacyApiErrorMessage `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 (*LegacyApiDeleteManyBuildsResponse) MarshalJSON ¶
func (s *LegacyApiDeleteManyBuildsResponse) MarshalJSON() ([]byte, error)
type LegacyApiErrorMessage ¶
type LegacyApiErrorMessage 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 (*LegacyApiErrorMessage) MarshalJSON ¶
func (s *LegacyApiErrorMessage) MarshalJSON() ([]byte, error)
type LegacyApiFailRequestBodyMessage ¶
type LegacyApiFailRequestBodyMessage 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 (*LegacyApiFailRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiFailRequestBodyMessage) MarshalJSON() ([]byte, error)
type LegacyApiHeartbeatBatchRequestMessage ¶
type LegacyApiHeartbeatBatchRequestMessage struct { Heartbeats []*LegacyApiHeartbeatBatchRequestMessageOneHeartbeat `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 (*LegacyApiHeartbeatBatchRequestMessage) MarshalJSON ¶
func (s *LegacyApiHeartbeatBatchRequestMessage) MarshalJSON() ([]byte, error)
type LegacyApiHeartbeatBatchRequestMessageOneHeartbeat ¶
type LegacyApiHeartbeatBatchRequestMessageOneHeartbeat 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 (*LegacyApiHeartbeatBatchRequestMessageOneHeartbeat) MarshalJSON ¶
func (s *LegacyApiHeartbeatBatchRequestMessageOneHeartbeat) MarshalJSON() ([]byte, error)
type LegacyApiHeartbeatBatchResponseMessage ¶
type LegacyApiHeartbeatBatchResponseMessage struct { Error *LegacyApiErrorMessage `json:"error,omitempty"` Results []*LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult `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 (*LegacyApiHeartbeatBatchResponseMessage) MarshalJSON ¶
func (s *LegacyApiHeartbeatBatchResponseMessage) MarshalJSON() ([]byte, error)
type LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult ¶
type LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult struct { BuildId int64 `json:"build_id,omitempty,string"` Error *LegacyApiErrorMessage `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 (*LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult) MarshalJSON ¶
func (s *LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult) MarshalJSON() ([]byte, error)
type LegacyApiHeartbeatRequestBodyMessage ¶
type LegacyApiHeartbeatRequestBodyMessage 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 (*LegacyApiHeartbeatRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiHeartbeatRequestBodyMessage) MarshalJSON() ([]byte, error)
type LegacyApiLeaseRequestBodyMessage ¶
type LegacyApiLeaseRequestBodyMessage 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 (*LegacyApiLeaseRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiLeaseRequestBodyMessage) MarshalJSON() ([]byte, error)
type LegacyApiPauseResponse ¶
type LegacyApiPauseResponse struct { // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` }
type LegacyApiPubSubCallbackMessage ¶
type LegacyApiPubSubCallbackMessage 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 (*LegacyApiPubSubCallbackMessage) MarshalJSON ¶
func (s *LegacyApiPubSubCallbackMessage) MarshalJSON() ([]byte, error)
type LegacyApiPutBatchRequestMessage ¶
type LegacyApiPutBatchRequestMessage struct { Builds []*LegacyApiPutRequestMessage `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 (*LegacyApiPutBatchRequestMessage) MarshalJSON ¶
func (s *LegacyApiPutBatchRequestMessage) MarshalJSON() ([]byte, error)
type LegacyApiPutBatchResponseMessage ¶
type LegacyApiPutBatchResponseMessage struct { Error *LegacyApiErrorMessage `json:"error,omitempty"` Results []*LegacyApiPutBatchResponseMessageOneResult `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 (*LegacyApiPutBatchResponseMessage) MarshalJSON ¶
func (s *LegacyApiPutBatchResponseMessage) MarshalJSON() ([]byte, error)
type LegacyApiPutBatchResponseMessageOneResult ¶
type LegacyApiPutBatchResponseMessageOneResult struct { // Build: Describes model.Build, see its docstring. Build *LegacyApiCommonBuildMessage `json:"build,omitempty"` ClientOperationId string `json:"client_operation_id,omitempty"` Error *LegacyApiErrorMessage `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 (*LegacyApiPutBatchResponseMessageOneResult) MarshalJSON ¶
func (s *LegacyApiPutBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)
type LegacyApiPutRequestMessage ¶
type LegacyApiPutRequestMessage 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 *LegacyApiPubSubCallbackMessage `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 (*LegacyApiPutRequestMessage) MarshalJSON ¶
func (s *LegacyApiPutRequestMessage) MarshalJSON() ([]byte, error)
type LegacyApiRetryRequestMessage ¶
type LegacyApiRetryRequestMessage struct { ClientOperationId string `json:"client_operation_id,omitempty"` LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"` PubsubCallback *LegacyApiPubSubCallbackMessage `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 (*LegacyApiRetryRequestMessage) MarshalJSON ¶
func (s *LegacyApiRetryRequestMessage) MarshalJSON() ([]byte, error)
type LegacyApiSearchResponseMessage ¶
type LegacyApiSearchResponseMessage struct { // Builds: Describes model.Build, see its docstring. Builds []*LegacyApiCommonBuildMessage `json:"builds,omitempty"` Error *LegacyApiErrorMessage `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 (*LegacyApiSearchResponseMessage) MarshalJSON ¶
func (s *LegacyApiSearchResponseMessage) MarshalJSON() ([]byte, error)
type LegacyApiStartRequestBodyMessage ¶
type LegacyApiStartRequestBodyMessage struct { LeaseKey int64 `json:"lease_key,omitempty,string"` 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 (*LegacyApiStartRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiStartRequestBodyMessage) MarshalJSON() ([]byte, error)
type LegacyApiSucceedRequestBodyMessage ¶
type LegacyApiSucceedRequestBodyMessage 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 (*LegacyApiSucceedRequestBodyMessage) MarshalJSON ¶
func (s *LegacyApiSucceedRequestBodyMessage) MarshalJSON() ([]byte, error)
type PauseCall ¶
type PauseCall struct {
// contains filtered or unexported fields
}
func (*PauseCall) 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 (*PauseCall) Do ¶
func (c *PauseCall) Do(opts ...googleapi.CallOption) (*LegacyApiPauseResponse, error)
Do executes the "buildbucket.pause" call. Exactly one of *LegacyApiPauseResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiPauseResponse.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type PeekCall ¶
type PeekCall struct {
// contains filtered or unexported fields
}
func (*PeekCall) 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 (*PeekCall) Do ¶
func (c *PeekCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)
Do executes the "buildbucket.peek" call. Exactly one of *LegacyApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiSearchResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*PeekCall) Header ¶
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*PeekCall) IfNoneMatch ¶
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) StartCursor ¶
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 ¶
func (c *PutBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiPutBatchResponseMessage, error)
Do executes the "buildbucket.put_batch" call. Exactly one of *LegacyApiPutBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiPutBatchResponseMessage.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 ¶
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 ¶
func (c *PutCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.put" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ResetCall ¶
type ResetCall struct {
// contains filtered or unexported fields
}
func (*ResetCall) 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 (*ResetCall) Do ¶
func (c *ResetCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.reset" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type RetryCall ¶
type RetryCall struct {
// contains filtered or unexported fields
}
func (*RetryCall) 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 (*RetryCall) Do ¶
func (c *RetryCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.retry" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
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 ¶
func (c *SearchCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)
Do executes the "buildbucket.search" call. Exactly one of *LegacyApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiSearchResponseMessage.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) ([]*LegacyApiCommonBuildMessage, 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<- *LegacyApiCommonBuildMessage, 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
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.
func (*Service) BackfillTagIndex ¶
func (s *Service) BackfillTagIndex(tagKey string) *BackfillTagIndexCall
BackfillTagIndex: Backfills TagIndex entities from builds.
func (*Service) Cancel ¶
func (s *Service) Cancel(id int64, legacyapicancelrequestbodymessage *LegacyApiCancelRequestBodyMessage) *CancelCall
Cancel: Cancels a build.
func (*Service) CancelBatch ¶
func (s *Service) CancelBatch(legacyapicancelbatchrequestmessage *LegacyApiCancelBatchRequestMessage) *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, legacyapifailrequestbodymessage *LegacyApiFailRequestBodyMessage) *FailCall
Fail: Marks a build as failed.
func (*Service) FixBuilds ¶
func (s *Service) FixBuilds() *FixBuildsCall
FixBuilds: Fixes all builds.
func (*Service) GetBucket ¶
func (s *Service) GetBucket(bucket string) *GetBucketCall
GetBucket: Returns bucket information.
func (*Service) Heartbeat ¶
func (s *Service) Heartbeat(id int64, legacyapiheartbeatrequestbodymessage *LegacyApiHeartbeatRequestBodyMessage) *HeartbeatCall
Heartbeat: Updates build lease.
func (*Service) HeartbeatBatch ¶
func (s *Service) HeartbeatBatch(legacyapiheartbeatbatchrequestmessage *LegacyApiHeartbeatBatchRequestMessage) *HeartbeatBatchCall
HeartbeatBatch: Updates multiple build leases.
func (*Service) Lease ¶
func (s *Service) Lease(id int64, legacyapileaserequestbodymessage *LegacyApiLeaseRequestBodyMessage) *LeaseCall
Lease: Leases a build. Response may contain an error.
func (*Service) Put ¶
func (s *Service) Put(legacyapiputrequestmessage *LegacyApiPutRequestMessage) *PutCall
Put: Creates a new build.
func (*Service) PutBatch ¶
func (s *Service) PutBatch(legacyapiputbatchrequestmessage *LegacyApiPutBatchRequestMessage) *PutBatchCall
PutBatch: Creates builds.
func (*Service) Retry ¶
func (s *Service) Retry(id int64, legacyapiretryrequestmessage *LegacyApiRetryRequestMessage) *RetryCall
Retry: Retries an existing build.
func (*Service) Start ¶
func (s *Service) Start(id int64, legacyapistartrequestbodymessage *LegacyApiStartRequestBodyMessage) *StartCall
Start: Marks a build as started.
func (*Service) Succeed ¶
func (s *Service) Succeed(id int64, legacyapisucceedrequestbodymessage *LegacyApiSucceedRequestBodyMessage) *SucceedCall
Succeed: Marks a build as succeeded.
type StartCall ¶
type StartCall struct {
// contains filtered or unexported fields
}
func (*StartCall) 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 (*StartCall) Do ¶
func (c *StartCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.start" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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 ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
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 ¶
func (c *SucceedCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)
Do executes the "buildbucket.succeed" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.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.