Documentation
¶
Index ¶
- func ClearDoubleQuote(s string) string
- func ConvertKeys(input interface{}) interface{}
- func ConvertMapToObject(ctx context.Context, data map[string]interface{}) (types.Object, error)
- func CreateFuncMap() template.FuncMap
- func DiagOff[V, T interface{}](...) V
- func ExtractDto(jsonFilePath, refreshObjectName string) ([]byte, error)
- func ExtractPath(s string) string
- func ExtractResourceName(jsonFilePath string) (string, error)
- func FirstAlphabet(s string) string
- func FirstAlphabetToLowerCase(s string) string
- func FirstAlphabetToUpperCase(s string) string
- func JoinStrings(sep string, items []string) string
- func MakeIdGetter(target string) string
- func MakeRequest(method, path, endpoint, reqBody string) (map[string]interface{}, error)
- func MustAbs(path string) string
- func PathToPascal(s string) string
- func ReadAndUnmarshal[T any](filePath string, result *T) error
- func RemoveCustomType(filePath string) error
- func RemoveDuplicates(filePath string) error
- func RemovingWhiteSpace(input string) string
- func SliceContains(slice []string, value string) bool
- func ToCamelCase(s string) string
- func ToLowerCase(s string) string
- func ToPascalCase(s string) string
- func ToSnakeCase(s string) string
- type Attribute
- type Components
- type CrudParameters
- type DataSource
- type DetailedRequestType
- type Info
- type Items
- type ListAttributeElementType
- type ListAttributeType
- type ListNestedAttributeType
- type NcloudCommonRequestType
- type NcloudProvider
- type NcloudRequestBody
- type NcloudSpecification
- type NestedObjectType
- type OASchema
- type OpenAPI
- type OptionalRequestBody
- type PathItem
- type Paths
- type Property
- type RequestParameters
- type RequestParametersInfo
- type Resource
- type Schema
- type SingleNestedAttributeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearDoubleQuote ¶
func ConvertKeys ¶
func ConvertKeys(input interface{}) interface{}
convertKeys recursively converts all keys in a map from camelCase to snake_case
func ConvertMapToObject ¶
Convert nested map structured json into terraform object
func CreateFuncMap ¶
func ExtractDto ¶
func ExtractPath ¶
func ExtractResourceName ¶
func FirstAlphabet ¶
func JoinStrings ¶
func MakeIdGetter ¶
func MakeRequest ¶
func PathToPascal ¶
func ReadAndUnmarshal ¶
func RemoveCustomType ¶
func RemoveDuplicates ¶
func RemovingWhiteSpace ¶
func SliceContains ¶
func ToCamelCase ¶
func ToLowerCase ¶
func ToPascalCase ¶
func ToSnakeCase ¶
Types ¶
type Components ¶
type CrudParameters ¶
type CrudParameters struct {
Create *NcloudCommonRequestType `json:"create,omitempty"`
Read *NcloudCommonRequestType `json:"read"`
Update []*NcloudCommonRequestType `json:"update"`
Delete *NcloudCommonRequestType `json:"delete"`
}
type DataSource ¶
type DataSource struct {
datasource.DataSource
CRUDParameters CrudParameters `json:"crud_parameters"`
RefreshObjectName string `json:"refresh_object_name"`
ImportStateOverride string `json:"import_state_override"`
Id string `json:"id"`
}
type DetailedRequestType ¶
type DetailedRequestType struct {
spec.RequestType
Parameters *RequestParameters `json:"parameters,omitempty"`
RequestBody *NcloudRequestBody `json:"request_body,omitempty"`
}
type ListAttributeElementType ¶
type ListAttributeElementType struct {
String interface{} `json:"string,omitempty"`
Bool interface{} `json:"bool,omitempty"`
Int64 interface{} `json:"int64,omitempty"`
}
type ListAttributeType ¶
type ListAttributeType struct {
ComputedOptionalRequired string `json:"computed_optional_required"`
ElementType ListAttributeElementType `json:"element_type"`
}
type ListNestedAttributeType ¶
type ListNestedAttributeType struct {
ComputedOptionalRequired string `json:"computed_optional_required"`
NestedObject NestedObjectType `json:"nested_object"`
}
type NcloudCommonRequestType ¶
type NcloudCommonRequestType struct {
DetailedRequestType
Method string `json:"method,omitempty"`
Path string `json:"path,omitempty"`
}
type NcloudProvider ¶
type NcloudRequestBody ¶
type NcloudRequestBody struct {
spec.RequestBody
Required []*RequestParametersInfo `json:"required,omitempty"`
Optional []*RequestParametersInfo `json:"optional,omitempty"`
}
type NcloudSpecification ¶
type NcloudSpecification struct {
spec.Specification
Provider *NcloudProvider `json:"provider"`
Resources []Resource `json:"resources"`
DataSources []DataSource `json:"datasources"`
}
type NestedObjectType ¶
type OpenAPI ¶
type OpenAPI struct {
Paths map[string]*PathItem `json:"paths"`
Info *Info `json:"info"`
Components *Components `json:"components"`
}
type OptionalRequestBody ¶
type OptionalRequestBody struct {
Name string `json:"name,omitempty"`
Required []string `json:"required,omitempty"`
Optional []*RequestParametersInfo `json:"optional,omitempty"`
}
type Paths ¶
func InitializePaths ¶
type RequestParameters ¶
type RequestParameters struct {
Required []*RequestParametersInfo `json:"required,omitempty"`
Optional []*RequestParametersInfo `json:"optional,omitempty"`
}
type RequestParametersInfo ¶
type Schema ¶
type Schema struct {
Attributes resource.Attributes `json:"attributes"`
}
Click to show internal directories.
Click to hide internal directories.