Documentation ¶
Index ¶
- func Directives() ([]byte, error)
- func KloudliteK8sTypes() ([]byte, error)
- func RestoreSanitizedPackagePath(sanitizedPath string) string
- func SanitizePackagePath(pkgPath string) string
- func ScalarTypes() ([]byte, error)
- type Field
- type GraphqlTag
- type GraphqlType
- type JsonTag
- type Parser
- type SchemaClient
- type Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Directives ¶
func KloudliteK8sTypes ¶
func SanitizePackagePath ¶
func ScalarTypes ¶
Types ¶
type GraphqlTag ¶
type GraphqlType ¶
type GraphqlType string
const ( Type GraphqlType = "type" Input GraphqlType = "input" Enum GraphqlType = "enum" )
type Parser ¶
type Parser interface { GenerateGraphQLSchema(structName string, name string, t reflect.Type, parentTag GraphqlTag) error LoadStruct(name string, data any) error PrintTypes(w io.Writer) PrintCommonTypes(w io.Writer) DebugSchema(w io.Writer) DumpSchema(dir string) error WithPagination(types []string) }
func NewParser ¶
func NewParser(cli SchemaClient) Parser
func NewUnsafeParser ¶
func NewUnsafeParser(strucs map[string]*Struct, cli SchemaClient) Parser
type SchemaClient ¶
type SchemaClient interface { GetK8sJsonSchema(name string) (*apiExtensionsV1.JSONSchemaProps, error) GetHttpJsonSchema(url string) (*apiExtensionsV1.JSONSchemaProps, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.