Documentation
¶
Index ¶
- Constants
- func AddOptionalFieldsToSchema(schema map[string]*schema.Schema, keys ...string)
- func AddRequiredFieldsToSchema(schema map[string]*schema.Schema, keys ...string)
- func Atoi32(str string) (int32, error)
- func BoolPtr(s bool) *bool
- func ByteToGibiByte(x float64) int
- func ContinentShorthand(continent string) string
- func DataSourceSchemaFromResourceSchema(rs map[string]*schema.Schema) map[string]*schema.Schema
- func DateToDateTime(date string) strfmt.DateTime
- func DeleteFieldsFromSchema(schema map[string]*schema.Schema, keys ...string)
- func FilePathToBase64String(filePath string) (string, error)
- func FlattenTaikunImages(rawImages ...tkcore.CommonStringBasedDropdownDto) []map[string]interface{}
- func GetAlertingIntegrationType(integrationType string) tkcore.AlertingIntegrationType
- func GetEPrometheusType(prometheusType string) tkshowback.EPrometheusType
- func GetKubeconfigRoleID(role string) int32
- func GetLastCharacter(zoneString string) string
- func GetLoadBalancingSolution(octaviaEnabled bool, taikunLBEnabled bool) string
- func GetLockMode(locked bool) string
- func GetPrometheusType(prometheusType string) tkcore.PrometheusType
- func GetProxmoxStorageStringForServer(projectID int32, apiClient *tk.Client) (string, error)
- func GetReadAfterOpTimeout(isUpdate bool) time.Duration
- func GetSecurityGroupProtocol(protocol string) tkcore.SecurityGroupProtocol
- func GetShowbackType(showbackType string) tkshowback.EShowbackType
- func GibiByteToByte(gibiBytes int) float64
- func HashAttributes(keys ...string) func(v interface{}) int
- func I32toa(x int32) string
- func IgnoreChangeFromEmpty(k string, old string, new string, d *schema.ResourceData) bool
- func NewNullableFloat64(s float64) tkcore.NullableFloat64
- func ParseLoadBalancingSolution(loadBalancingSolution string) (octaviaEnabled bool, taikunLBEnabled bool)
- func RandomBool() bool
- func RandomEmail() string
- func RandomInt(maxInt int) int
- func RandomString() string
- func RandomTestName() string
- func RandomURL() string
- func ReadAfterCreateWithRetries(readFunc schema.ReadContextFunc, ctx context.Context, d *schema.ResourceData, ...) diag.Diagnostics
- func ReadAfterUpdateWithRetries(readFunc schema.ReadContextFunc, ctx context.Context, d *schema.ResourceData, ...) diag.Diagnostics
- func RemoveForceNewsFromSchema(schema map[string]*schema.Schema)
- func ResourceGetStringList(data interface{}) []string
- func ResourceTaikunCloudCredentialDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func Rfc3339DateTimeToDate(date string) string
- func SetFieldInSchema(schema map[string]*schema.Schema, key string, value *schema.Schema)
- func SetResourceDataFromMap(d *schema.ResourceData, m map[string]interface{}) error
- func SetResourceDataId(d *schema.ResourceData, id int32)
- func SetValidateDiagFuncToSchema(schema map[string]*schema.Schema, key string, f schema.SchemaValidateDiagFunc)
- func ShortRandomTestName() string
- func SliceOfSTringsToSliceOfInt32(listOfStrings []interface{}) ([]int32, error)
- func StringIsCron(i interface{}, path cty.Path) diag.Diagnostics
- func StringIsDate(i interface{}, path cty.Path) diag.Diagnostics
- func StringIsEmail(i interface{}, path cty.Path) diag.Diagnostics
- func StringIsFilePath(i interface{}, path cty.Path) diag.Diagnostics
- func StringIsInt(i interface{}, path cty.Path) diag.Diagnostics
- func StringIsUUID(i interface{}, path cty.Path) diag.Diagnostics
- func StringLenBetween(min int, max int) schema.SchemaValidateDiagFunc
- func StringPtr(s string) *string
- func TimedOut(err error) bool
Constants ¶
const (
CloudTypeOpenStack = "OpenStack"
)
const (
LoadBalancerTaikun = "Taikun"
)
const NotFoundAfterCreateOrUpdateError = "notFoundAfterCreateOrUpdateError"
Variables ¶
This section is empty.
Functions ¶
func ByteToGibiByte ¶
func ContinentShorthand ¶
func DataSourceSchemaFromResourceSchema ¶
DataSourceSchemaFromResourceSchema is a recursive func that converts an existing Resource schema to a Datasource schema. All schema elements are copied, but certain attributes are ignored or changed: - all attributes have Computed = true - all attributes have ForceNew, Required = false - Validation funcs and attributes (e.g. MaxItems) are not copied
func DateToDateTime ¶
func DeleteFieldsFromSchema ¶
func FilePathToBase64String ¶
Read file contents, encode in base64 and return
func FlattenTaikunImages ¶
func FlattenTaikunImages(rawImages ...tkcore.CommonStringBasedDropdownDto) []map[string]interface{}
func GetAlertingIntegrationType ¶
func GetAlertingIntegrationType(integrationType string) tkcore.AlertingIntegrationType
func GetEPrometheusType ¶
func GetEPrometheusType(prometheusType string) tkshowback.EPrometheusType
func GetKubeconfigRoleID ¶
func GetLastCharacter ¶
func GetLockMode ¶
func GetPrometheusType ¶
func GetPrometheusType(prometheusType string) tkcore.PrometheusType
func GetProxmoxStorageStringForServer ¶
Proxmox storage options in kubernetes profile and Project are different from what we send while creating k8s servers
func GetReadAfterOpTimeout ¶
func GetSecurityGroupProtocol ¶
func GetSecurityGroupProtocol(protocol string) tkcore.SecurityGroupProtocol
func GetShowbackType ¶
func GetShowbackType(showbackType string) tkshowback.EShowbackType
func GibiByteToByte ¶
func HashAttributes ¶
func IgnoreChangeFromEmpty ¶
This function is used when we have an API parameter PARAM with the following behavior - We set PARAM to "x" and API returns PARAM with "x" (there is no change) - We do not set PARAM. API figures out some value "y" and returns PARAM with value "y" (Terraform must ignore the change)
func NewNullableFloat64 ¶
func NewNullableFloat64(s float64) tkcore.NullableFloat64
func RandomBool ¶
func RandomBool() bool
func RandomEmail ¶
func RandomEmail() string
func RandomString ¶
func RandomString() string
func RandomTestName ¶
func RandomTestName() string
func ReadAfterCreateWithRetries ¶
func ReadAfterCreateWithRetries(readFunc schema.ReadContextFunc, ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ReadAfterUpdateWithRetries ¶
func ReadAfterUpdateWithRetries(readFunc schema.ReadContextFunc, ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ResourceGetStringList ¶
func ResourceGetStringList(data interface{}) []string
func ResourceTaikunCloudCredentialDelete ¶
func ResourceTaikunCloudCredentialDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func Rfc3339DateTimeToDate ¶
func SetFieldInSchema ¶
func SetResourceDataFromMap ¶
func SetResourceDataFromMap(d *schema.ResourceData, m map[string]interface{}) error
func SetResourceDataId ¶
func SetResourceDataId(d *schema.ResourceData, id int32)
func ShortRandomTestName ¶
func ShortRandomTestName() string
func SliceOfSTringsToSliceOfInt32 ¶
Slice of strings to slice of int32
func StringIsCron ¶
func StringIsCron(i interface{}, path cty.Path) diag.Diagnostics
func StringIsDate ¶
func StringIsDate(i interface{}, path cty.Path) diag.Diagnostics
func StringIsEmail ¶
func StringIsEmail(i interface{}, path cty.Path) diag.Diagnostics
func StringIsFilePath ¶
func StringIsFilePath(i interface{}, path cty.Path) diag.Diagnostics
func StringIsInt ¶
func StringIsInt(i interface{}, path cty.Path) diag.Diagnostics
func StringIsUUID ¶
func StringIsUUID(i interface{}, path cty.Path) diag.Diagnostics
func StringLenBetween ¶
func StringLenBetween(min int, max int) schema.SchemaValidateDiagFunc
Types ¶
This section is empty.