schema

package
v0.0.0-...-0fb2adb Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClientCode

func GenerateClientCode(file string, modPrefix string) string

Types

type Argument

type Argument struct {
	Name string
	Type Type
}

type Field

type Field struct {
	Name      string
	Type      Type
	Offset    uint
	Anonymous bool
}

type Schema

type Schema struct {
	All   []Type
	Types map[string]*Type
}

func GenerateFromFile

func GenerateFromFile(path string) (Schema, error)

type Type

type Type struct {
	Name    string
	PkgPath string
	Kind    string

	// for Structs
	Fields []Field

	// for Funcs
	IsVariadic bool
	Ins        []Argument
	Outs       []Type
	Self       *Type // for Methods

	// for Maps
	Key *Type

	// for Arrays
	Len int

	// for Array,Chan,Map,Pointer,Slice
	Elem *Type
}

func (*Type) String

func (t *Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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