Documentation
¶
Index ¶
- type AngularWriter
- type ClientWriter
- func (c *ClientWriter) WriteHeader(pkg, version string, needTime, needJSON bool, w io.Writer) error
- func (c *ClientWriter) WriteResource(resource *gen.Resource, w io.Writer) error
- func (c *ClientWriter) WriteResourceHeader(name string, w io.Writer)
- func (c *ClientWriter) WriteType(o *gen.ObjectDataType, w io.Writer)
- func (c *ClientWriter) WriteTypeSectionHeader(w io.Writer)
- type MetadataWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AngularWriter ¶
type AngularWriter struct {
// contains filtered or unexported fields
}
AngularWriter struct exposes methods to generate the angular JS services code
func NewAngularWriter ¶
func NewAngularWriter() (*AngularWriter, error)
NewAngularWriter creates a new code writer that generates angular.js types.
func (*AngularWriter) WriteResource ¶
WriteResource writes the code for a resource.
type ClientWriter ¶
type ClientWriter struct {
// contains filtered or unexported fields
}
ClientWriter struct exposes methods to generate the go API client code
func NewClientWriter ¶
func NewClientWriter() (*ClientWriter, error)
NewClientWriter is the client writer factory.
func (*ClientWriter) WriteHeader ¶
WriteHeader writes the header text.
func (*ClientWriter) WriteResource ¶
WriteResource writest the code for a resource.
func (*ClientWriter) WriteResourceHeader ¶
func (c *ClientWriter) WriteResourceHeader(name string, w io.Writer)
WriteResourceHeader writes the resource header.
func (*ClientWriter) WriteType ¶
func (c *ClientWriter) WriteType(o *gen.ObjectDataType, w io.Writer)
WriteType writest the type declaration for a resource action arguments.
func (*ClientWriter) WriteTypeSectionHeader ¶
func (c *ClientWriter) WriteTypeSectionHeader(w io.Writer)
WriteTypeSectionHeader writes the separator between resources and data types.
type MetadataWriter ¶
type MetadataWriter struct {
// contains filtered or unexported fields
}
MetadataWriter struct exposes methods to generate the go API client command line tool
func NewMetadataWriter ¶
func NewMetadataWriter() (*MetadataWriter, error)
NewMetadataWriter creates a new writer that generates metadata data structures.
func (*MetadataWriter) WriteHeader ¶
func (c *MetadataWriter) WriteHeader(pkg string, w io.Writer) error
WriteHeader writes the generic header text.
func (*MetadataWriter) WriteMetadata ¶
func (c *MetadataWriter) WriteMetadata(d *gen.APIDescriptor, w io.Writer) error
WriteMetadata writes the data structures that describe the API resources and actions.