Documentation ¶
Index ¶
- Variables
- func AddDoc(pkg, structName string, fields []*FieldDoc, methods ...*MethodDoc)
- func DumpReflectType(t reflect.Type, verbose ...string) string
- func DumpReflectTypeEx(t reflect.Type, method bool, verbose ...string) string
- func DumpReturnTypes(types []reflect.Type) string
- func DumpTypes(types []reflect.Type, isVariadic bool) string
- func LibDocsToCompletionJson(libs ...LibDoc) ([]byte, error)
- func LibDocsToCompletionJsonEx(all bool, libs ...LibDoc) ([]byte, error)
- func LibDocsToCompletionJsonShort(libs ...LibDoc) ([]byte, error)
- func StructName(libName, pkgPath, name string) string
- type ExportsFunctionDoc
- type FieldDoc
- type FieldsCompletion
- type LibDoc
- type MethodDoc
- type StructDoc
- type StructDocForYamlMarshal
- type StructHelper
- type VariableDoc
- type YakCompletion
- type YakFunctionCompletion
- type YakLibDocCompletion
Constants ¶
This section is empty.
Variables ¶
View Source
var Entry = map[string]StructDoc{}
Functions ¶
func DumpReflectTypeEx ¶
func DumpReturnTypes ¶
func LibDocsToCompletionJson ¶
func StructName ¶
Types ¶
type ExportsFunctionDoc ¶
type ExportsFunctionDoc struct { Name string LibName string `yaml:"-"` TypeStr string `yaml:"type_str"` LongDescription string `yaml:"long_description"` Description string Example string `yaml:"example,omitempty"` Params []*FieldDoc `yaml:"params,omitempty"` Returns []*FieldDoc `yaml:"returns,omitempty"` RelativeStructs []*StructDoc `yaml:"relative_structs,omitempty"` }
func ReflectFuncToFunctionDoc ¶
func ReflectFuncToFunctionDoc(libName string, ret reflect.Type) (ExportsFunctionDoc, error)
func (*ExportsFunctionDoc) CompletionStr ¶
func (e *ExportsFunctionDoc) CompletionStr() string
func (*ExportsFunctionDoc) DefinitionStr ¶
func (e *ExportsFunctionDoc) DefinitionStr() string
func (*ExportsFunctionDoc) Fragment ¶
func (e *ExportsFunctionDoc) Fragment() string
func (*ExportsFunctionDoc) Hash ¶
func (e *ExportsFunctionDoc) Hash() string
func (*ExportsFunctionDoc) Merge ¶
func (e *ExportsFunctionDoc) Merge(target *ExportsFunctionDoc)
type FieldDoc ¶
type FieldDoc struct { StructName string `yaml:"structname,omitempty"` Name string ParamAlias string `yaml:"param_alias"` TypeAlias string `yaml:"type_alias"` Description string RelativeStructName string `yaml:"relative_structname,omitempty"` TypeStr string `yaml:"type_str"` IsVariadic bool `yaml:"is_variadic,omitempty"` }
func (*FieldDoc) NameVerbose ¶
func (*FieldDoc) TypeVerbose ¶
type FieldsCompletion ¶
type FieldsCompletion struct { IsMethod bool `json:"isMethod"` FieldName string `json:"fieldName"` FieldTypeVerbose string `json:"fieldTypeVerbose"` LibName string `json:"libName"` StructName string `json:"structName"` StructNameShort string `json:"structNameShort"` MethodsCompletion string `json:"methodsCompletion"` MethodsCompletionVerbose string `json:"methodsCompletionVerbose"` IsGolangBuildOrigin bool `json:"isGolangBuildOrigin"` }
type LibDoc ¶
type LibDoc struct { Name string Functions []*ExportsFunctionDoc Variables []*VariableDoc }
func (*LibDoc) ToMarkdown ¶
type MethodDoc ¶
type StructDoc ¶
type StructDoc struct { StructName string IsBuildInStruct bool LibName string `yaml:"-"` Description string `yaml:"-"` Fields []*FieldDoc `yaml:"-"` MethodsDoc []*MethodDoc `yaml:"-"` PtrMethodDoc []*MethodDoc `yaml:"-"` }
func StructHelperToDoc ¶
func StructHelperToDoc(h *StructHelper) []*StructDoc
func (*StructDoc) IsBuildInLib ¶
type StructDocForYamlMarshal ¶
type StructDocForYamlMarshal struct { IsBuildInStruct bool `yaml:"is_build_in_struct"` LibName string `json:"lib_name"` StructName string `yaml:"struct_name"` Description string `yaml:"description"` Fields []*FieldDoc `yaml:"fields"` MethodsDoc []*MethodDoc `yaml:"methods"` PtrMethodDoc []*MethodDoc `yaml:"ptr_methods"` }
func LibsToRelativeStructs ¶
func LibsToRelativeStructs(libs ...LibDoc) []*StructDocForYamlMarshal
func (*StructDocForYamlMarshal) GenerateCompletion ¶
func (s *StructDocForYamlMarshal) GenerateCompletion() []FieldsCompletion
func (*StructDocForYamlMarshal) IsBuildInLib ¶
func (s *StructDocForYamlMarshal) IsBuildInLib() bool
func (*StructDocForYamlMarshal) Merge ¶
func (s *StructDocForYamlMarshal) Merge(e *StructDocForYamlMarshal)
type StructHelper ¶
type StructHelper struct { PkgPath string Name string Fields []reflect.StructField Methods []reflect.Method PtrMethods []reflect.Method }
func DescPtrStruct ¶
func DescPtrStruct(ret reflect.Type) (_ *StructHelper, fErr error)
func DescStruct ¶
func DescStruct(ret reflect.Type) (*StructHelper, error)
func Dir ¶
func Dir(i interface{}) (*StructHelper, error)
func (*StructHelper) Show ¶
func (s *StructHelper) Show()
func (*StructHelper) ShowAddDocHelper ¶
func (s *StructHelper) ShowAddDocHelper()
func (*StructHelper) String ¶
func (s *StructHelper) String() string
type VariableDoc ¶
type VariableDoc struct { Name string TypeStr string ValueVerbose string Description string RelativeStruct []*StructDoc `yaml:"relative_struct,omitempty"` }
func (*VariableDoc) Hash ¶
func (e *VariableDoc) Hash() string
type YakCompletion ¶
type YakCompletion struct { LibNames []string `json:"libNames"` LibCompletions []YakLibDocCompletion `json:"libCompletions"` FieldsCompletions []FieldsCompletion `json:"fieldsCompletions"` LibToFieldCompletions map[string][]FieldsCompletion `json:"libToFieldCompletions"` }
type YakFunctionCompletion ¶
type YakLibDocCompletion ¶
type YakLibDocCompletion struct { LibName string `json:"libName"` Prefix string `json:"prefix"` FunctionCompletion []YakFunctionCompletion `json:"functions"` }
Click to show internal directories.
Click to hide internal directories.