Documentation ¶
Index ¶
- Constants
- func GetImportDefaultLabel(source string) string
- type Docblock
- type Function
- type Import
- type ImportSet
- func (s *ImportSet) Add(imports ...cgi.ImportInterface) (*ImportSet, error)
- func (s *ImportSet) AddValues(imports []cgi.ImportInterface) (*ImportSet, error)
- func (s *ImportSet) Generate(ctx cgi.ContextInterface) (cgi.NodeOutputInterface, error)
- func (s *ImportSet) GetNamespaceForImport(imp cgi.ImportInterface) string
- func (s *ImportSet) ImportMap() map[string]cgi.ImportInterface
- func (s *ImportSet) MergeWith(other cgi.ImportSetInterface) (*ImportSet, error)
- func (s *ImportSet) ToString(ctx cgi.ContextInterface) (string, error)
- type LineComment
- type NamedType
- type RawText
- type Struct
- type StructProperty
- type Type
Constants ¶
View Source
const DefaultCommentPrefix = " "
View Source
const DefaultGeneratedBy = "by unspecified script;"
Variables ¶
This section is empty.
Functions ¶
func GetImportDefaultLabel ¶
Types ¶
type Docblock ¶
type Docblock struct {
// contains filtered or unexported fields
}
func NewDocBlock ¶
func (*Docblock) Generate ¶
func (b *Docblock) Generate(c cgi.ContextInterface) (cgi.NodeOutputInterface, error)
func (*Docblock) ToInterface ¶
func (b *Docblock) ToInterface() cgi.NodeInterface
type Import ¶
type Import struct {
// contains filtered or unexported fields
}
func (*Import) DefaultLabel ¶
type ImportSet ¶
type ImportSet struct {
// contains filtered or unexported fields
}
func NewImportSet ¶
func NewImportSet(imports ...cgi.ImportInterface) *ImportSet
func (*ImportSet) AddValues ¶
func (s *ImportSet) AddValues(imports []cgi.ImportInterface) (*ImportSet, error)
func (*ImportSet) Generate ¶
func (s *ImportSet) Generate(ctx cgi.ContextInterface) (cgi.NodeOutputInterface, error)
func (*ImportSet) GetNamespaceForImport ¶
func (s *ImportSet) GetNamespaceForImport(imp cgi.ImportInterface) string
type LineComment ¶
type LineComment struct {
// contains filtered or unexported fields
}
func NewGeneratedFileLineComment ¶
func NewGeneratedFileLineComment(generatedBy string) *LineComment
Example: "Code generated by my-generator-script; DO NOT EDIT."
func NewGoGenerateLineComment ¶
func NewGoGenerateLineComment(command string) *LineComment
func NewLineComment ¶
func NewLineComment(comment string, args ...interface{}) *LineComment
func (*LineComment) Generate ¶
func (c *LineComment) Generate(ctx cgi.ContextInterface) (cgi.NodeOutputInterface, error)
func (*LineComment) NoSpaceAfterSlash ¶
func (c *LineComment) NoSpaceAfterSlash() *LineComment
func (*LineComment) SetSpaceAfterSlash ¶
func (c *LineComment) SetSpaceAfterSlash(value bool) *LineComment
func (*LineComment) ToString ¶
func (c *LineComment) ToString(ctx cgi.ContextInterface) (string, error)
type NamedType ¶
type NamedType struct { Name string Type cgi.TypeInterface }
type RawText ¶
type RawText struct {
// contains filtered or unexported fields
}
func NewRawText ¶
func (*RawText) Generate ¶
func (r *RawText) Generate(ctx cgi.ContextInterface) (cgi.NodeOutputInterface, error)
type Struct ¶
type Struct struct { Name string // todo: generics Functions []string StructProperties []*StructProperty }
type StructProperty ¶
type StructProperty struct { Name string // todo: generics Type cgi.TypeInterface }
func (*StructProperty) Generate ¶
func (p *StructProperty) Generate(ctx cgi.ContextInterface) (cgi.NodeOutputInterface, error)
func (*StructProperty) ToString ¶
func (p *StructProperty) ToString(ctx cgi.ContextInterface) (string, error)
Click to show internal directories.
Click to hide internal directories.