utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicGoTypes = map[string]bool{
	"bool":       true,
	"uint":       true,
	"uint8":      true,
	"uint16":     true,
	"uint32":     true,
	"uint64":     true,
	"int":        true,
	"int8":       true,
	"int16":      true,
	"int32":      true,
	"int64":      true,
	"float32":    true,
	"float64":    true,
	"string":     true,
	"complex64":  true,
	"complex128": true,
	"byte":       true,
	"rune":       true,
	"uintptr":    true,
	"error":      true,
}
View Source
var GoTypesOASFormats = map[string]string{
	"bool":    "boolean",
	"uint":    "int64",
	"uint8":   "int64",
	"uint16":  "int64",
	"uint32":  "int64",
	"uint64":  "int64",
	"int":     "int64",
	"int8":    "int64",
	"int16":   "int64",
	"int32":   "int64",
	"int64":   "int64",
	"float32": "float",
	"float64": "double",
	"string":  "string",
}
View Source
var GoTypesOASTypes = map[string]string{
	"bool":    "boolean",
	"uint":    "integer",
	"uint8":   "integer",
	"uint16":  "integer",
	"uint32":  "integer",
	"uint64":  "integer",
	"int":     "integer",
	"int8":    "integer",
	"int16":   "integer",
	"int32":   "integer",
	"int64":   "integer",
	"float32": "number",
	"float64": "number",
	"string":  "string",
}

Functions

func AddParametersRefLinkPrefix

func AddParametersRefLinkPrefix(name string) string

func AddSchemaRefLinkPrefix

func AddSchemaRefLinkPrefix(name string) string

func GenSchemaObjectID

func GenSchemaObjectID(pkgName, typeName string, withoutPkg bool) string

func GetModuleNameFromGoMod

func GetModuleNameFromGoMod(path string) string

func IsBasicGoType

func IsBasicGoType(typeName string) bool

func IsEnumType

func IsEnumType(name string) bool

func IsGoTypeOASType

func IsGoTypeOASType(typeName string) bool

func IsInStringList

func IsInStringList(list []string, s string) bool

func IsInterfaceType

func IsInterfaceType(typeName string) bool

func IsMainFile

func IsMainFile(path string) bool

func IsValidHTTPStatusCode

func IsValidHTTPStatusCode(statusCode int) bool

func ReplaceBackslash

func ReplaceBackslash(origin string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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