Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
ServiceName string `json:"name"`
Operators map[string]*OperatorGroup `json:"operators"`
Models map[string]*OperatorModel `json:"models"`
Enums map[string]Enum `json:"enums"`
}
func (*Api) AddGroup ¶
func (a *Api) AddGroup(name string) *OperatorGroup
func (*Api) AddModel ¶
func (a *Api) AddModel(model *OperatorModel)
func (*Api) GetGroup ¶
func (a *Api) GetGroup(name string) *OperatorGroup
func (*Api) WalkOperators ¶
func (a *Api) WalkOperators(walker func(g *OperatorGroup))
type Enum ¶
type Enum enumeration.Enum
type OperatorField ¶
type OperatorGroup ¶
type OperatorGroup struct {
Name string `json:"name"`
Path string `json:"path"`
Methods map[string]*OperatorMethod `json:"methods"`
IsPush bool `json:"isPush"`
}
func NewOperatorGroup ¶
func NewOperatorGroup(name, path string) *OperatorGroup
func (*OperatorGroup) AddMethod ¶
func (g *OperatorGroup) AddMethod(method *OperatorMethod)
func (*OperatorGroup) AddMethods ¶
func (g *OperatorGroup) AddMethods(methods ...*OperatorMethod)
func (*OperatorGroup) WalkMethods ¶
func (g *OperatorGroup) WalkMethods(walker func(m *OperatorMethod))
type OperatorMethod ¶
type OperatorMethod struct {
Group *OperatorGroup `json:"-"`
Name string `json:"name"`
Path string `json:"path"`
Inputs []string `json:"inputs"`
Outputs []string `json:"outputs"`
}
func NewOperatorMethod ¶
func NewOperatorMethod(group *OperatorGroup, name, path string) *OperatorMethod
func (*OperatorMethod) AddInput ¶
func (m *OperatorMethod) AddInput(model *OperatorModel)
func (*OperatorMethod) AddOutput ¶
func (m *OperatorMethod) AddOutput(model *OperatorModel)
func (*OperatorMethod) WalkInputs ¶
func (m *OperatorMethod) WalkInputs(walker func(i string))
func (*OperatorMethod) WalkOutputs ¶
func (m *OperatorMethod) WalkOutputs(walker func(i string))
type OperatorModel ¶
type OperatorModel struct {
ID string `json:"id"`
Name string `json:"name"`
Package string `json:"package"`
Fields []OperatorField `json:"fields,omitempty"`
NeedAlias bool `json:"needAlias"`
}
func NewOperatorModel ¶
func NewOperatorModel(name string, pkgID string) OperatorModel
func NewTimeModel ¶
func NewTimeModel() OperatorModel
func (*OperatorModel) AddField ¶
func (m *OperatorModel) AddField(key, keyType, tag, alias, ipt string, pointer bool)
func (*OperatorModel) WalkFields ¶
func (m *OperatorModel) WalkFields(walker func(f OperatorField))
Click to show internal directories.
Click to hide internal directories.