domain

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method struct {
	Func        *types.Func
	Field       *ast.Field
	Annotations *MethodAnnotations
	// contains filtered or unexported fields
}

type MethodAnnotations

type MethodAnnotations struct {
	HTTPMethod string `jk:"http-method"`
	HTTPPath   string `jk:"http-path"`
}

type Service

type Service struct {
	Interface   *types.Named
	GenDecl     *ast.GenDecl        // 如果是 type ( /* document here */ xxx interface )
	TypeSpec    *ast.TypeSpec       // 如果是 /* document here */ type xxx interface
	Annotations *ServiceAnnotations // 以@开头写在注释里的注解

	Methods []*Method // 预先解析好的 method 列表
}

func ParseInterfaceData

func ParseInterfaceData(pkg *types.Package, astPkg *ast.Package, name string) (*Service, error)

type ServiceAnnotations

type ServiceAnnotations struct {
	SwaggerInfoAPIVersion string `jk:"swagger-info-api-version"`
	SwaggerInfoAPITitle   string `jk:"swagger-info-api-title"`
	HTTPBasePath          string `jk:"http-base-path"`
}

Jump to

Keyboard shortcuts

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