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
- type AndroidApplication
- type AndroidKeyDetails
- type ApiKey
- type ApiTarget
- type ApiTargetKeyDetails
- type BrowserKeyDetails
- type DeletedApiKey
- type Empty
- type GetProjectForApiKeyResponse
- type IosKeyDetails
- type ListApiKeysResponse
- type ListDeletedApiKeysResponse
- type ProjectsApiKeysBatchDeleteCall
- func (c *ProjectsApiKeysBatchDeleteCall) Context(ctx context.Context) *ProjectsApiKeysBatchDeleteCall
- func (c *ProjectsApiKeysBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsApiKeysBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsApiKeysBatchDeleteCall
- func (c *ProjectsApiKeysBatchDeleteCall) KeyIds(keyIds ...string) *ProjectsApiKeysBatchDeleteCall
- type ProjectsApiKeysCreateCall
- type ProjectsApiKeysDeleteCall
- type ProjectsApiKeysGetCall
- func (c *ProjectsApiKeysGetCall) Context(ctx context.Context) *ProjectsApiKeysGetCall
- func (c *ProjectsApiKeysGetCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
- func (c *ProjectsApiKeysGetCall) Fields(s ...googleapi.Field) *ProjectsApiKeysGetCall
- func (c *ProjectsApiKeysGetCall) IfNoneMatch(entityTag string) *ProjectsApiKeysGetCall
- type ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) Context(ctx context.Context) *ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) Do(opts ...googleapi.CallOption) (*ListApiKeysResponse, error)
- func (c *ProjectsApiKeysListCall) Fields(s ...googleapi.Field) *ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) IfNoneMatch(entityTag string) *ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) PageSize(pageSize int64) *ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) PageToken(pageToken string) *ProjectsApiKeysListCall
- func (c *ProjectsApiKeysListCall) Pages(ctx context.Context, f func(*ListApiKeysResponse) error) error
- type ProjectsApiKeysPatchCall
- func (c *ProjectsApiKeysPatchCall) Context(ctx context.Context) *ProjectsApiKeysPatchCall
- func (c *ProjectsApiKeysPatchCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
- func (c *ProjectsApiKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsApiKeysPatchCall
- func (c *ProjectsApiKeysPatchCall) UpdateMask(updateMask string) *ProjectsApiKeysPatchCall
- type ProjectsApiKeysRegenerateCall
- type ProjectsApiKeysRevertCall
- type ProjectsApiKeysService
- func (r *ProjectsApiKeysService) BatchDelete(projectId string) *ProjectsApiKeysBatchDeleteCall
- func (r *ProjectsApiKeysService) Create(projectId string, apikey *ApiKey) *ProjectsApiKeysCreateCall
- func (r *ProjectsApiKeysService) Delete(projectId string, keyId string) *ProjectsApiKeysDeleteCall
- func (r *ProjectsApiKeysService) Get(projectId string, keyId string) *ProjectsApiKeysGetCall
- func (r *ProjectsApiKeysService) List(projectId string) *ProjectsApiKeysListCall
- func (r *ProjectsApiKeysService) Patch(projectId string, keyId string, apikey *ApiKey) *ProjectsApiKeysPatchCall
- func (r *ProjectsApiKeysService) Regenerate(projectId string, keyId string) *ProjectsApiKeysRegenerateCall
- func (r *ProjectsApiKeysService) Revert(projectId string, keyId string) *ProjectsApiKeysRevertCall
- type ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) Context(ctx context.Context) *ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) Do(opts ...googleapi.CallOption) (*ListDeletedApiKeysResponse, error)
- func (c *ProjectsDeletedApiKeysListCall) Fields(s ...googleapi.Field) *ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) IfNoneMatch(entityTag string) *ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) PageSize(pageSize int64) *ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) PageToken(pageToken string) *ProjectsDeletedApiKeysListCall
- func (c *ProjectsDeletedApiKeysListCall) Pages(ctx context.Context, f func(*ListDeletedApiKeysResponse) error) error
- type ProjectsDeletedApiKeysService
- type ProjectsGetProjectForApiKeyCall
- func (c *ProjectsGetProjectForApiKeyCall) ApiKey(apiKey string) *ProjectsGetProjectForApiKeyCall
- func (c *ProjectsGetProjectForApiKeyCall) Context(ctx context.Context) *ProjectsGetProjectForApiKeyCall
- func (c *ProjectsGetProjectForApiKeyCall) Do(opts ...googleapi.CallOption) (*GetProjectForApiKeyResponse, error)
- func (c *ProjectsGetProjectForApiKeyCall) Fields(s ...googleapi.Field) *ProjectsGetProjectForApiKeyCall
- func (c *ProjectsGetProjectForApiKeyCall) IfNoneMatch(entityTag string) *ProjectsGetProjectForApiKeyCall
- type ProjectsService
- type ServerKeyDetails
- type Service
Constants ¶
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 ¶
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 ¶
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 ¶
func (c *ProjectsApiKeysBatchDeleteCall) Context(ctx context.Context) *ProjectsApiKeysBatchDeleteCall
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 ¶
func (c *ProjectsApiKeysBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
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 ¶
func (c *ProjectsApiKeysBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsApiKeysBatchDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsApiKeysBatchDeleteCall) KeyIds ¶
func (c *ProjectsApiKeysBatchDeleteCall) KeyIds(keyIds ...string) *ProjectsApiKeysBatchDeleteCall
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 ¶
func (c *ProjectsApiKeysCreateCall) Context(ctx context.Context) *ProjectsApiKeysCreateCall
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 ¶
func (c *ProjectsApiKeysCreateCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
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 ¶
func (c *ProjectsApiKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsApiKeysCreateCall
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 ¶
func (c *ProjectsApiKeysDeleteCall) Context(ctx context.Context) *ProjectsApiKeysDeleteCall
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 ¶
func (c *ProjectsApiKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
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 ¶
func (c *ProjectsApiKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsApiKeysDeleteCall
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 ¶
func (c *ProjectsApiKeysGetCall) Context(ctx context.Context) *ProjectsApiKeysGetCall
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 ¶
func (c *ProjectsApiKeysGetCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
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 ¶
func (c *ProjectsApiKeysGetCall) Fields(s ...googleapi.Field) *ProjectsApiKeysGetCall
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 ¶
func (c *ProjectsApiKeysListCall) Context(ctx context.Context) *ProjectsApiKeysListCall
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 ¶
func (c *ProjectsApiKeysListCall) Do(opts ...googleapi.CallOption) (*ListApiKeysResponse, error)
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 ¶
func (c *ProjectsApiKeysListCall) Fields(s ...googleapi.Field) *ProjectsApiKeysListCall
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 ¶
func (c *ProjectsApiKeysListCall) Pages(ctx context.Context, f func(*ListApiKeysResponse) error) error
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 ¶
func (c *ProjectsApiKeysPatchCall) Context(ctx context.Context) *ProjectsApiKeysPatchCall
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 ¶
func (c *ProjectsApiKeysPatchCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
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 ¶
func (c *ProjectsApiKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsApiKeysPatchCall
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 ¶
func (c *ProjectsApiKeysRegenerateCall) Context(ctx context.Context) *ProjectsApiKeysRegenerateCall
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 ¶
func (c *ProjectsApiKeysRegenerateCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
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 ¶
func (c *ProjectsApiKeysRegenerateCall) Fields(s ...googleapi.Field) *ProjectsApiKeysRegenerateCall
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 ¶
func (c *ProjectsApiKeysRevertCall) Context(ctx context.Context) *ProjectsApiKeysRevertCall
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 ¶
func (c *ProjectsApiKeysRevertCall) Do(opts ...googleapi.CallOption) (*ApiKey, error)
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 ¶
func (c *ProjectsApiKeysRevertCall) Fields(s ...googleapi.Field) *ProjectsApiKeysRevertCall
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 ¶
func (r *ProjectsApiKeysService) BatchDelete(projectId string) *ProjectsApiKeysBatchDeleteCall
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 ¶
func (r *ProjectsApiKeysService) List(projectId string) *ProjectsApiKeysListCall
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 ¶
func (c *ProjectsDeletedApiKeysListCall) Context(ctx context.Context) *ProjectsDeletedApiKeysListCall
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 ¶
func (c *ProjectsDeletedApiKeysListCall) Do(opts ...googleapi.CallOption) (*ListDeletedApiKeysResponse, error)
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 ¶
func (c *ProjectsDeletedApiKeysListCall) Fields(s ...googleapi.Field) *ProjectsDeletedApiKeysListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDeletedApiKeysListCall) IfNoneMatch ¶
func (c *ProjectsDeletedApiKeysListCall) IfNoneMatch(entityTag string) *ProjectsDeletedApiKeysListCall
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 ¶
func (c *ProjectsDeletedApiKeysListCall) PageSize(pageSize int64) *ProjectsDeletedApiKeysListCall
PageSize sets the optional parameter "pageSize": Specifies the maximum number of results to be returned at a time.
func (*ProjectsDeletedApiKeysListCall) PageToken ¶
func (c *ProjectsDeletedApiKeysListCall) PageToken(pageToken string) *ProjectsDeletedApiKeysListCall
PageToken sets the optional parameter "pageToken": Requests a specific page of results.
func (*ProjectsDeletedApiKeysListCall) Pages ¶
func (c *ProjectsDeletedApiKeysListCall) Pages(ctx context.Context, f func(*ListDeletedApiKeysResponse) error) error
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 ¶
func (r *ProjectsDeletedApiKeysService) List(projectId string) *ProjectsDeletedApiKeysListCall
List: Lists the deleted API keys owned by a project.
type ProjectsGetProjectForApiKeyCall ¶
type ProjectsGetProjectForApiKeyCall struct {
// contains filtered or unexported fields
}
func (*ProjectsGetProjectForApiKeyCall) ApiKey ¶
func (c *ProjectsGetProjectForApiKeyCall) ApiKey(apiKey string) *ProjectsGetProjectForApiKeyCall
ApiKey sets the optional parameter "apiKey": Finds the project that owns the key with this `current_key` value.
func (*ProjectsGetProjectForApiKeyCall) Context ¶
func (c *ProjectsGetProjectForApiKeyCall) Context(ctx context.Context) *ProjectsGetProjectForApiKeyCall
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 ¶
func (c *ProjectsGetProjectForApiKeyCall) Do(opts ...googleapi.CallOption) (*GetProjectForApiKeyResponse, error)
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 ¶
func (c *ProjectsGetProjectForApiKeyCall) Fields(s ...googleapi.Field) *ProjectsGetProjectForApiKeyCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsGetProjectForApiKeyCall) IfNoneMatch ¶
func (c *ProjectsGetProjectForApiKeyCall) IfNoneMatch(entityTag string) *ProjectsGetProjectForApiKeyCall
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)