recaptchaenterprise

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Overview

Copyright 2024 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package recaptchaenterprise defines operations in the declarative SDK.

Copyright 2024 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2024 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2024 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const KeyMaxPage = -1

Variables

View Source
var YAML_key = []byte("info:\n  title: RecaptchaEnterprise/Key\n  description: The RecaptchaEnterprise Key resource\n  x-dcl-struct-name: Key\n  x-dcl-has-iam: false\npaths:\n  get:\n    description: The function used to get information about a Key\n    parameters:\n    - name: key\n      required: true\n      description: A full instance of a Key\n  apply:\n    description: The function used to apply information about a Key\n    parameters:\n    - name: key\n      required: true\n      description: A full instance of a Key\n  delete:\n    description: The function used to delete a Key\n    parameters:\n    - name: key\n      required: true\n      description: A full instance of a Key\n  deleteAll:\n    description: The function used to delete all Key\n    parameters:\n    - name: project\n      required: true\n      schema:\n        type: string\n  list:\n    description: The function used to list information about many Key\n    parameters:\n    - name: project\n      required: true\n      schema:\n        type: string\ncomponents:\n  schemas:\n    Key:\n      title: Key\n      x-dcl-id: projects/{{project}}/keys/{{name}}\n      x-dcl-parent-container: project\n      x-dcl-labels: labels\n      x-dcl-has-create: true\n      x-dcl-has-iam: false\n      x-dcl-read-timeout: 0\n      x-dcl-apply-timeout: 0\n      x-dcl-delete-timeout: 0\n      type: object\n      required:\n      - displayName\n      - project\n      properties:\n        androidSettings:\n          type: object\n          x-dcl-go-name: AndroidSettings\n          x-dcl-go-type: KeyAndroidSettings\n          description: Settings for keys that can be used by Android apps.\n          x-dcl-conflicts:\n          - webSettings\n          - iosSettings\n          properties:\n            allowAllPackageNames:\n              type: boolean\n              x-dcl-go-name: AllowAllPackageNames\n              description: If set to true, it means allowed_package_names will not\n                be enforced.\n            allowedPackageNames:\n              type: array\n              x-dcl-go-name: AllowedPackageNames\n              description: 'Android package names of apps allowed to use the key.\n                Example: ''com.companyname.appname'''\n              x-dcl-send-empty: true\n              x-dcl-list-type: list\n              items:\n                type: string\n                x-dcl-go-type: string\n        createTime:\n          type: string\n          format: date-time\n          x-dcl-go-name: CreateTime\n          readOnly: true\n          description: The timestamp corresponding to the creation of this Key.\n          x-kubernetes-immutable: true\n        displayName:\n          type: string\n          x-dcl-go-name: DisplayName\n          description: Human-readable display name of this key. Modifiable by user.\n        iosSettings:\n          type: object\n          x-dcl-go-name: IosSettings\n          x-dcl-go-type: KeyIosSettings\n          description: Settings for keys that can be used by iOS apps.\n          x-dcl-conflicts:\n          - webSettings\n          - androidSettings\n          properties:\n            allowAllBundleIds:\n              type: boolean\n              x-dcl-go-name: AllowAllBundleIds\n              description: If set to true, it means allowed_bundle_ids will not be\n                enforced.\n            allowedBundleIds:\n              type: array\n              x-dcl-go-name: AllowedBundleIds\n              description: 'iOS bundle ids of apps allowed to use the key. Example:\n                ''com.companyname.productname.appname'''\n              x-dcl-send-empty: true\n              x-dcl-list-type: list\n              items:\n                type: string\n                x-dcl-go-type: string\n        labels:\n          type: object\n          additionalProperties:\n            type: string\n          x-dcl-go-name: Labels\n          description: See [Creating and managing labels](https://cloud.google.com/recaptcha-enterprise/docs/labels).\n        name:\n          type: string\n          x-dcl-go-name: Name\n          description: The resource id for the Key, which is the same as the Site\n            Key itself.\n          x-kubernetes-immutable: true\n          x-dcl-server-generated-parameter: true\n          x-dcl-has-long-form: true\n        project:\n          type: string\n          x-dcl-go-name: Project\n          description: The project for the resource\n          x-kubernetes-immutable: true\n          x-dcl-references:\n          - resource: Cloudresourcemanager/Project\n            field: name\n            parent: true\n          x-dcl-parameter: true\n        testingOptions:\n          type: object\n          x-dcl-go-name: TestingOptions\n          x-dcl-go-type: KeyTestingOptions\n          description: Options for user acceptance testing.\n          x-kubernetes-immutable: true\n          properties:\n            testingChallenge:\n              type: string\n              x-dcl-go-name: TestingChallenge\n              x-dcl-go-type: KeyTestingOptionsTestingChallengeEnum\n              description: 'For challenge-based keys only (CHECKBOX, INVISIBLE), all\n                challenge requests for this site will return nocaptcha if NOCAPTCHA,\n                or an unsolvable challenge if UNSOLVABLE_CHALLENGE. Possible values:\n                TESTING_CHALLENGE_UNSPECIFIED, NOCAPTCHA, UNSOLVABLE_CHALLENGE'\n              x-kubernetes-immutable: true\n              x-dcl-server-default: true\n              enum:\n              - TESTING_CHALLENGE_UNSPECIFIED\n              - NOCAPTCHA\n              - UNSOLVABLE_CHALLENGE\n            testingScore:\n              type: number\n              format: double\n              x-dcl-go-name: TestingScore\n              description: All assessments for this Key will return this score. Must\n                be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.\n              x-kubernetes-immutable: true\n        wafSettings:\n          type: object\n          x-dcl-go-name: WafSettings\n          x-dcl-go-type: KeyWafSettings\n          description: Settings specific to keys that can be used for WAF (Web Application\n            Firewall).\n          x-kubernetes-immutable: true\n          required:\n          - wafService\n          - wafFeature\n          properties:\n            wafFeature:\n              type: string\n              x-dcl-go-name: WafFeature\n              x-dcl-go-type: KeyWafSettingsWafFeatureEnum\n              description: 'Supported WAF features. For more information, see https://cloud.google.com/recaptcha-enterprise/docs/usecase#comparison_of_features.\n                Possible values: CHALLENGE_PAGE, SESSION_TOKEN, ACTION_TOKEN, EXPRESS'\n              x-kubernetes-immutable: true\n              enum:\n              - CHALLENGE_PAGE\n              - SESSION_TOKEN\n              - ACTION_TOKEN\n              - EXPRESS\n            wafService:\n              type: string\n              x-dcl-go-name: WafService\n              x-dcl-go-type: KeyWafSettingsWafServiceEnum\n              description: 'The WAF service that uses this key. Possible values: CA,\n                FASTLY'\n              x-kubernetes-immutable: true\n              enum:\n              - CA\n              - FASTLY\n        webSettings:\n          type: object\n          x-dcl-go-name: WebSettings\n          x-dcl-go-type: KeyWebSettings\n          description: Settings for keys that can be used by websites.\n          x-dcl-conflicts:\n          - androidSettings\n          - iosSettings\n          required:\n          - integrationType\n          properties:\n            allowAllDomains:\n              type: boolean\n              x-dcl-go-name: AllowAllDomains\n              description: If set to true, it means allowed_domains will not be enforced.\n            allowAmpTraffic:\n              type: boolean\n              x-dcl-go-name: AllowAmpTraffic\n              description: If set to true, the key can be used on AMP (Accelerated\n                Mobile Pages) websites. This is supported only for the SCORE integration\n                type.\n            allowedDomains:\n              type: array\n              x-dcl-go-name: AllowedDomains\n              description: 'Domains or subdomains of websites allowed to use the key.\n                All subdomains of an allowed domain are automatically allowed. A valid\n                domain requires a host and must not include any path, port, query\n                or fragment. Examples: ''example.com'' or ''subdomain.example.com'''\n              x-dcl-send-empty: true\n              x-dcl-list-type: list\n              items:\n                type: string\n                x-dcl-go-type: string\n            challengeSecurityPreference:\n              type: string\n              x-dcl-go-name: ChallengeSecurityPreference\n              x-dcl-go-type: KeyWebSettingsChallengeSecurityPreferenceEnum\n              description: 'Settings for the frequency and difficulty at which this\n                key triggers captcha challenges. This should only be specified for\n                IntegrationTypes CHECKBOX and INVISIBLE. Possible values: CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED,\n                USABILITY, BALANCE, SECURITY'\n              x-dcl-server-default: true\n              enum:\n              - CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED\n              - USABILITY\n              - BALANCE\n              - SECURITY\n            integrationType:\n              type: string\n              x-dcl-go-name: IntegrationType\n              x-dcl-go-type: KeyWebSettingsIntegrationTypeEnum\n              description: 'Required. Describes how this key is integrated with the\n                website. Possible values: SCORE, CHECKBOX, INVISIBLE'\n              x-kubernetes-immutable: true\n              enum:\n              - SCORE\n              - CHECKBOX\n              - INVISIBLE\n")

blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/recaptchaenterprise/key.yaml

Functions

func DCLKeySchema added in v1.10.3

func DCLKeySchema() *dcl.Schema

Types

type Client

type Client struct {
	Config *dcl.Config
}

The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.

func NewClient

func NewClient(c *dcl.Config) *Client

NewClient creates a client that retries all operations a few times each.

func (*Client) ApplyKey

func (c *Client) ApplyKey(ctx context.Context, rawDesired *Key, opts ...dcl.ApplyOption) (*Key, error)

func (*Client) DeleteAllKey

func (c *Client) DeleteAllKey(ctx context.Context, project string, filter func(*Key) bool) error

DeleteAllKey deletes all resources that the filter functions returns true on.

func (*Client) DeleteKey

func (c *Client) DeleteKey(ctx context.Context, r *Key) error

func (*Client) GetKey

func (c *Client) GetKey(ctx context.Context, r *Key) (*Key, error)

func (*Client) ListKey

func (c *Client) ListKey(ctx context.Context, project string) (*KeyList, error)

func (*Client) ListKeyWithMaxResults

func (c *Client) ListKeyWithMaxResults(ctx context.Context, project string, pageSize int32) (*KeyList, error)

type Key

type Key struct {
	Name            *string             `json:"name"`
	DisplayName     *string             `json:"displayName"`
	WebSettings     *KeyWebSettings     `json:"webSettings"`
	AndroidSettings *KeyAndroidSettings `json:"androidSettings"`
	IosSettings     *KeyIosSettings     `json:"iosSettings"`
	Labels          map[string]string   `json:"labels"`
	CreateTime      *string             `json:"createTime"`
	TestingOptions  *KeyTestingOptions  `json:"testingOptions"`
	WafSettings     *KeyWafSettings     `json:"wafSettings"`
	Project         *string             `json:"project"`
}

func (*Key) Describe

func (r *Key) Describe() dcl.ServiceTypeVersion

Describe returns a simple description of this resource to ensure that automated tools can identify it.

func (*Key) ID

func (r *Key) ID() (string, error)

func (*Key) String

func (r *Key) String() string

type KeyAndroidSettings

type KeyAndroidSettings struct {
	AllowAllPackageNames *bool    `json:"allowAllPackageNames"`
	AllowedPackageNames  []string `json:"allowedPackageNames"`
	// contains filtered or unexported fields
}
var EmptyKeyAndroidSettings *KeyAndroidSettings = &KeyAndroidSettings{empty: true}

This object is used to assert a desired state where this KeyAndroidSettings is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*KeyAndroidSettings) Empty

func (r *KeyAndroidSettings) Empty() bool

func (*KeyAndroidSettings) HashCode

func (r *KeyAndroidSettings) HashCode() string

func (*KeyAndroidSettings) String

func (r *KeyAndroidSettings) String() string

func (*KeyAndroidSettings) UnmarshalJSON

func (r *KeyAndroidSettings) UnmarshalJSON(data []byte) error

type KeyIosSettings

type KeyIosSettings struct {
	AllowAllBundleIds *bool    `json:"allowAllBundleIds"`
	AllowedBundleIds  []string `json:"allowedBundleIds"`
	// contains filtered or unexported fields
}
var EmptyKeyIosSettings *KeyIosSettings = &KeyIosSettings{empty: true}

This object is used to assert a desired state where this KeyIosSettings is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*KeyIosSettings) Empty

func (r *KeyIosSettings) Empty() bool

func (*KeyIosSettings) HashCode

func (r *KeyIosSettings) HashCode() string

func (*KeyIosSettings) String

func (r *KeyIosSettings) String() string

func (*KeyIosSettings) UnmarshalJSON

func (r *KeyIosSettings) UnmarshalJSON(data []byte) error

type KeyList

type KeyList struct {
	Items []*Key
	// contains filtered or unexported fields
}

func (*KeyList) HasNext

func (l *KeyList) HasNext() bool

func (*KeyList) Next

func (l *KeyList) Next(ctx context.Context, c *Client) error

type KeyTestingOptions

type KeyTestingOptions struct {
	TestingScore     *float64                               `json:"testingScore"`
	TestingChallenge *KeyTestingOptionsTestingChallengeEnum `json:"testingChallenge"`
	// contains filtered or unexported fields
}
var EmptyKeyTestingOptions *KeyTestingOptions = &KeyTestingOptions{empty: true}

This object is used to assert a desired state where this KeyTestingOptions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*KeyTestingOptions) Empty

func (r *KeyTestingOptions) Empty() bool

func (*KeyTestingOptions) HashCode

func (r *KeyTestingOptions) HashCode() string

func (*KeyTestingOptions) String

func (r *KeyTestingOptions) String() string

func (*KeyTestingOptions) UnmarshalJSON

func (r *KeyTestingOptions) UnmarshalJSON(data []byte) error

type KeyTestingOptionsTestingChallengeEnum

type KeyTestingOptionsTestingChallengeEnum string

The enum KeyTestingOptionsTestingChallengeEnum.

func KeyTestingOptionsTestingChallengeEnumRef

func KeyTestingOptionsTestingChallengeEnumRef(s string) *KeyTestingOptionsTestingChallengeEnum

KeyTestingOptionsTestingChallengeEnumRef returns a *KeyTestingOptionsTestingChallengeEnum with the value of string s If the empty string is provided, nil is returned.

func (KeyTestingOptionsTestingChallengeEnum) Validate

type KeyWafSettings added in v1.58.0

type KeyWafSettings struct {
	WafService *KeyWafSettingsWafServiceEnum `json:"wafService"`
	WafFeature *KeyWafSettingsWafFeatureEnum `json:"wafFeature"`
	// contains filtered or unexported fields
}
var EmptyKeyWafSettings *KeyWafSettings = &KeyWafSettings{empty: true}

This object is used to assert a desired state where this KeyWafSettings is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*KeyWafSettings) Empty added in v1.58.0

func (r *KeyWafSettings) Empty() bool

func (*KeyWafSettings) HashCode added in v1.58.0

func (r *KeyWafSettings) HashCode() string

func (*KeyWafSettings) String added in v1.58.0

func (r *KeyWafSettings) String() string

func (*KeyWafSettings) UnmarshalJSON added in v1.58.0

func (r *KeyWafSettings) UnmarshalJSON(data []byte) error

type KeyWafSettingsWafFeatureEnum added in v1.58.0

type KeyWafSettingsWafFeatureEnum string

The enum KeyWafSettingsWafFeatureEnum.

func KeyWafSettingsWafFeatureEnumRef added in v1.58.0

func KeyWafSettingsWafFeatureEnumRef(s string) *KeyWafSettingsWafFeatureEnum

KeyWafSettingsWafFeatureEnumRef returns a *KeyWafSettingsWafFeatureEnum with the value of string s If the empty string is provided, nil is returned.

func (KeyWafSettingsWafFeatureEnum) Validate added in v1.58.0

func (v KeyWafSettingsWafFeatureEnum) Validate() error

type KeyWafSettingsWafServiceEnum added in v1.58.0

type KeyWafSettingsWafServiceEnum string

The enum KeyWafSettingsWafServiceEnum.

func KeyWafSettingsWafServiceEnumRef added in v1.58.0

func KeyWafSettingsWafServiceEnumRef(s string) *KeyWafSettingsWafServiceEnum

KeyWafSettingsWafServiceEnumRef returns a *KeyWafSettingsWafServiceEnum with the value of string s If the empty string is provided, nil is returned.

func (KeyWafSettingsWafServiceEnum) Validate added in v1.58.0

func (v KeyWafSettingsWafServiceEnum) Validate() error

type KeyWebSettings

type KeyWebSettings struct {
	AllowAllDomains             *bool                                          `json:"allowAllDomains"`
	AllowedDomains              []string                                       `json:"allowedDomains"`
	AllowAmpTraffic             *bool                                          `json:"allowAmpTraffic"`
	IntegrationType             *KeyWebSettingsIntegrationTypeEnum             `json:"integrationType"`
	ChallengeSecurityPreference *KeyWebSettingsChallengeSecurityPreferenceEnum `json:"challengeSecurityPreference"`
	// contains filtered or unexported fields
}
var EmptyKeyWebSettings *KeyWebSettings = &KeyWebSettings{empty: true}

This object is used to assert a desired state where this KeyWebSettings is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*KeyWebSettings) Empty

func (r *KeyWebSettings) Empty() bool

func (*KeyWebSettings) HashCode

func (r *KeyWebSettings) HashCode() string

func (*KeyWebSettings) String

func (r *KeyWebSettings) String() string

func (*KeyWebSettings) UnmarshalJSON

func (r *KeyWebSettings) UnmarshalJSON(data []byte) error

type KeyWebSettingsChallengeSecurityPreferenceEnum

type KeyWebSettingsChallengeSecurityPreferenceEnum string

The enum KeyWebSettingsChallengeSecurityPreferenceEnum.

func KeyWebSettingsChallengeSecurityPreferenceEnumRef

func KeyWebSettingsChallengeSecurityPreferenceEnumRef(s string) *KeyWebSettingsChallengeSecurityPreferenceEnum

KeyWebSettingsChallengeSecurityPreferenceEnumRef returns a *KeyWebSettingsChallengeSecurityPreferenceEnum with the value of string s If the empty string is provided, nil is returned.

func (KeyWebSettingsChallengeSecurityPreferenceEnum) Validate

type KeyWebSettingsIntegrationTypeEnum

type KeyWebSettingsIntegrationTypeEnum string

The enum KeyWebSettingsIntegrationTypeEnum.

func KeyWebSettingsIntegrationTypeEnumRef

func KeyWebSettingsIntegrationTypeEnumRef(s string) *KeyWebSettingsIntegrationTypeEnum

KeyWebSettingsIntegrationTypeEnumRef returns a *KeyWebSettingsIntegrationTypeEnum with the value of string s If the empty string is provided, nil is returned.

func (KeyWebSettingsIntegrationTypeEnum) Validate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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