model

package
v0.0.0-...-1fa5987 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

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

func (*Field) Doc

func (field *Field) Doc() string

func (*Field) Name

func (field *Field) Name() string

func (*Field) Nullable

func (field *Field) Nullable() bool

func (*Field) Required

func (field *Field) Required() bool

func (*Field) Type

func (field *Field) Type() string

type FieldConfig

type FieldConfig struct {
	Name     string
	Doc      string
	Type     string // TODO: Type type.
	Required bool
	Nullable bool
}

type Interface

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

func (*Interface) AddError

func (iface *Interface) AddError(err error)

func (*Interface) AllMethods

func (iface *Interface) AllMethods() []*Method

func (*Interface) DeclareMethod

func (iface *Interface) DeclareMethod(name string) *Method

func (*Interface) Doc

func (iface *Interface) Doc() string

func (*Interface) Extend

func (iface *Interface) Extend(extended *Interface)

func (*Interface) Extends

func (iface *Interface) Extends() []*Interface

func (*Interface) Methods

func (iface *Interface) Methods() []*Method

func (*Interface) Name

func (iface *Interface) Name() string

func (*Interface) SetDoc

func (iface *Interface) SetDoc(value string)

type Method

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

func (*Method) AddInput

func (method *Method) AddInput(cfg FieldConfig) *Field

func (*Method) AddOutput

func (method *Method) AddOutput(cfg FieldConfig) *Field

func (*Method) Doc

func (method *Method) Doc() *string

func (*Method) Inputs

func (method *Method) Inputs() []*Field

func (*Method) Name

func (method *Method) Name() string

func (*Method) Outputs

func (method *Method) Outputs() []*Field

func (*Method) SetDoc

func (method *Method) SetDoc(value *string)

type Named

type Named interface {
	Name() string
}

type Package

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

func NewPackage

func NewPackage(path string) *Package

func (*Package) AddError

func (pkg *Package) AddError(err error)

func (*Package) DeclareInterface

func (pkg *Package) DeclareInterface(name string) *Interface

func (*Package) DeclareStruct

func (pkg *Package) DeclareStruct(name string) *Struct

func (*Package) Err

func (pkg *Package) Err() error

func (*Package) Interfaces

func (pkg *Package) Interfaces() []*Interface

func (*Package) Path

func (pkg *Package) Path() string

func (*Package) ReferInterface

func (pkg *Package) ReferInterface(name string) *Interface

func (*Package) ReferStruct

func (pkg *Package) ReferStruct(name string) *Struct

func (*Package) Structs

func (pkg *Package) Structs() []*Struct

type Struct

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

func (*Struct) AddField

func (strct *Struct) AddField(cfg FieldConfig) *Field

func (*Struct) Doc

func (strct *Struct) Doc() string

func (*Struct) Fields

func (strct *Struct) Fields() []*Field

func (*Struct) Name

func (strct *Struct) Name() string

func (*Struct) SetDoc

func (strct *Struct) SetDoc(value string)

Jump to

Keyboard shortcuts

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