model

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenTmpl string

Functions

This section is empty.

Types

type Field

type Field struct {
	Name Name
	Type Type
}

func MakeField

func MakeField(name Name, type_ Type) Field

func NewField

func NewField(name Name, type_ Type) *Field

type File

type File struct {
	Package string
	Imports []Import
	Structs []Struct
}

func MakeFile

func MakeFile(package_ string, imports []Import, structs []Struct) File

func NewFile

func NewFile(package_ string, imports []Import, structs []Struct) *File

type Import

type Import struct {
	Name string
	Path string
}

func MakeImport

func MakeImport(name string, path string) Import

func NewImport

func NewImport(name string, path string) *Import

type Name

type Name struct {
	// フィールド名
	Original string
	// 変数として使う名称(e.g. ID->id, Name->name, LongName->longName)
	Argument string
}

func MakeName

func MakeName(original string, argument string) Name

func NewName

func NewName(original string, argument string) *Name

type Prefix

type Prefix string

func (Prefix) Add

func (p Prefix) Add(following string) Prefix

type Struct

type Struct struct {
	Name      string
	Fields    []Field
	IsPrivate bool
}

func MakeStruct

func MakeStruct(name string, fields []Field, isPrivate bool) Struct

func NewStruct

func NewStruct(name string, fields []Field, isPrivate bool) *Struct

type Type

type Type struct {
	IsStar  bool
	Prefix  Prefix
	Package string
	Name    string
}

func MakeType

func MakeType(isStar bool, prefix Prefix, package_ string, name string) Type

func NewType

func NewType(isStar bool, prefix Prefix, package_ string, name string) *Type

Jump to

Keyboard shortcuts

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