sdk

package
v0.4.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "v0.4.0-beta"
	C
)

Variables

View Source
var ClientTemplate string
View Source
var MethodTemplate string
View Source
var RefreshTemplate string

Functions

func CamelToPascalCase

func CamelToPascalCase(s string) string

func CreateFuncMap

func CreateFuncMap() template.FuncMap

func ExtractPath

func ExtractPath(s string) string

func FirstAlphabet

func FirstAlphabet(s string) string

func FirstAlphabetToUpperCase

func FirstAlphabetToUpperCase(s string) string

func GenArray

func GenArray(d *base.Schema, pName string) string

func GenObject

func GenObject(d *base.Schema, pName string) string

func Gen_ConvertOAStoTFTypes

func Gen_ConvertOAStoTFTypes(propreties *base.Schema, openapiType, format, resourceName string) (s string, m string)

generate converter that convert openapi.json schema to terraform type

func Generate

func Generate(v3Doc *libopenapi.DocumentModel[v3high.Document]) error

func GenerateFile

func GenerateFile(op *v3high.Operation, method, key string) error

func GenerateStructs

func GenerateStructs(responses *v3high.Responses, responseName string) ([]byte, string, string, error)

Generate terraform-spec type based struct with *v3high.Responses input

func JoinStrings

func JoinStrings(sep string, items []string) string

func MustAbs

func MustAbs(path string) string

func PascalToSnakeCase

func PascalToSnakeCase(s string) string

func PathToFilename

func PathToFilename(s string) (filename string)

func PathToPascal

func PathToPascal(s string) string

func ToCamelCase

func ToCamelCase(s string) string

func ToLowerCase

func ToLowerCase(s string) string

func ToPascalCase

func ToPascalCase(s string) string

func WriteClient

func WriteClient() []byte

Types

type AuthorizersResponse

type AuthorizersResponse struct {
	Tenantid              string    `json:"tenantId"`
	Modifier              string    `json:"modifier"`
	Modtime               time.Time `json:"modTime"`
	Domaincode            string    `json:"domainCode"`
	Cachettlsec           int       `json:"cacheTtlSec"`
	Authorizertype        string    `json:"authorizerType"`
	Authorizername        string    `json:"authorizerName"`
	Authorizerid          string    `json:"authorizerId"`
	Authorizerdescription string    `json:"authorizerDescription"`
	Authorizerconfig      struct {
		Payload []struct {
			Name string `json:"name"`
			In   string `json:"in"`
		} `json:"payload"`
		Functionid string `json:"functionId"`
		Region     string `json:"region"`
	} `json:"authorizerConfig"`
}

type DashboardsApikeysApikeyidProductidsResponse

type DashboardsApikeysApikeyidProductidsResponse struct {
	Products []struct {
		ActionName string `json:"actionName"`
		Disabled   bool   `json:"disabled"`
		IsDeleted  bool   `json:"isDeleted"`
	} `json:"products"`
}

type Template

type Template struct {
	OAS *v3high.Operation
	// contains filtered or unexported fields
}

func New

func New(oas *v3high.Operation, method, path, ns, nm string) *Template

func (*Template) WriteRefresh

func (t *Template) WriteRefresh() []byte

func (*Template) WriteTemplate

func (t *Template) WriteTemplate() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL