Documentation
¶
Index ¶
- Constants
- func CheckAPPName(appName string, client *civogo.Client) bool
- func CheckFileSize(path string) error
- func GetCommaSeparatedAllowedKeys(allowedKeys []string) string
- func InPool(id string, list []civogo.KubernetesClusterPoolConfig) bool
- func RandomName() string
- func ResourceCommonParseID(id string) (string, string, error)
- func StringToInt(s string) (int, error)
- func ValidateCNIName(v interface{}, _ string) (ws []string, es []error)
- func ValidateClusterType(v interface{}, path cty.Path) diag.Diagnostics
- func ValidateName(v interface{}, _ string) (ws []string, es []error)
- func ValidateNameOnlyContainsAlphanumericCharacters(v interface{}, _ cty.Path) diag.Diagnostics
- func ValidateNameSize(v interface{}, _ string) (ws []string, es []error)
- func ValidateProviderVersion(v interface{}, path cty.Path) diag.Diagnostics
- func ValidateUUID(v interface{}, k string) (ws []string, errors []error)
- type CustomError
- type VersionInfo
Constants ¶
const ( // FileSizeLimit limits the size of file to be used by the user FileSizeLimit = int64(20 * 1024 * 1024) // 20 MB )
Variables ¶
This section is empty.
Functions ¶
func CheckAPPName ¶ added in v0.10.6
CheckAPPName is a function to check if the app name is valid
func CheckFileSize ¶ added in v1.1.1
CheckFileSize function checks if the file the file size is less than the allowed limit(current: 20MB)
func GetCommaSeparatedAllowedKeys ¶ added in v0.10.12
GetCommaSeparatedAllowedKeys is used by "tfplugindocs" CLI to generate Markdown docs
func InPool ¶ added in v1.0.17
func InPool(id string, list []civogo.KubernetesClusterPoolConfig) bool
InPool is a utility function to check if a node pool is in a kubernetes cluster
func RandomName ¶
func RandomName() string
RandomName generates a Heroku-style random name for instances/clusters/etc
func ResourceCommonParseID ¶ added in v0.10.6
ResourceCommonParseID is a function to parse the ID of a resource
func StringToInt ¶ added in v1.0.21
StringToInt converts a string to an int
func ValidateCNIName ¶ added in v1.0.8
ValidateCNIName is a function to check if the cni name is valid
func ValidateClusterType ¶ added in v1.0.48
func ValidateClusterType(v interface{}, path cty.Path) diag.Diagnostics
ValidateClusterType Validates if the user has provided a supported cluster type.
func ValidateName ¶ added in v0.10.6
ValidateName is a function to check if the name is valid
func ValidateNameOnlyContainsAlphanumericCharacters ¶ added in v1.0.17
func ValidateNameOnlyContainsAlphanumericCharacters(v interface{}, _ cty.Path) diag.Diagnostics
ValidateNameOnlyContainsAlphanumericCharacters validate name only contains alphanumeric characters, hyphens, underscores and dots
func ValidateNameSize ¶ added in v0.10.6
ValidateNameSize is a function to check the size of a name
func ValidateProviderVersion ¶ added in v1.1.0
func ValidateProviderVersion(v interface{}, path cty.Path) diag.Diagnostics
ValidateProviderVersion function compares the current provider verson of the user with the threshold version and shows warning accordingly
func ValidateUUID ¶ added in v1.0.49
ValidateUUID checks if a given string is a UUID or not
Types ¶
type CustomError ¶ added in v1.0.47
CustomError captures a specific portion of the full API error
func ParseErrorResponse ¶ added in v1.0.47
func ParseErrorResponse(errorMsg string) (*CustomError, error)
ParseErrorResponse extracts and parses the JSON error response
func (*CustomError) Error ¶ added in v1.0.47
func (e *CustomError) Error() string
Error implements the error interface
type VersionInfo ¶ added in v1.1.0
VersionInfo stores Provider's version Info