isolateservice

package
v0.0.0-...-35d8de9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package isolateservice provides access to the .

Creating a client

Usage example:

import "go.chromium.org/luci/common/api/isolate/isolateservice/v1"
...
ctx := context.Background()
isolateserviceService, err := isolateservice.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:

isolateserviceService, err := isolateservice.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, ...)
isolateserviceService, err := isolateservice.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

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

This section is empty.

Types

type FinalizeGsUploadCall

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

func (*FinalizeGsUploadCall) 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 (*FinalizeGsUploadCall) Do

Do executes the "isolateservice.finalize_gs_upload" call. Exactly one of *HandlersEndpointsV1PushPing or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HandlersEndpointsV1PushPing.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 (*FinalizeGsUploadCall) Fields

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

func (*FinalizeGsUploadCall) Header

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

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

type HandlersEndpointsV1Digest

type HandlersEndpointsV1Digest struct {
	Digest string `json:"digest,omitempty"`

	IsIsolated bool `json:"is_isolated,omitempty"`

	Size int64 `json:"size,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Digest") 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. "Digest") 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:"-"`
}

HandlersEndpointsV1Digest: ProtoRPC message containing digest information.

func (*HandlersEndpointsV1Digest) MarshalJSON

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

type HandlersEndpointsV1DigestCollection

type HandlersEndpointsV1DigestCollection struct {
	// Items: ProtoRPC message containing digest information.
	Items []*HandlersEndpointsV1Digest `json:"items,omitempty"`

	// Namespace: Encapsulates namespace, compression, and hash algorithm.
	Namespace *HandlersEndpointsV1Namespace `json:"namespace,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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:"-"`
}

HandlersEndpointsV1DigestCollection: Endpoints request type analogous to the existing JSON post body.

func (*HandlersEndpointsV1DigestCollection) MarshalJSON

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

type HandlersEndpointsV1FinalizeRequest

type HandlersEndpointsV1FinalizeRequest struct {
	UploadTicket string `json:"upload_ticket,omitempty"`

	// ForceSendFields is a list of field names (e.g. "UploadTicket") 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. "UploadTicket") 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:"-"`
}

HandlersEndpointsV1FinalizeRequest: Request to validate upload of large Google storage entities.

func (*HandlersEndpointsV1FinalizeRequest) MarshalJSON

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

type HandlersEndpointsV1Namespace

type HandlersEndpointsV1Namespace struct {
	Namespace string `json:"namespace,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Namespace") 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. "Namespace") 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:"-"`
}

HandlersEndpointsV1Namespace: Encapsulates namespace, compression, and hash algorithm.

func (*HandlersEndpointsV1Namespace) MarshalJSON

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

type HandlersEndpointsV1PreuploadStatus

type HandlersEndpointsV1PreuploadStatus struct {
	GsUploadUrl string `json:"gs_upload_url,omitempty"`

	Index int64 `json:"index,omitempty,string"`

	UploadTicket string `json:"upload_ticket,omitempty"`

	// ForceSendFields is a list of field names (e.g. "GsUploadUrl") 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. "GsUploadUrl") 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:"-"`
}

HandlersEndpointsV1PreuploadStatus: Endpoints response type for a single URL or pair of URLs.

func (*HandlersEndpointsV1PreuploadStatus) MarshalJSON

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

type HandlersEndpointsV1PushPing

type HandlersEndpointsV1PushPing struct {
	Ok bool `json:"ok,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "Ok") 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. "Ok") 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:"-"`
}

HandlersEndpointsV1PushPing: Indicates whether data storage executed successfully.

func (*HandlersEndpointsV1PushPing) MarshalJSON

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

type HandlersEndpointsV1RetrieveRequest

type HandlersEndpointsV1RetrieveRequest struct {
	Digest string `json:"digest,omitempty"`

	// Namespace: Encapsulates namespace, compression, and hash algorithm.
	Namespace *HandlersEndpointsV1Namespace `json:"namespace,omitempty"`

	Offset int64 `json:"offset,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Digest") 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. "Digest") 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:"-"`
}

HandlersEndpointsV1RetrieveRequest: Request to retrieve content from memcache, datastore, or GS.

func (*HandlersEndpointsV1RetrieveRequest) MarshalJSON

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

type HandlersEndpointsV1RetrievedContent

type HandlersEndpointsV1RetrievedContent struct {
	Content string `json:"content,omitempty"`

	Url string `json:"url,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"`
}

HandlersEndpointsV1RetrievedContent: Content retrieved from DB, or GS URL.

func (*HandlersEndpointsV1RetrievedContent) MarshalJSON

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

type HandlersEndpointsV1ServerDetails

type HandlersEndpointsV1ServerDetails struct {
	ServerVersion string `json:"server_version,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "ServerVersion") 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. "ServerVersion") 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:"-"`
}

HandlersEndpointsV1ServerDetails: Reports the current API version.

func (*HandlersEndpointsV1ServerDetails) MarshalJSON

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

type HandlersEndpointsV1StorageRequest

type HandlersEndpointsV1StorageRequest struct {
	Content string `json:"content,omitempty"`

	UploadTicket string `json:"upload_ticket,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"`
}

HandlersEndpointsV1StorageRequest: ProtoRPC message representing an entity to be added to the data store.

func (*HandlersEndpointsV1StorageRequest) MarshalJSON

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

type HandlersEndpointsV1UrlCollection

type HandlersEndpointsV1UrlCollection struct {
	// Items: Endpoints response type for a single URL or pair of URLs.
	Items []*HandlersEndpointsV1PreuploadStatus `json:"items,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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:"-"`
}

HandlersEndpointsV1UrlCollection: Endpoints response type analogous to existing JSON response.

func (*HandlersEndpointsV1UrlCollection) MarshalJSON

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

type PreuploadCall

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

func (*PreuploadCall) Context

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

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 (*PreuploadCall) Do

Do executes the "isolateservice.preupload" call. Exactly one of *HandlersEndpointsV1UrlCollection or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HandlersEndpointsV1UrlCollection.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 (*PreuploadCall) Fields

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

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

func (*PreuploadCall) Header

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

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

type RetrieveCall

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

func (*RetrieveCall) Context

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

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 (*RetrieveCall) Do

Do executes the "isolateservice.retrieve" call. Exactly one of *HandlersEndpointsV1RetrievedContent or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HandlersEndpointsV1RetrievedContent.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 (*RetrieveCall) Fields

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

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

func (*RetrieveCall) Header

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

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

type ServerDetailsCall

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

func (*ServerDetailsCall) 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 (*ServerDetailsCall) Do

Do executes the "isolateservice.server_details" call. Exactly one of *HandlersEndpointsV1ServerDetails or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HandlersEndpointsV1ServerDetails.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 (*ServerDetailsCall) Fields

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

func (*ServerDetailsCall) Header

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

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

func (*ServerDetailsCall) IfNoneMatch

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

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 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

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

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

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

func (*Service) FinalizeGsUpload

func (s *Service) FinalizeGsUpload(handlersendpointsv1finalizerequest *HandlersEndpointsV1FinalizeRequest) *FinalizeGsUploadCall

FinalizeGsUpload: Informs client that large entities have been uploaded to GCS.

func (*Service) Preupload

func (s *Service) Preupload(handlersendpointsv1digestcollection *HandlersEndpointsV1DigestCollection) *PreuploadCall

Preupload: Checks for entry's existence and generates upload URLs. Arguments: request: the DigestCollection to be posted Returns: the UrlCollection corresponding to the uploaded digests The response list is commensurate to the request's; each UrlMessage has * if an entry is missing: two URLs: the URL to upload a file to and the URL to call when the upload is done (can be null). * if the entry is already present: null URLs (”). UrlCollection([ UrlMessage( upload_url = "<upload url>" finalize_url = "<finalize url>" ) UrlMessage( upload_url = ”) ... ])

func (*Service) Retrieve

func (s *Service) Retrieve(handlersendpointsv1retrieverequest *HandlersEndpointsV1RetrieveRequest) *RetrieveCall

Retrieve: Retrieves content from a storage location.

func (*Service) ServerDetails

func (s *Service) ServerDetails() *ServerDetailsCall

ServerDetails:

func (*Service) StoreInline

func (s *Service) StoreInline(handlersendpointsv1storagerequest *HandlersEndpointsV1StorageRequest) *StoreInlineCall

StoreInline: Stores relatively small entities in the datastore.

type StoreInlineCall

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

func (*StoreInlineCall) 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 (*StoreInlineCall) Do

Do executes the "isolateservice.store_inline" call. Exactly one of *HandlersEndpointsV1PushPing or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HandlersEndpointsV1PushPing.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 (*StoreInlineCall) Fields

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

func (*StoreInlineCall) Header

func (c *StoreInlineCall) 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