annotation

package
v0.0.0-...-85076c6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ANNO_MIDDLEWARE = "middleware"
View Source
const ANNO_ROUTER = "router"
View Source
const ANNO_ROUTERGROUP = "routergroup"

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnoType

type AnnoType int
const (
	Initiale AnnoType = iota
	AnnoName
	AttrName
	AttrValue
	Done
)

type Annotation

type Annotation struct {
	Name  string            `json:"name"`
	Attrs map[string]string `json:"attrs"`
}

type Middleware

type Middleware struct {
	Name string `json:"name"`
}

func ParseMiddleware

func ParseMiddleware(docLine string) (Middleware, error)

ParseMiddleware get Middleware from comments

type Router

type Router struct {
	Path       string `json:"path"`
	Method     string `json:"method"`
	Middleware string `json:"middleware"`
	Namespace  string `json:"namespace"`
	Context    string `json:"context"`
}

func ParseRouter

func ParseRouter(docLine string) (Router, error)

ParseRouter get router from comments

type RouterGroup

type RouterGroup struct {
	Prefix     string `json:"prefix"`
	Middleware string `json:"middleware"`
	Namespace  string `json:"namespace"`
}

func ParseRouterGroup

func ParseRouterGroup(docLine string) (RouterGroup, error)

ParseRouterGroup get routergroup from comments

Jump to

Keyboard shortcuts

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