annotation

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation interface {
	Type() Type
}

type ConsumeAnnotation

type ConsumeAnnotation struct {
	ContentType string
}

func (*ConsumeAnnotation) Type

func (a *ConsumeAnnotation) Type() Type

type DescriptionAnnotation

type DescriptionAnnotation struct {
	Text string
}

func (*DescriptionAnnotation) Type

func (a *DescriptionAnnotation) Type() Type

type IdAnnotation

type IdAnnotation struct {
	Text string
}

func (*IdAnnotation) Type

func (a *IdAnnotation) Type() Type

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(code string) *Lexer

func (*Lexer) Lex

func (l *Lexer) Lex() (tokens []*Token, err error)

type ParseError

type ParseError struct {
	Column  int
	Message string
}

func NewParseError

func NewParseError(column int, message string) *ParseError

func (*ParseError) Error

func (e *ParseError) Error() string

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(text string) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (Annotation, error)

type ProduceAnnotation

type ProduceAnnotation struct {
	ContentType string
}

func (*ProduceAnnotation) Type

func (a *ProduceAnnotation) Type() Type

type SecurityAnnotation

type SecurityAnnotation struct {
	Name   string
	Params []string
}

func (*SecurityAnnotation) Type

func (a *SecurityAnnotation) Type() Type

type SimpleAnnotation

type SimpleAnnotation struct {
	// contains filtered or unexported fields
}

func (*SimpleAnnotation) Type

func (a *SimpleAnnotation) Type() Type

type SummaryAnnotation

type SummaryAnnotation struct {
	Text string
}

func (*SummaryAnnotation) Type

func (a *SummaryAnnotation) Type() Type

type TagAnnotation

type TagAnnotation struct {
	Tag string
}

func (*TagAnnotation) Type

func (a *TagAnnotation) Type() Type

type Token

type Token struct {
	Type  TokenType
	Image string
}

type TokenType

type TokenType int

type Type

type Type int
const (
	Required Type = iota + 1
	Consume
	Produce
	Unresolved
	Ignore
	Tag
	Description
	Summary
	ID
	Deprecated
	Security
)

type UnresolvedAnnotation

type UnresolvedAnnotation struct {
	Tag    string
	Tokens []*Token
}

func (*UnresolvedAnnotation) Type

func (a *UnresolvedAnnotation) Type() Type

Jump to

Keyboard shortcuts

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