Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPStatusFromCode ¶
HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status. See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
This method is adapted from https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go to prevent having to import the entire grpc-gateway package.
func NewStackPathError ¶
NewStackPathError factories common StackPath error scenarios into their own error types, or returns the original error.
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError models an error received from the StackPath API.
type Config ¶
type Config struct { // The Stack in which all resources should be created StackID string // The Client ID that should be used to retrieve an access token. This // option must not be used with the access token option. ClientID string // The Client Secret that should be used to retrieve an access // token. This options must not be used with the access token option. ClientSecret string // The AccessToken that should be used in the request. This must not // be used in combination with the client ID and client secret options. AccessToken string // The base URL to use for API requests. This value must not end // in a trailing slash. This value will default to the official // StackPath API. BaseURL string // contains filtered or unexported fields }
Config is used to configure the StackPath provider.
type InvalidClientIDError ¶
type InvalidClientIDError struct{}
InvalidClientSecretError models when a StackPath API OAuth 2 client ID is invalid, either due to an invalid format or because the client ID does not exist at StackPath.
func NewInvalidClientIDError ¶
func NewInvalidClientIDError() *InvalidClientIDError
NewInvalidClientIDError wraps an existing error as an invalid client ID error.
func (*InvalidClientIDError) Error ¶
func (e *InvalidClientIDError) Error() string
Error returns a human-readable invalid client ID error message.
type InvalidClientSecretError ¶
type InvalidClientSecretError struct{}
InvalidClientSecretError models when a StackPath API OAuth 2 client ID is correct, but the client secret is incorrect.
func NewInvalidClientSecretError ¶
func NewInvalidClientSecretError() *InvalidClientSecretError
NewInvalidClientSecretError wraps an existing error as an invalid client secret error.
func (*InvalidClientSecretError) Error ¶
func (e *InvalidClientSecretError) Error() string
Error returns a human-readable invalid client secret error message.
type UserAgentTransport ¶
type UserAgentTransport struct { http.RoundTripper // contains filtered or unexported fields }
UserAgentTransport is an http RoundTripper that sets a descriptive User-Agent header for all StackPath API requests.
func NewUserAgentTransport ¶
func NewUserAgentTransport(parent http.RoundTripper, terraformVersion string) *UserAgentTransport
NewUserAgentTransport builds a new UserAgentTransport around the underlying RoundTripper.
Source Files
¶
- config.go
- errors.go
- provider.go
- resource_stackpath_compute_network_allocation.go
- resource_stackpath_compute_network_allocation_claim.go
- resource_stackpath_compute_network_policy.go
- resource_stackpath_compute_vpc_network.go
- resource_stackpath_compute_vpc_network_subnet.go
- resource_stackpath_compute_vpc_route.go
- resource_stackpath_compute_workload.go
- resource_stackpath_compute_workload_instance.go
- resource_stackpath_core.go
- resource_stackpath_object_storage_bucket.go
- structure_compute_network.go
- structure_compute_network_allocation.go
- structure_compute_network_allocation_claim.go
- structure_compute_network_allocation_core.go
- structure_compute_network_policy.go
- structure_compute_network_subnet.go
- structure_compute_route.go
- structure_compute_workload.go
- structure_compute_workload_instance.go
- structure_core.go
- user_agent_transport.go
- validation.go