Documentation ¶
Index ¶
- func ClearRegisteredAnnotations()
- func RegisterAnnotation(name string, paramNames []string, validator ValidationFunc)
- func RegisterAnnotationExt(fullLine bool, name string, paramNames []string, validator ValidationFunc)
- func RegisterAnnotationLine(name string, paramNames []string, validator ValidationFunc)
- func RegisterAnnotations(ann ...AnnotationDescriptor)
- type Annotation
- type AnnotationDescriptor
- type AnnotationRegister
- type ValidationFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearRegisteredAnnotations ¶
func ClearRegisteredAnnotations()
func RegisterAnnotation ¶
func RegisterAnnotation(name string, paramNames []string, validator ValidationFunc)
func RegisterAnnotationExt ¶
func RegisterAnnotationExt(fullLine bool, name string, paramNames []string, validator ValidationFunc)
Odnotuj wspierająca anotacja do wlasnego parsowania (bez nawiasów) wymagane fullline=true @Anotacja
func RegisterAnnotationLine ¶
func RegisterAnnotationLine(name string, paramNames []string, validator ValidationFunc)
Odnotuj wspierająca anotacja do wlasnego parsowania (bez nawiasów) wymagane fullline=true
func RegisterAnnotations ¶
func RegisterAnnotations(ann ...AnnotationDescriptor)
Types ¶
type Annotation ¶
type Annotation struct { Name string // dla wsparcia anotacij bez nawiasow, tj // @Anotacja LineValue string IsFullLine bool Param string Attributes map[string]string }
func (Annotation) IsFullLineWithContent ¶
func (a Annotation) IsFullLineWithContent() bool
func (Annotation) IsSetAttribute ¶
func (a Annotation) IsSetAttribute(name string) bool
type AnnotationDescriptor ¶
type AnnotationRegister ¶
type AnnotationRegister interface { ResolveAnnotations(annotationDocline []string) []Annotation ResolveAnnotationByName(annotationDocline []string, name string) (Annotation, bool) ResolveAnnotation(annotationDocline string) (Annotation, bool) ResolveAllAnnotationByName(annotationDocline []string, name string) ([]Annotation, bool) ResolveFullLineAllAnnotationByName(annotationDocline []string, name string) ([]string, bool) }
func NewGlobalRegistry ¶
func NewGlobalRegistry() AnnotationRegister
func NewRegistry ¶
func NewRegistry(descriptors []AnnotationDescriptor) AnnotationRegister
type ValidationFunc ¶
type ValidationFunc func(annot Annotation) bool
func Ok ¶
func Ok(name string) ValidationFunc
Click to show internal directories.
Click to hide internal directories.