annoparse

package
v0.0.0-...-2d29fd2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAnnoValuesFromTag

func ExtractAnnoValuesFromTag[TAnno IAnnotationObject](annoObj TAnno, tag string) error

Types

type AnnoTable

type AnnoTable[TAnno IAnnotationObject] map[FieldPath]TAnno

func ExtractAnno

func ExtractAnno[TAnno IAnnotationObject](targetObject any, defaultAnno TAnno) (AnnoTable[TAnno], error)

ExtractAnno create AnnoTable of TAnno : IAnnotationObject for each field of given targetObject's structure cache by tagName is recommended

func (AnnoTable[TAnno]) Get

func (table AnnoTable[TAnno]) Get(fieldPath FieldPath) (TAnno, bool)

type FieldPath

type FieldPath = string

type IAnnotationObject

type IAnnotationObject interface {
	TagName() string
}

type SelfRefTag

type SelfRefTag struct {
	Name string
}

func (*SelfRefTag) TagName

func (*SelfRefTag) TagName() string

Jump to

Keyboard shortcuts

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