Documentation ¶
Index ¶
- func ChildProperties(Properties map[string]interface{}) []raml.Property
- func GenerateAllClasses(apiDef *raml.APIDefinition, dir string, capnp bool) ([]string, error)
- func GeneratePythonCapnpClasses(apiDef *raml.APIDefinition, dir string) error
- func NewServer(kind string, apiDef *raml.APIDefinition, apiDocsDir, targetDir string, ...) generator.Server
- type Client
- type FlaskServer
- type SanicServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChildProperties ¶
ChildProperties returns child properties of a property
func GenerateAllClasses ¶
generate all python classes from a RAML document
func GeneratePythonCapnpClasses ¶
func GeneratePythonCapnpClasses(apiDef *raml.APIDefinition, dir string) error
GeneratePythonCapnpClasses generates python classes from a raml definition along with function to load binaries from/to capnp and generates the needed capnp schemas
Types ¶
type Client ¶
type Client struct { Name string APIDef *raml.APIDefinition BaseURI string Classes []string Services map[string]*service Kind string Template clientTemplate UnmarshallResponse bool // true if response body should be unmarshalled into python class Securities []pythonSecurity }
Client represents a python client
func NewClient ¶
func NewClient(apiDef *raml.APIDefinition, kind string, unmarshallResponse bool) Client
NewClient creates a python Client
func (Client) ClientKind ¶
type FlaskServer ¶
type FlaskServer struct { APIDef *raml.APIDefinition Title string ResourcesDef []pythonResource WithMain bool Gevent bool Template serverTemplate Name string // contains filtered or unexported fields }
FlaskServer represents a flask server
func NewFlaskServer ¶
func NewFlaskServer(apiDef *raml.APIDefinition, apiDocsDir, targetDir string, withMain bool, libRootURLs []string, gevent bool, name string) *FlaskServer
NewFlaskServer creates new flask server from an RAML file
func (*FlaskServer) APIDocsDir ¶
func (ps *FlaskServer) APIDocsDir() string
APIDocsDir implements generator.Server.APIDocsDir interface
func (*FlaskServer) Generate ¶
func (ps *FlaskServer) Generate() error
Generate implements generator.Server.Generate interface
func (*FlaskServer) ShowAPIDocsAndIndex ¶
func (ps *FlaskServer) ShowAPIDocsAndIndex() bool
type SanicServer ¶
type SanicServer struct { APIDef *raml.APIDefinition Title string ResourcesDef []pythonResource Template serverTemplate // contains filtered or unexported fields }
SanicServer represents a sanic asyncio server
func NewSanicServer ¶
func NewSanicServer(apiDef *raml.APIDefinition, apiDocsDir, targetDir string, withMain bool, libRootURLs []string) *SanicServer
NewSanicServer creates new sanic server from an RAML file
func (*SanicServer) APIDocsDir ¶
func (s *SanicServer) APIDocsDir() string
APIDocsDir implements generator.Server.APIDocsDir interface
func (*SanicServer) Generate ¶
func (s *SanicServer) Generate() error
Generate implements generator.Server.Generate interface
func (*SanicServer) ShowAPIDocsAndIndex ¶
func (s *SanicServer) ShowAPIDocsAndIndex() bool
Source Files ¶
- class.go
- class_init.go
- client.go
- client_method.go
- client_template.go
- enum.go
- field.go
- flask_resource.go
- flask_server.go
- jsonschema.go
- libraries.go
- method.go
- resources.go
- sanic_resource.go
- sanic_server.go
- security.go
- server.go
- server_method.go
- server_resources.go
- server_template.go
- service.go
- types.go