annotation

package module
v0.0.0-...-86b5199 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFromTag

func ExtractFromTag(annotate IAnnotation, tag string) error

Types

type AnnMap

type AnnMap map[string]IAnnotation

type IAnnotation

type IAnnotation interface {
	TagName() string
}

type StructAnnotations

type StructAnnotations struct {
	Spawners          map[string]reflectool.Spawner
	Field2Annotations map[string]AnnMap // field path => annotation name => annotation instance
}

func Analyze

func Analyze(prototype interface{}, annotations ...IAnnotation) (*StructAnnotations, error)

func (StructAnnotations) Get

func (sa StructAnnotations) Get(fieldName string, tagName string) IAnnotation

func (StructAnnotations) Spawn

func (sa StructAnnotations) Spawn(annotation IAnnotation) IAnnotation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL