apigo

package
v0.0.0-...-67af284 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EKind

type EKind int
const (
	Array   EKind = iota
	Pointer EKind = iota
)

type Field

type Field struct {
	Name string
	Type *Type
}

func (*Field) CopyFromOrig

func (f *Field) CopyFromOrig(parent string) (string, error)

func (*Field) CopyFromOrigT

func (f *Field) CopyFromOrigT(parent string) (string, error)

type File

type File struct {
	Name    string
	Pkg     string
	File    *ast.File
	Methods []*Methodold
	// contains filtered or unexported fields
}

func (*File) ClientWrite

func (file *File) ClientWrite() error

func (*File) ConvertType

func (file *File) ConvertType(typ ast.Expr) (*Type, error)

func (*File) ProtoWrite

func (file *File) ProtoWrite() error

func (*File) SearchType

func (file *File) SearchType(pkgname, name string) (*Type, error)

type MFile

type MFile struct {
	Path string
	File *modfile.File
}

type Methodold

type Methodold struct {
	Name string
	Objs []*Field
	Args []*Field
	Rets []*Field
}

type Mod

type Mod struct {
	// contains filtered or unexported fields
}

func (*Mod) Init

func (mod *Mod) Init() error

func (*Mod) ParseDir

func (mod *Mod) ParseDir(dirpath string) (Packages, error)

func (*Mod) ParseFile

func (mod *Mod) ParseFile(filename string) (*File, error)

func (*Mod) ParseMod

func (mod *Mod) ParseMod(fpath string) (*MFile, error)

func (*Mod) SearchType

func (mod *Mod) SearchType(filename, impath, pkgname, name string) (*Type, error)

type Packages

type Packages map[string]*ast.Package

func (Packages) SearchType

func (pkgs Packages) SearchType(mod *Mod, modf *MFile, pkgname string, name string) (*Type, error)

type Type

type Type struct {
	Pkg     string
	Name    string
	Aliname string
	Key     *Type
	Value   *Type
	Fields  []*Field
	Exprs   []EKind
	// contains filtered or unexported fields
}

func (*Type) GoNil

func (t *Type) GoNil() string

func (*Type) GoType

func (t *Type) GoType() string

func (*Type) Init

func (t *Type) Init() error

func (*Type) ProtoMessage

func (t *Type) ProtoMessage() ([]*Type, string, error)

func (*Type) ProtoMessages

func (t *Type) ProtoMessages() (string, error)

func (*Type) ProtoType

func (t *Type) ProtoType() ([]*Type, string, error)

func (*Type) ProtoTypeName

func (t *Type) ProtoTypeName() string

func (*Type) ReadFilds

func (t *Type) ReadFilds(fields *ast.FieldList) error

func (*Type) TypeForProto

func (t *Type) TypeForProto() (string, error)

Jump to

Keyboard shortcuts

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