core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alias

func Alias[T any]()

func ExtractStructure

func ExtractStructure(mapping map[annotation.Node][]Convertor) (re map[string]Convertor)

func FindAnnotations

func FindAnnotations[T any](a []annotation.Annotation) []T

func Inject

func Inject(proc *Processor) (ops map[string][]byte)

func Or

func Or[T any](expr bool, a1 T, a2 T) T

func Proxy

func Proxy(proc *Processor) (ops map[string][]byte)

func Router

func Router(proc *Processor) (ops map[string][]byte)

func ToSnakeCase

func ToSnakeCase(str string) (value string)

Types

type Argv

type Argv struct {
	ImportPath string
	Names      []string
	Interface  Interface
	IsPointer  bool
	// contains filtered or unexported fields
}

func (*Argv) Alias

func (re *Argv) Alias(n string)

func (*Argv) String

func (re *Argv) String() string

type Builder

type Builder func(proc *Processor) map[string][]byte

type Convertor

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

func (*Convertor) Alias

func (convert *Convertor) Alias(n string)

func (*Convertor) As

func (convert *Convertor) As(name string) bool

func (*Convertor) ExtractArguments

func (convert *Convertor) ExtractArguments(lookup annotation.Lookup, node ast.Node) (args []Argv)

func (*Convertor) ExtractReturns

func (convert *Convertor) ExtractReturns(lookup annotation.Lookup, node ast.Node) (args []Argv)

func (*Convertor) GetAstName

func (convert *Convertor) GetAstName() (n string)

func (*Convertor) ImportPath

func (convert *Convertor) ImportPath() string

func (*Convertor) Is

func (convert *Convertor) Is(enum GoAst) bool

func (*Convertor) String

func (convert *Convertor) String() (str string, err error)

type GoAst

type GoAst int
const (
	GoFunc GoAst
	GoStruct
	GoInterface
)

type Imported

type Imported struct {
	Alias      string
	ImportPath string
}

func Import

func Import(imports []Imported, alias, importPath string) ([]Imported, string)

func (Imported) String

func (ip Imported) String() string

type Interface

type Interface string

func (Interface) Alias

func (i Interface) Alias() string

func (Interface) Ext

func (i Interface) Ext() string

func (Interface) String

func (i Interface) String() string

type Processor

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

func (*Processor) Name

func (proc *Processor) Name() string

func (*Processor) Output

func (proc *Processor) Output() (ops map[string][]byte)

func (*Processor) Process

func (proc *Processor) Process(node annotation.Node) error

func (*Processor) Version

func (proc *Processor) Version() string

Jump to

Keyboard shortcuts

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