option

package
v3.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(optionPkgs map[string]string, module *packages.Module, pkgs *packages2.Packages, commentFuncs map[string][]string, commentFields *ast.CommentFields) (result map[string]*Module, err error)

Types

type ArrayType

type ArrayType struct {
	Value     interface{}
	Len       int64
	IsPointer bool
}

type BasicType

type BasicType struct {
	Name      string
	IsPointer bool
	// contains filtered or unexported fields
}

func NewInt64Type added in v3.0.25

func NewInt64Type() *BasicType

func NewStringType added in v3.0.26

func NewStringType() *BasicType

func (BasicType) BitSize

func (t BasicType) BitSize() string

func (BasicType) IsAnyFloat

func (t BasicType) IsAnyFloat() bool

func (BasicType) IsAnyInt

func (t BasicType) IsAnyInt() bool

func (BasicType) IsAnyUint

func (t BasicType) IsAnyUint() bool

func (BasicType) IsBool

func (t BasicType) IsBool() bool

func (BasicType) IsByte

func (t BasicType) IsByte() bool

func (BasicType) IsFloat32

func (t BasicType) IsFloat32() bool

func (BasicType) IsFloat64

func (t BasicType) IsFloat64() bool

func (BasicType) IsInt

func (t BasicType) IsInt() bool

func (BasicType) IsInt16

func (t BasicType) IsInt16() bool

func (BasicType) IsInt32

func (t BasicType) IsInt32() bool

func (BasicType) IsInt64

func (t BasicType) IsInt64() bool

func (BasicType) IsInt8

func (t BasicType) IsInt8() bool

func (BasicType) IsNumeric

func (t BasicType) IsNumeric() bool

func (BasicType) IsString

func (t BasicType) IsString() bool

func (BasicType) IsUint

func (t BasicType) IsUint() bool

func (BasicType) IsUint16

func (t BasicType) IsUint16() bool

func (BasicType) IsUint32

func (t BasicType) IsUint32() bool

func (BasicType) IsUint64

func (t BasicType) IsUint64() bool

func (BasicType) IsUint8

func (t BasicType) IsUint8() bool

type BoolValue

type BoolValue struct {
	Value *bool
}

func (BoolValue) IsValid

func (v BoolValue) IsValid() bool

func (BoolValue) Take

func (v BoolValue) Take() bool

type Decoder

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

type ExprStringValue

type ExprStringValue struct {
	Value interface{}
}

func (ExprStringValue) IsValid

func (v ExprStringValue) IsValid() bool

func (ExprStringValue) Take

func (v ExprStringValue) Take() string

type FuncType

type FuncType struct {
	Pkg      *PackageType
	FullName string
	Name     String
	Exported bool
	Sig      *SignType
	Comment  string
}

func (*FuncType) ID

func (f *FuncType) ID() string

type FuncTypeValue

type FuncTypeValue struct {
	Value *FuncType
}

type IfaceType

type IfaceType struct {
	Origin          *stdtypes.Interface
	Methods         []*FuncType
	Embeddeds       []interface{}
	ExplicitMethods []*FuncType
}

type Inject

type Inject struct {
	Pkg      *PackageType
	BasePath string
	Option   map[string]interface{}
}

type Int64Value

type Int64Value struct {
	Value *int64
}

func (Int64Value) IsValid

func (v Int64Value) IsValid() bool

func (Int64Value) Take

func (v Int64Value) Take() int64

type IntValue

type IntValue struct {
	Value *int
}

func (IntValue) IsValid

func (v IntValue) IsValid() bool

func (IntValue) Take

func (v IntValue) Take() int

type MapType

type MapType struct {
	Key       interface{}
	Value     interface{}
	IsPointer bool
}

type Module

type Module struct {
	Path     string
	External bool
	Injects  []*Inject
}

type ModuleType

type ModuleType struct {
	ID       string
	Version  string
	Path     string
	Dir      string
	External bool
}

type NamedType

type NamedType struct {
	Obj       stdtypes.Object
	Name      String
	Type      interface{}
	Pkg       *PackageType
	IsPointer bool
	Methods   []*FuncType
}

func (*NamedType) ID

func (n *NamedType) ID() string

type PackageType

type PackageType struct {
	Name   string
	Path   string
	Module *ModuleType
	Types  *stdtypes.Package
}

type PositionType

type PositionType struct {
	Column   int
	Filename string
	Line     int
	Offset   int
	IsValid  bool
}

type Result

type Result struct {
	Modules map[string][]Module
}

type SelectorType

type SelectorType struct {
	Sel interface{}
	X   interface{}
}

type SignType

type SignType struct {
	Params     VarsType
	Results    VarsType
	IsVariadic bool
	IsNamed    bool
	Recv       interface{}
}

type SliceStringValue

type SliceStringValue struct {
	Value []string
}

type SliceType

type SliceType struct {
	Value     interface{}
	IsPointer bool
}

type String

type String struct {
	Value string
	// contains filtered or unexported fields
}

func (String) Lower

func (n String) Lower() string

func (String) String

func (n String) String() string

func (String) Upper

func (n String) Upper() string

type StringValue

type StringValue struct {
	Value *string
}

func (StringValue) IsValid

func (v StringValue) IsValid() bool

func (StringValue) Take

func (v StringValue) Take() string

type StructFieldType

type StructFieldType struct {
	Var  *VarType
	Tags *structtag.Tags
}

type StructType

type StructType struct {
	Fields    []*StructFieldType
	IsPointer bool
	// contains filtered or unexported fields
}

type VarType

type VarType struct {
	Name       String
	Embedded   bool
	Exported   bool
	IsField    bool
	IsVariadic bool
	IsContext  bool
	Type       interface{}
	Comment    string
	Zero       string
	// contains filtered or unexported fields
}

type VarsType

type VarsType []*VarType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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