typeparser

package module
v0.0.0-...-a02a54c Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Verbose bool
	Logger  func(format string, args ...interface{})
)

Functions

This section is empty.

Types

type Field

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

func (Field) Name

func (f Field) Name() string

func (Field) TagValue

func (f Field) TagValue(s string) List

func (Field) Tags

func (f Field) Tags() List

func (Field) Type

func (f Field) Type() string

type List

type List []string

List is a magic list of string

func (List) All

func (vs List) All(f func(string) bool) bool

All returns `true` if all of the strings in the slice satisfy the predicate `f`.

func (List) Any

func (vs List) Any(f func(string) bool) bool

Any returns `true` if one of the strings in the slice satisfies the predicate `f`.

func (List) Explode

func (vs List) Explode(f func(string) []string) List

Explode returns a new slice containing the results of applying the function `f` to each string in the original slice.

func (List) Filter

func (vs List) Filter(f func(string) bool) List

Filter returns a new slice containing all strings in the slice that satisfy the predicate `f`.

func (List) Has

func (vs List) Has(t string) bool

Has returns `true` if the target string t is in the slice.

func (List) Index

func (vs List) Index(t string) int

Index returns the first index of the target string `t`, or -1 if no match is found.

func (List) Map

func (vs List) Map(f func(string) string) List

Map returns a new slice containing the results of applying the function `f` to each string in the original slice.

type Method

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

func (Method) Name

func (m Method) Name() string

func (Method) ParamNames

func (m Method) ParamNames() List

func (Method) ParamTypes

func (m Method) ParamTypes() List

func (Method) Params

func (m Method) Params() []Param

func (Method) ResultTypes

func (m Method) ResultTypes() List

func (Method) Results

func (m Method) Results() []Param

type Param

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

func (Param) Name

func (p Param) Name() string

func (Param) Type

func (p Param) Type() string

type Type

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

func Parse

func Parse(filename string) ([]Type, error)

func (Type) Docs

func (t Type) Docs() List

func (Type) Field

func (t Type) Field(name string) *Field

func (Type) FieldNames

func (t Type) FieldNames() List

func (Type) Fields

func (t Type) Fields() []Field

func (Type) IsConcrete

func (t Type) IsConcrete() bool

func (Type) IsInterface

func (t Type) IsInterface() bool

func (Type) Method

func (t Type) Method(s string) *Method

func (Type) MethodNames

func (t Type) MethodNames() List

func (Type) Methods

func (t Type) Methods() []Method

func (Type) Name

func (t Type) Name() string

func (Type) Package

func (t Type) Package() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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