parser

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	Name       string
	In         Field
	Out        Field
	Fields     []Field
	Timestamps bool
}

type Enum

type Enum struct {
	Name string
}

type EnumValue

type EnumValue struct {
	Enum     string
	Variable string
	Value    string
}

type Field

type Field interface {
	fmt.Stringer

	Name() string
	Pointer() bool
	// contains filtered or unexported methods
}

type FieldBool

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

func (FieldBool) Name

func (f FieldBool) Name() string

func (FieldBool) Pointer

func (f FieldBool) Pointer() bool

func (FieldBool) String

func (f FieldBool) String() string

type FieldByte added in v0.3.0

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

func (FieldByte) Name added in v0.3.0

func (f FieldByte) Name() string

func (FieldByte) Pointer added in v0.3.0

func (f FieldByte) Pointer() bool

func (FieldByte) String added in v0.3.0

func (f FieldByte) String() string

type FieldEdge

type FieldEdge struct {
	Edge string
	// contains filtered or unexported fields
}

func (FieldEdge) Name

func (f FieldEdge) Name() string

func (FieldEdge) Pointer

func (f FieldEdge) Pointer() bool

func (FieldEdge) String

func (f FieldEdge) String() string

type FieldEnum

type FieldEnum struct {
	Typ string
	// contains filtered or unexported fields
}

func (FieldEnum) Name

func (f FieldEnum) Name() string

func (FieldEnum) Pointer

func (f FieldEnum) Pointer() bool

func (FieldEnum) String

func (f FieldEnum) String() string

type FieldID

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

func (FieldID) Name

func (f FieldID) Name() string

func (FieldID) Pointer

func (f FieldID) Pointer() bool

func (FieldID) String

func (f FieldID) String() string

type FieldNode

type FieldNode struct {
	Node string
	// contains filtered or unexported fields
}

func (FieldNode) Name

func (f FieldNode) Name() string

func (FieldNode) Pointer

func (f FieldNode) Pointer() bool

func (FieldNode) String

func (f FieldNode) String() string

type FieldNumeric

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

func (FieldNumeric) Name

func (f FieldNumeric) Name() string

func (FieldNumeric) Pointer

func (f FieldNumeric) Pointer() bool

func (FieldNumeric) String

func (f FieldNumeric) String() string

type FieldSlice

type FieldSlice struct {

	// Value  string
	Field Field
	// contains filtered or unexported fields
}

func (FieldSlice) Name

func (f FieldSlice) Name() string

func (FieldSlice) Pointer

func (f FieldSlice) Pointer() bool

func (FieldSlice) String

func (f FieldSlice) String() string

type FieldString

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

func (FieldString) Name

func (f FieldString) Name() string

func (FieldString) Pointer

func (f FieldString) Pointer() bool

func (FieldString) String

func (f FieldString) String() string

type FieldStruct

type FieldStruct struct {
	Struct string
	// contains filtered or unexported fields
}

func (FieldStruct) Name

func (f FieldStruct) Name() string

func (FieldStruct) Pointer

func (f FieldStruct) Pointer() bool

func (FieldStruct) String

func (f FieldStruct) String() string

type FieldTime

type FieldTime struct {
	IsCreatedAt bool
	IsUpdatedAt bool
	// contains filtered or unexported fields
}

func (FieldTime) Name

func (f FieldTime) Name() string

func (FieldTime) Pointer

func (f FieldTime) Pointer() bool

func (FieldTime) String

func (f FieldTime) String() string

type FieldURL added in v0.3.0

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

func (FieldURL) Name added in v0.3.0

func (f FieldURL) Name() string

func (FieldURL) Pointer added in v0.3.0

func (f FieldURL) Pointer() bool

func (FieldURL) String added in v0.3.0

func (f FieldURL) String() string

type FieldUUID

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

func (FieldUUID) Name

func (f FieldUUID) Name() string

func (FieldUUID) Pointer

func (f FieldUUID) Pointer() bool

func (FieldUUID) String

func (f FieldUUID) String() string

type Node

type Node struct {
	Name       string
	Fields     []Field
	Timestamps bool
}

type NumberType

type NumberType int32
const (
	NumberInt NumberType = iota
	NumberInt8
	NumberInt16
	NumberInt32
	NumberInt64
	//NumberUint
	NumberUint8
	NumberUint16
	NumberUint32
	//NumberUint64
	//NumberUintptr
	NumberFloat32
	NumberFloat64
	NumberRune
)

type Output

type Output struct {
	PkgPath    string
	Nodes      []*Node
	Edges      []*Edge
	Structs    []*Struct
	Enums      []*Enum
	EnumValues []*EnumValue
}

func Parse

func Parse(dir string) (*Output, error)

type Struct

type Struct struct {
	Name   string
	Fields []Field
}

Jump to

Keyboard shortcuts

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