Documentation
¶
Index ¶
- Constants
- func GetCastProperty[TPropertyType any](attrib *Attribute, property string) (*TPropertyType, error)
- type AnnotationHolder
- func (holder AnnotationHolder) FindFirstByProperty(key string, value string) *Attribute
- func (holder AnnotationHolder) FindFirstByValue(value string) *Attribute
- func (holder AnnotationHolder) GetAll(attribute string) []*Attribute
- func (holder AnnotationHolder) GetDescription() string
- func (holder AnnotationHolder) GetFirst(attribute string) *Attribute
- func (holder AnnotationHolder) GetFirstDescriptionOrEmpty(attribute string) string
- func (holder AnnotationHolder) GetFirstValueOrEmpty(attribute string) string
- func (holder AnnotationHolder) Has(attribute string) bool
- type Attribute
- type NonAttributeComment
Constants ¶
View Source
const ( PropertyName = "name" PropertySecurityScopes = "scopes" PropertyValidatorString = "validate" )
View Source
const ( AttributeTag = "Tag" AttributeQuery = "Query" AttributePath = "Path" AttributeBody = "Body" AttributeHeader = "Header" AttributeDeprecated = "Deprecated" AttributeHidden = "Hidden" AttributeSecurity = "Security" AttributeAdvancedSecurity = "AdvancedSecurity" AttributeRoute = "Route" AttributeResponse = "Response" AttributeDescription = "Description" AttributeMethod = "Method" AttributeErrorResponse = "ErrorResponse" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnnotationHolder ¶
type AnnotationHolder struct {
// contains filtered or unexported fields
}
func NewAnnotationHolder ¶
func NewAnnotationHolder(comments []string) (AnnotationHolder, error)
func (AnnotationHolder) FindFirstByProperty ¶
func (holder AnnotationHolder) FindFirstByProperty(key string, value string) *Attribute
func (AnnotationHolder) FindFirstByValue ¶
func (holder AnnotationHolder) FindFirstByValue(value string) *Attribute
func (AnnotationHolder) GetAll ¶
func (holder AnnotationHolder) GetAll(attribute string) []*Attribute
func (AnnotationHolder) GetDescription ¶
func (holder AnnotationHolder) GetDescription() string
func (AnnotationHolder) GetFirst ¶
func (holder AnnotationHolder) GetFirst(attribute string) *Attribute
func (AnnotationHolder) GetFirstDescriptionOrEmpty ¶
func (holder AnnotationHolder) GetFirstDescriptionOrEmpty(attribute string) string
func (AnnotationHolder) GetFirstValueOrEmpty ¶
func (holder AnnotationHolder) GetFirstValueOrEmpty(attribute string) string
func (AnnotationHolder) Has ¶
func (holder AnnotationHolder) Has(attribute string) bool
type NonAttributeComment ¶
Click to show internal directories.
Click to hide internal directories.