gotygen/pkg/document/interfaces.go

62 lines
649 B
Go

package document
import "fmt"
type Type interface {
fmt.Stringer
Nullable(v ...bool) Type
IsNullable() bool
}
type Any interface {
Type
}
type Ref interface {
Type
Id() string
}
type Int interface {
Type
}
type Float interface {
Type
}
type Bool interface {
Type
}
type String interface {
Type
}
type Array interface {
Type
Element(e ...Type) Type
}
type Map interface {
Type
Key(k ...Type) Type
Value(v ...Type) Type
}
type Struct interface {
Type
Set(field *Field) Struct
Get(key string) (*Field, bool)
Fields() []*Field
Keys() []string
Len() int
}
type DeclaredType interface {
Type
Id() string
Type() Type
}