Documentation
¶
Index ¶
- type Config
- func (c *Config) Data() map[string]string
- func (c *Config) Disable(name string) error
- func (c *Config) Enable(name string) error
- func (c *Config) Enabled(name string) bool
- func (c *Config) Events() (map[string]*Event, bool, error)
- func (c *Config) Models() (map[string]*Model, error)
- func (c *Config) Path(arg ...string) string
- func (c *Config) Root() string
- func (c *Config) Validate() error
- type Event
- type Field
- type Group
- type Model
- type Param
- type Route
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
File string `yaml:"-"`
Version string `yaml:"version,omitempty"`
Name string `yaml:"name,omitempty"`
Repo string `yaml:"repo,omitempty"`
Package string `yaml:"package,omitempty"`
Output string `yaml:"output,omitempty"`
Plugins struct {
Models bool `yaml:"models"`
Routes bool `yaml:"routes"`
Workers bool `yaml:"workers"`
Cache bool `yaml:"cache"`
Events bool `yaml:"events"`
} `yaml:"plugins"`
Definitions struct {
Models string `yaml:"models,omitempty"`
Routes string `yaml:"routes,omitempty"`
Events string `yaml:"events,omitempty"`
Workers string `yaml:"workers,omitempty"`
} `yaml:"definitions,omitempty"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type Event ¶ added in v0.10.0
type Event struct {
Name string `yaml:"name,omitempty"`
Channel string `yaml:"channel,omitempty"`
Receiver bool `yaml:"receiver"`
ExistingPayload string `yaml:"existing_payload,omitempty"`
ProxyTo string `yaml:"proxy_to,omitempty"`
ProxyType string `yaml:"proxy_type,omitempty"`
Fields []*Field `yaml:"fields,omitempty"` // create type
}
type Field ¶ added in v0.10.0
type Group ¶ added in v0.10.0
type Group struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
Rest bool `json:"rest,omitempty" yaml:"rest,omitempty"`
Routes []*Route `json:"routes,omitempty" yaml:"routes,omitempty"`
}
RouteFile corresponds to a Group of routes
func (*Group) CombinedRoutes ¶ added in v0.10.0
type Model ¶ added in v0.10.0
type Model struct {
Name string `yaml:"name,omitempty"`
Type string `yaml:"type,omitempty"`
QueryDefaults map[string]interface{} `yaml:"query_defaults,omitempty"`
Imports []string `yaml:"imports,omitempty"`
Fields []*Field `yaml:"fields,omitempty"`
}
func (*Model) QueryDefaultsString ¶ added in v0.10.2
type Param ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.