Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAnnotation = errors.New("not a valid Annotation")
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation string
@Enum { Singleton Factory }
const ( // AnnotationSingleton is an Annotation of type Singleton. AnnotationSingleton Annotation = "Singleton" // AnnotationFactory is an Annotation of type Factory. AnnotationFactory Annotation = "Factory" )
func ParseAnnotation ¶
func ParseAnnotation(value string) (Annotation, error)
ParseAnnotation converts a string to an Annotation.
func (Annotation) IsValid ¶
func (x Annotation) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Annotation) String ¶
func (x Annotation) String() string
String implements the Stringer interface.
type PluginFactory ¶
type PluginFactory struct{}
@Singleton
func (*PluginFactory) Annotations ¶
func (f *PluginFactory) Annotations() map[string][]api.AnnotationType
func (*PluginFactory) New ¶
func (f *PluginFactory) New(typedAnnotations []*api.TypedAnnotation) (api.Generator, error)
func (*PluginFactory) Order ¶
func (f *PluginFactory) Order() api.Order
type PluginGenerator ¶
type PluginGenerator struct {
// contains filtered or unexported fields
}
func (*PluginGenerator) GetImports ¶
func (g *PluginGenerator) GetImports() []string
func (*PluginGenerator) WriteConst ¶
func (g *PluginGenerator) WriteConst(wr io.Writer) error
func (*PluginGenerator) WriteInitFunc ¶
func (g *PluginGenerator) WriteInitFunc(wr io.Writer) error
type Singleton ¶
type Singleton struct { Name string NamedOnly bool `value:"false"` UseConstructor bool `value:"false"` LocalGetter bool `value:"false"` LocalPrefix string `value:"__"` LocalGetterName string InitMethod string Init []string // contains filtered or unexported fields }
func (*Singleton) WriteString ¶
func (s *Singleton) WriteString(buf io.StringWriter) error
Click to show internal directories.
Click to hide internal directories.