def

package
v0.0.0-...-091dabd Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any struct{}

func (Any) Code

func (a Any) Code() gen.Code

func (Any) Nullable

func (a Any) Nullable() Type

func (Any) String

func (a Any) String() string

type Array

type Array struct {
	Element Type // element type
}

func (Array) Code

func (a Array) Code() gen.Code

func (Array) Nullable

func (a Array) Nullable() Type

func (Array) String

func (a Array) String() string

type Bool

type Bool struct {
	Pointer bool
}

func (Bool) Code

func (b Bool) Code() gen.Code

func (Bool) Nullable

func (b Bool) Nullable() Type

func (Bool) String

func (b Bool) String() string

type Context

type Context struct {
	scanner.Scanner
	conv.CamelCaseConverter
}

func From

func From(s string, allCaps ...string) *Context

func FromBytes

func FromBytes(data []byte, allCaps ...string) *Context

func (*Context) Declare

func (c *Context) Declare(name string) (*gen.Statement, error)

func (*Context) Type

func (c *Context) Type() (Type, error)

type Field

type Field struct {
	Name      string // field name
	Key       string // json key
	Type      Type
	OmitEmpty bool
}

func (Field) Code

func (f Field) Code() gen.Code

func (Field) Options

func (f Field) Options() string

func (Field) String

func (f Field) String() string

type Float

type Float struct {
	Pointer bool
}

func (Float) Code

func (f Float) Code() gen.Code

func (Float) Nullable

func (f Float) Nullable() Type

func (Float) String

func (f Float) String() string

type Int

type Int struct {
	Pointer bool
}

func (Int) Code

func (i Int) Code() gen.Code

func (Int) Nullable

func (i Int) Nullable() Type

func (Int) String

func (i Int) String() string

type Map

type Map struct {
	Key   Type // key type: string or int
	Value Type // value type
}

func (Map) Code

func (m Map) Code() gen.Code

func (Map) Nullable

func (m Map) Nullable() Type

func (Map) String

func (m Map) String() string

type String

type String struct {
	Pointer bool
}

func (String) Code

func (s String) Code() gen.Code

func (String) Nullable

func (s String) Nullable() Type

func (String) String

func (s String) String() string

type Struct

type Struct struct {
	Fields  []*Field
	Pointer bool
	conv.CamelCaseConverter
}

func (Struct) Code

func (s Struct) Code() gen.Code

func (Struct) Naming

func (s Struct) Naming()

func (Struct) Nullable

func (s Struct) Nullable() Type

func (Struct) String

func (s Struct) String() string

type Type

type Type interface {
	fmt.Stringer
	Code() gen.Code
	Nullable() Type
}

type TypeDecl

type TypeDecl struct {
	Name string
	Type Type
}

func (TypeDecl) String

func (t TypeDecl) String() string

Jump to

Keyboard shortcuts

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