apikeys

package
v0.0.0-...-9b87225 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package apikeys provides access to the Google API Keys API.

Usage example:

import "github.com/skelterjohn/gcloud_apis/clients/apikeys/v1"
...
apikeysService, err := apikeys.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

	// Manage your Google API service configuration
	ServiceManagementScope = "https://www.googleapis.com/auth/service.management"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndroidApplication

type AndroidApplication struct {
	// PackageName: The package name of the application.
	PackageName string `json:"packageName,omitempty"`

	// Sha1Fingerprint: The 20 byte SHA1 fingerprint of the application.
	Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`

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

AndroidApplication: Identifier of an Android application for API key use.

func (*AndroidApplication) MarshalJSON

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

type AndroidKeyDetails

type AndroidKeyDetails struct {
	// AllowedApplications: A list of Android applications that are allowed
	// to make API calls with
	// this key.
	AllowedApplications []*AndroidApplication `json:"allowedApplications,omitempty"`

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

AndroidKeyDetails: Key details that are specific to android keys.

func (*AndroidKeyDetails) MarshalJSON

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

type ApiKey

type ApiKey struct {
	// AndroidKeyDetails: Key details that are specific to android keys.
	AndroidKeyDetails *AndroidKeyDetails `json:"androidKeyDetails,omitempty"`

	// ApiTargetKeyDetails: API Target key details. These restrict which API
	// a key can be used on.
	ApiTargetKeyDetails *ApiTargetKeyDetails `json:"apiTargetKeyDetails,omitempty"`

	// BrowserKeyDetails: Key details that are specific to browser keys.
	BrowserKeyDetails *BrowserKeyDetails `json:"browserKeyDetails,omitempty"`

	// CreateTime: A timestamp identifying the time this API key was
	// originally created.
	// @OutputOnly
	CreateTime string `json:"createTime,omitempty"`

	// CreatedBy: Email address of the user who originally created this API
	// key.
	// @OutputOnly
	CreatedBy string `json:"createdBy,omitempty"`

	// CurrentKey: An encrypted and signed value held by this API
	// key.
	// @OutputOnly
	CurrentKey string `json:"currentKey,omitempty"`

	// DisplayName: Human-readable display name of this API key.
	// Modifiable by user.
	DisplayName string `json:"displayName,omitempty"`

	// IosKeyDetails: Key details that are specific to iOS keys.
	IosKeyDetails *IosKeyDetails `json:"iosKeyDetails,omitempty"`

	// KeyId: Unique identifier for this ApiKey assigned by the
	// server.
	// @OutputOnly
	KeyId string `json:"keyId,omitempty"`

	// PreviousKey: The value of `current_key` before this API key was
	// regenerated.
	// @OutputOnly
	PreviousKey string `json:"previousKey,omitempty"`

	// PreviousKeyExpireTime: The expiration time for the validity of a
	// `previous_key` value after an
	// API key regeneration.
	// @OutputOnly
	PreviousKeyExpireTime string `json:"previousKeyExpireTime,omitempty"`

	// ServerKeyDetails: Key details that are specific to server keys.
	ServerKeyDetails *ServerKeyDetails `json:"serverKeyDetails,omitempty"`

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

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

ApiKey: The representation of an API key managed by the `ApiKeys` API. An API key is used for programmatic access to a project by a service account.

func (*ApiKey) MarshalJSON

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

type ApiTarget

type ApiTarget struct {
	// Methods: An optional list of one or more methods that can be
	// called.
	// If empty, all methods for the service are allowed. A wildcard
	// (*) can be used as the last
	// symbol.
	// Examples:
	// google.api.apikeys.v1.ApiKeys.ListApiKeys
	// google.api
	// .apikeys.v1.ApiKeys.Get*
	// google.api.apikeys.v1.ApiKeys.Delete*
	Methods []string `json:"methods,omitempty"`

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

ApiTarget: A restriction for a specific service and optionally one or multiple specific methods. Both fields are not case sensitive.

func (*ApiTarget) MarshalJSON

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

type ApiTargetKeyDetails

type ApiTargetKeyDetails struct {
	// ApiTargets: A restriction for a specific service and optionally one
	// or
	// multiple specific methods. Requests will be allowed if they
	// match any of these restrictions. If no restrictions are
	// specified, all targets are allowed.
	// Key is the service name for this restriction
	// Example: apikeys.googleapis.com
	ApiTargets map[string]ApiTarget `json:"apiTargets,omitempty"`

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

ApiTargetKeyDetails: Key details that specify which APIs a key is allowed to be used on.

func (*ApiTargetKeyDetails) MarshalJSON

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

type BrowserKeyDetails

type BrowserKeyDetails struct {
	// AllowedReferrers: A list of regular expressions for the referrer URLs
	// that are allowed when
	// making an API call with this key.
	AllowedReferrers []string `json:"allowedReferrers,omitempty"`

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

BrowserKeyDetails: Key details that are specific to browser keys.

func (*BrowserKeyDetails) MarshalJSON

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

type DeletedApiKey

type DeletedApiKey struct {
	// ApiKey: The API key that was deleted
	// @OutputOnly
	ApiKey *ApiKey `json:"apiKey,omitempty"`

	// DeletionTime: The time at which the key was deleted
	// @OutputOnly
	DeletionTime string `json:"deletionTime,omitempty"`

	// Source: What caused the key to be deleted
	// @OutputOnly
	//
	// Possible values:
	//   "DELETION" - This API Key was deleted via a DeleteApiKey API call.
	//   "REGENERATION" - This API Key was deleted by a RegenerateApiKey API
	// call.
	Source string `json:"source,omitempty"`

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

DeletedApiKey: Information about a deleted API key.

func (*DeletedApiKey) MarshalJSON

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

type Empty

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

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo {
  rpc Bar(google.protobuf.Empty) returns

(google.protobuf.Empty);

}

The JSON representation for `Empty` is empty JSON object `{}`.

type GetProjectForApiKeyResponse

type GetProjectForApiKeyResponse struct {
	// ProjectNumber: The project number corresponding to the project key in
	// the requests.
	// The project number that owns the API key specified in the request.
	ProjectNumber int64 `json:"projectNumber,omitempty,string"`

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

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

GetProjectForApiKeyResponse: Response message for `GetProjectForApiKey` method.

func (*GetProjectForApiKeyResponse) MarshalJSON

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

type IosKeyDetails

type IosKeyDetails struct {
	// AllowedBundleIds: A list of bundle IDs that are allowed when making
	// API calls with this key.
	AllowedBundleIds []string `json:"allowedBundleIds,omitempty"`

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

IosKeyDetails: Key details that are specific to iOS keys.

func (*IosKeyDetails) MarshalJSON

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

type ListApiKeysResponse

type ListApiKeysResponse struct {
	// Keys: A list of API keys.
	Keys []*ApiKey `json:"keys,omitempty"`

	// NextPageToken: The pagination token for the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

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

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

ListApiKeysResponse: Response message for `ListApiKeys` method.

func (*ListApiKeysResponse) MarshalJSON

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

type ListDeletedApiKeysResponse

type ListDeletedApiKeysResponse struct {
	// Keys: A list of deleted API keys.
	Keys []*DeletedApiKey `json:"keys,omitempty"`

	// NextPageToken: The pagination token for the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

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

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

ListDeletedApiKeysResponse: Response message for `ListDeletedApiKeys` method.

func (*ListDeletedApiKeysResponse) MarshalJSON

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

type ProjectsApiKeysBatchDeleteCall

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

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

Do executes the "apikeys.projects.apiKeys.batchDelete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsApiKeysBatchDeleteCall) Fields

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

func (*ProjectsApiKeysBatchDeleteCall) KeyIds

KeyIds sets the optional parameter "keyIds": The identifiers for the keys to be deleted.

type ProjectsApiKeysCreateCall

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

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

Do executes the "apikeys.projects.apiKeys.create" call. Exactly one of *ApiKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiKey.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 (*ProjectsApiKeysCreateCall) Fields

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

type ProjectsApiKeysDeleteCall

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

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

Do executes the "apikeys.projects.apiKeys.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsApiKeysDeleteCall) Fields

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

type ProjectsApiKeysGetCall

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

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

Do executes the "apikeys.projects.apiKeys.get" call. Exactly one of *ApiKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiKey.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 (*ProjectsApiKeysGetCall) Fields

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

func (*ProjectsApiKeysGetCall) IfNoneMatch

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

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 ProjectsApiKeysListCall

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

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

Do executes the "apikeys.projects.apiKeys.list" call. Exactly one of *ListApiKeysResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListApiKeysResponse.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 (*ProjectsApiKeysListCall) Fields

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

func (*ProjectsApiKeysListCall) IfNoneMatch

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

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 (*ProjectsApiKeysListCall) PageSize

func (c *ProjectsApiKeysListCall) PageSize(pageSize int64) *ProjectsApiKeysListCall

PageSize sets the optional parameter "pageSize": Specifies the maximum number of results to be returned at a time.

func (*ProjectsApiKeysListCall) PageToken

func (c *ProjectsApiKeysListCall) PageToken(pageToken string) *ProjectsApiKeysListCall

PageToken sets the optional parameter "pageToken": Requests a specific page of results.

func (*ProjectsApiKeysListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type ProjectsApiKeysPatchCall

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

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

Do executes the "apikeys.projects.apiKeys.patch" call. Exactly one of *ApiKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiKey.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 (*ProjectsApiKeysPatchCall) Fields

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

func (*ProjectsApiKeysPatchCall) UpdateMask

func (c *ProjectsApiKeysPatchCall) UpdateMask(updateMask string) *ProjectsApiKeysPatchCall

UpdateMask sets the optional parameter "updateMask": Field mask for updates.

type ProjectsApiKeysRegenerateCall

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

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

Do executes the "apikeys.projects.apiKeys.regenerate" call. Exactly one of *ApiKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiKey.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 (*ProjectsApiKeysRegenerateCall) Fields

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

type ProjectsApiKeysRevertCall

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

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

Do executes the "apikeys.projects.apiKeys.revert" call. Exactly one of *ApiKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApiKey.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 (*ProjectsApiKeysRevertCall) Fields

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

type ProjectsApiKeysService

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

func NewProjectsApiKeysService

func NewProjectsApiKeysService(s *Service) *ProjectsApiKeysService

func (*ProjectsApiKeysService) BatchDelete

BatchDelete: Bulk delete a list of API keys.

func (*ProjectsApiKeysService) Create

func (r *ProjectsApiKeysService) Create(projectId string, apikey *ApiKey) *ProjectsApiKeysCreateCall

Create: Creates a new API key.

func (*ProjectsApiKeysService) Delete

func (r *ProjectsApiKeysService) Delete(projectId string, keyId string) *ProjectsApiKeysDeleteCall

Delete: Deletes an API key.

func (*ProjectsApiKeysService) Get

func (r *ProjectsApiKeysService) Get(projectId string, keyId string) *ProjectsApiKeysGetCall

Get: Gets the metadata for an API key.

func (*ProjectsApiKeysService) List

List: Lists the API keys owned by a project.

func (*ProjectsApiKeysService) Patch

func (r *ProjectsApiKeysService) Patch(projectId string, keyId string, apikey *ApiKey) *ProjectsApiKeysPatchCall

Patch: Patches the modifiable fields of an API key.

func (*ProjectsApiKeysService) Regenerate

func (r *ProjectsApiKeysService) Regenerate(projectId string, keyId string) *ProjectsApiKeysRegenerateCall

Regenerate: Regenerates the key string for the specified API key. This writes a new key string to `current_key` and writes the previous key string to `previous_key`. Returns the updated key entry.

func (*ProjectsApiKeysService) Revert

func (r *ProjectsApiKeysService) Revert(projectId string, keyId string) *ProjectsApiKeysRevertCall

Revert: Reverts a previous key regeneration. This swaps the contents of `current_key` and `previous_key`. Returns the updated key entry.

type ProjectsDeletedApiKeysListCall

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

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

Do executes the "apikeys.projects.deletedApiKeys.list" call. Exactly one of *ListDeletedApiKeysResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListDeletedApiKeysResponse.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 (*ProjectsDeletedApiKeysListCall) Fields

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

func (*ProjectsDeletedApiKeysListCall) 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 (*ProjectsDeletedApiKeysListCall) PageSize

PageSize sets the optional parameter "pageSize": Specifies the maximum number of results to be returned at a time.

func (*ProjectsDeletedApiKeysListCall) PageToken

PageToken sets the optional parameter "pageToken": Requests a specific page of results.

func (*ProjectsDeletedApiKeysListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type ProjectsDeletedApiKeysService

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

func NewProjectsDeletedApiKeysService

func NewProjectsDeletedApiKeysService(s *Service) *ProjectsDeletedApiKeysService

func (*ProjectsDeletedApiKeysService) List

List: Lists the deleted API keys owned by a project.

type ProjectsGetProjectForApiKeyCall

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

func (*ProjectsGetProjectForApiKeyCall) ApiKey

ApiKey sets the optional parameter "apiKey": Finds the project that owns the key with this `current_key` value.

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

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

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

func (*ProjectsGetProjectForApiKeyCall) 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 ProjectsService

type ProjectsService struct {
	ApiKeys *ProjectsApiKeysService

	DeletedApiKeys *ProjectsDeletedApiKeysService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

func (*ProjectsService) GetProjectForApiKey

func (r *ProjectsService) GetProjectForApiKey() *ProjectsGetProjectForApiKeyCall

GetProjectForApiKey: Get the project info about an API key.

type ServerKeyDetails

type ServerKeyDetails struct {
	// AllowedIps: A list of the caller IP addresses that are allowed when
	// making an API call
	// with this key.
	AllowedIps []string `json:"allowedIps,omitempty"`

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

ServerKeyDetails: Key details that are specific to server keys.

func (*ServerKeyDetails) MarshalJSON

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

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New

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

Jump to

Keyboard shortcuts

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