Documentation
¶
Index ¶
- Constants
- Variables
- func GOPATH() (gopath string, has bool)
- func GOROOT() (goroot string, has bool)
- func LatestVersion(path string) (v string, err error)
- func LatestVersionFromProxy(path string) (v string, err error)
- func PKG() (pkg string)
- func RegisterBuiltinType(typ *Type)
- type Annotations
- type Component
- type Components
- type DepResult
- type DepVersion
- type Function
- func (f *Function) Authorization() (ok bool)
- func (f *Function) Barrier() (ok bool)
- func (f *Function) Deprecated() (ok bool)
- func (f *Function) Description() (description string)
- func (f *Function) Errors() (errs []FunctionError)
- func (f *Function) FieldImports() (v Imports)
- func (f *Function) Handle(ctx context.Context) (result interface{}, err error)
- func (f *Function) HostServiceName() (name string)
- func (f *Function) Internal() (ok bool)
- func (f *Function) Name() (name string)
- func (f *Function) Parse(ctx context.Context) (err error)
- func (f *Function) Permission() (ok bool)
- func (f *Function) SQL() (name string, has bool)
- func (f *Function) Timeout() (timeout time.Duration, has bool, err error)
- func (f *Function) Title() (title string)
- func (f *Function) Transactional() (has bool)
- func (f *Function) Validation() (title string, ok bool)
- type FunctionError
- type FunctionField
- type Functions
- type Import
- type Imports
- type Module
- func (mod *Module) GetType(path string, name string) (typ *Type, has bool)
- func (mod *Module) Parse(ctx context.Context) (err error)
- func (mod *Module) ParseType(ctx context.Context, path string, name string) (typ *Type, err error)
- func (mod *Module) Services() (services Services, err error)
- func (mod *Module) String() (s string)
- func (mod *Module) Types() (types map[string]*Type)
- type Requires
- type Service
- type Services
- type SourceDirReader
- type SourceFile
- type Sources
- func (sources *Sources) FindFileInDir(path string, matcher func(file *ast.File) (ok bool)) (file *ast.File, err error)
- func (sources *Sources) FindTypeSpec(path string, name string) (spec *ast.TypeSpec, imports Imports, genericDoc string, err error)
- func (sources *Sources) ReadDir(path string, fn func(file *ast.File, filename string) (err error)) (err error)
- func (sources *Sources) ReadFile(path string, name string) (file *ast.File, filename string, err error)
- type Type
- type TypeKind
- type TypeParadigm
- type TypeScope
- type Types
- type Work
Constants ¶
View Source
const ( BasicKind = TypeKind(iota + 1) // 基本类型,oas时不需要ref BuiltinKind // 内置类型,oas时需要ref,但不需要建component IdentKind InterfaceKind StructKind StructFieldKind PointerKind ArrayKind MapKind AnyKind ParadigmKind ParadigmElementKind ReferenceKind )
Variables ¶
Functions ¶
func LatestVersion ¶ added in v1.0.0
func LatestVersionFromProxy ¶ added in v1.0.0
func RegisterBuiltinType ¶
func RegisterBuiltinType(typ *Type)
Types ¶
type Annotations ¶
func ParseAnnotations ¶
func ParseAnnotations(s string) (annotations Annotations, err error)
type Components ¶
type Components []*Component
func (Components) Len ¶
func (components Components) Len() int
func (Components) Less ¶
func (components Components) Less(i, j int) bool
func (Components) Swap ¶
func (components Components) Swap(i, j int)
type DepResult ¶ added in v1.0.0
type DepResult struct {
Version DepVersion `json:"version"`
}
type DepVersion ¶ added in v1.0.0
type DepVersion struct {
Version string `json:"version"`
}
type Function ¶
type Function struct { Ident string ConstIdent string ProxyIdent string Annotations map[string]string Param *FunctionField Result *FunctionField // contains filtered or unexported fields }
func (*Function) Authorization ¶
func (*Function) Deprecated ¶
func (*Function) Description ¶
func (*Function) Errors ¶
func (f *Function) Errors() (errs []FunctionError)
func (*Function) FieldImports ¶
func (*Function) HostServiceName ¶
func (*Function) Permission ¶
func (*Function) Transactional ¶
func (*Function) Validation ¶
type FunctionError ¶
type FunctionField ¶
func (*FunctionField) Paths ¶
func (sf *FunctionField) Paths() (paths []string)
func (*FunctionField) String ¶
func (sf *FunctionField) String() (v string)
type Module ¶
type Module struct { Dir string Path string Version string Requires Requires Work *Work Replace *Module // contains filtered or unexported fields }
type SourceDirReader ¶
type SourceDirReader struct {
// contains filtered or unexported fields
}
type SourceFile ¶
type SourceFile struct {
// contains filtered or unexported fields
}
type Sources ¶
type Sources struct {
// contains filtered or unexported fields
}
func (*Sources) FindFileInDir ¶
func (*Sources) FindTypeSpec ¶
type Type ¶
type Type struct { Kind TypeKind Path string Name string Annotations Annotations Paradigms []*TypeParadigm Tags map[string]string Elements []*Type ParadigmsPacked *Type }
func (*Type) GetTopPaths ¶
type TypeParadigm ¶
func (*TypeParadigm) String ¶
func (tp *TypeParadigm) String() (v string)
Click to show internal directories.
Click to hide internal directories.