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 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
- type Attribute
- type Components
- type CrudParameters
- type DataSource
- type IndividualOperationInfo
- type Info
- type Items
- type ListAttributeElementType
- type ListAttributeType
- type ListNestedAttributeType
- type NcloudProvider
- type NcloudSpecification
- type NestedObjectType
- type OASchema
- type OpenAPI
- type OptionalRequestBody
- type PathItem
- type Paths
- type Property
- type RequestInfo
- 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 RemoveDuplicates ¶
func RemovingWhiteSpace ¶
func SliceContains ¶
func ToCamelCase ¶
func ToLowerCase ¶
func ToPascalCase ¶
Types ¶
type Components ¶
type CrudParameters ¶
type CrudParameters struct { Create IndividualOperationInfo `json:"create,omitempty"` Read IndividualOperationInfo `json:"read"` Update []*IndividualOperationInfo `json:"update"` Delete IndividualOperationInfo `json:"delete"` }
type DataSource ¶
type DataSource struct { datasource.DataSource RefreshObjectName string `json:"refresh_object_name"` ImportStateOverride string `json:"import_state_override"` Id string `json:"id"` }
type IndividualOperationInfo ¶
type IndividualOperationInfo struct { Parameters []string `json:"parameters,omitempty"` RequestBody *OptionalRequestBody `json:"request_body,omitempty"` Response string `json:"response,omitempty"` Method string `json:"method,omitempty"` Path string `json:"path,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 NcloudProvider ¶
type NcloudSpecification ¶
type NcloudSpecification struct { spec.Specification Provider *NcloudProvider `json:"provider"` Requests []RequestInfo `json:"requests"` 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 RequestInfo ¶
type RequestInfo struct { CrudParameters Name string `json:"name"` Id string `json:"id"` }
type RequestParametersInfo ¶
type Schema ¶
type Schema struct {
Attributes resource.Attributes `json:"attributes"`
}
Click to show internal directories.
Click to hide internal directories.