operations

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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 operations contains all of the Operations used by the DCL.

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.

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRMOperation

type CRMOperation struct {
	Name     string                 `json:"name"`
	Error    *CRMOperationError     `json:"error"`
	Done     bool                   `json:"done"`
	Response map[string]interface{} `json:"response"`
	Metadata map[string]interface{} `json:"metadata"`
	// contains filtered or unexported fields
}

CRMOperation can be parsed from the returned API operation and waited on. This is the typical GCP operation.

func (*CRMOperation) FirstResponse

func (op *CRMOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*CRMOperation) Wait

func (op *CRMOperation) Wait(ctx context.Context, c *dcl.Config, basePath, verb string) error

Wait waits for an CRMOperation to complete by fetching the operation until it completes.

type CRMOperationError

type CRMOperationError struct {
	Code    int                       `json:"code"`
	Message string                    `json:"message"`
	Errors  []*CRMOperationErrorError `json:"errors"`
}

CRMOperationError is the GCP operation's Error body.

func (*CRMOperationError) String

func (e *CRMOperationError) String() string

String formats the CRMOperationError as an error string.

type CRMOperationErrorError

type CRMOperationErrorError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

CRMOperationErrorError is a singular error in a GCP operation.

type ComputeGlobalOrganizationOperation

type ComputeGlobalOrganizationOperation struct {
	BaseOperation ComputeOperation
	Parent        string
}

ComputeGlobalOrganizationOperation can be parsed from the returned API operation and waited on. Based on https://cloud.google.com/compute/docs/reference/rest/v1/globalOrganizationOperations

func (*ComputeGlobalOrganizationOperation) Wait

type ComputeOperation

type ComputeOperation struct {
	ID         string                 `json:"id"`
	Error      *ComputeOperationError `json:"error"`
	SelfLink   string                 `json:"selfLink"`
	Status     string                 `json:"status"`
	TargetLink string                 `json:"targetLink"`
	TargetID   string                 `json:"targetId"`
	// contains filtered or unexported fields
}

ComputeOperation can be parsed from the returned API operation and waited on. Based on https://cloud.google.com/compute/docs/reference/rest/v1/regionOperations

func (*ComputeOperation) FirstResponse

func (op *ComputeOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*ComputeOperation) Wait

func (op *ComputeOperation) Wait(ctx context.Context, c *dcl.Config, _, _ string) error

Wait waits for an ComputeOperation to complete by fetching the operation until it completes.

type ComputeOperationError

type ComputeOperationError struct {
	Code    int                           `json:"code"`
	Message string                        `json:"message"`
	Errors  []*ComputeOperationErrorError `json:"errors"`
}

ComputeOperationError is the GCE operation's Error body.

func (*ComputeOperationError) String

func (e *ComputeOperationError) String() string

String formats the OperationError as an error string.

type ComputeOperationErrorError

type ComputeOperationErrorError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

ComputeOperationErrorError is a singular error in a GCE operation.

type DNSOperation

type DNSOperation struct {
	Status      string `json:"status"`
	ID          string `json:"id"`
	Project     string
	ManagedZone string
	// contains filtered or unexported fields
}

DNSOperation can be parsed from the returned API operation and waited on. This is used for Changes only. Project and ManagedZone must be set ahead of time.

func (*DNSOperation) FirstResponse

func (op *DNSOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*DNSOperation) Wait

func (op *DNSOperation) Wait(ctx context.Context, c *dcl.Config, project, managedZone string) error

Wait waits for an DNSOperation to complete by fetching the operation until it completes.

type DatastoreOperation

type DatastoreOperation struct {
	Name     string                      `json:"name"`
	Done     bool                        `json:"done"`
	Metadata *DatastoreOperationMetadata `json:"metadata"`
	Error    *DatastoreOperationError    `json:"error"`
	// contains filtered or unexported fields
}

DatastoreOperation can be parsed from the returned API operation and waited on.

func (*DatastoreOperation) FirstResponse

func (op *DatastoreOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*DatastoreOperation) Wait

func (op *DatastoreOperation) Wait(ctx context.Context, c *dcl.Config, _, _ string) error

Wait waits for an DatastoreOperation to complete by fetching the operation until it completes.

type DatastoreOperationError

type DatastoreOperationError struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

DatastoreOperationError is an error in a datastore operation.

type DatastoreOperationMetadata

type DatastoreOperationMetadata struct {
	IndexID string `json:"indexId"`
}

DatastoreOperationMetadata is an error in a datastore operation.

type KNativeOperation

type KNativeOperation struct {
	Status   KNativeOperationStatus   `json:"status"`
	Metadata KNativeOperationMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

KNativeOperation can be parsed from the returned Service.

func (*KNativeOperation) FirstResponse

func (op *KNativeOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*KNativeOperation) Wait

func (op *KNativeOperation) Wait(ctx context.Context, c *dcl.Config, basePath, verb string) error

Wait waits for an DNSOperation to complete by fetching the operation until it completes.

type KNativeOperationCondition

type KNativeOperationCondition struct {
	Type   string `json:"type"`
	Status string `json:"status"`
}

KNativeOperationCondition contains the

type KNativeOperationMetadata

type KNativeOperationMetadata struct {
	SelfLink string            `json:"selfLink"`
	Labels   map[string]string `json:"labels"`
}

KNativeOperationMetadata contains the Labels block.

type KNativeOperationStatus

type KNativeOperationStatus struct {
	Conditions []KNativeOperationCondition `json:"conditions"`
}

KNativeOperationStatus contains the Conditions block.

type MonitoringOperation

type MonitoringOperation struct {
	Name string `json:"name"`
}

MonitoringOperation can be parsed from the returned API operation and waited on.

func (*MonitoringOperation) FetchName

func (op *MonitoringOperation) FetchName() (*string, error)

FetchName will fetch the operation and return the name of the resource created. Monitoring creates resources with machine generated names. It must be called after the resource has been created.

func (*MonitoringOperation) Wait

func (op *MonitoringOperation) Wait(ctx context.Context, c *dcl.Config, _, _ string) error

Wait waits for an MonitoringOperation to complete by fetching the operation until it completes.

type OSPolicyAssignmentDeleteOperation

type OSPolicyAssignmentDeleteOperation struct {
	Name string `json:"name"`
	// contains filtered or unexported fields
}

OSPolicyAssignmentDeleteOperation can be parsed from the returned API operation and waited on.

func (*OSPolicyAssignmentDeleteOperation) Wait

Wait waits for an OSPolicyAssignmentDeleteOperation to complete by waiting until the operation returns a 404.

type SQLCreateCertOperation

type SQLCreateCertOperation struct {
	Operation  SQLOperation `json:"operation"`
	ClientCert struct {
		CertInfo map[string]interface{} `json:"certInfo"`
	} `json:"clientCert"`
	// contains filtered or unexported fields
}

SQLCreateCertOperation is the operation used for creating SSL certs. They have a different format from other resources and other methods.

func (*SQLCreateCertOperation) FirstResponse

func (op *SQLCreateCertOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*SQLCreateCertOperation) Wait

func (op *SQLCreateCertOperation) Wait(ctx context.Context, c *dcl.Config, _, _ string) error

Wait waits for an SQLOperation to complete by fetching the operation until it completes.

type SQLOperation

type SQLOperation struct {
	ID         string `json:"id"`
	SelfLink   string `json:"selfLink"`
	Status     string `json:"status"`
	TargetLink string `json:"targetLink"`
	// contains filtered or unexported fields
}

SQLOperation can be parsed from the returned API operation and waited on.

func (*SQLOperation) FirstResponse

func (op *SQLOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*SQLOperation) Wait

func (op *SQLOperation) Wait(ctx context.Context, c *dcl.Config, _, _ string) error

Wait waits for an Operation to complete by fetching the operation until it completes.

type StandardGCPOperation

type StandardGCPOperation struct {
	Name     string                     `json:"name"`
	Error    *StandardGCPOperationError `json:"error"`
	Done     bool                       `json:"done"`
	Response map[string]interface{}     `json:"response"`
	// contains filtered or unexported fields
}

StandardGCPOperation can be parsed from the returned API operation and waited on. This is the typical GCP operation.

func (*StandardGCPOperation) FirstResponse

func (op *StandardGCPOperation) FirstResponse() (map[string]interface{}, bool)

FirstResponse returns the first response that this operation receives with the resource. This response may contain special information.

func (*StandardGCPOperation) Wait

func (op *StandardGCPOperation) Wait(ctx context.Context, c *dcl.Config, basePath, verb string) error

Wait waits for an StandardGCPOperation to complete by fetching the operation until it completes.

type StandardGCPOperationError

type StandardGCPOperationError struct {
	Errors []*StandardGCPOperationErrorError `json:"errors"`

	StandardGCPOperationErrorError
}

StandardGCPOperationError is the GCP operation's Error body.

func (*StandardGCPOperationError) String

func (e *StandardGCPOperationError) String() string

String formats the StandardGCPOperationError as an error string.

type StandardGCPOperationErrorError

type StandardGCPOperationErrorError struct {
	Code    json.Number              `json:"code"`
	Message string                   `json:"message"`
	Details []map[string]interface{} `json:"details"`
}

StandardGCPOperationErrorError is a singular error in a GCP operation.

Jump to

Keyboard shortcuts

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