annotation_service

package module
v0.0.0-...-bee5156 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

README

annotation-service

analyze interface annotation to service

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalysisFileService

func AnalysisFileService(file string, serviceName, namespace string) (apiAnnotate map[string]*ApiAnnotate, err error)

func AnalysisServiceWithFileToken

func AnalysisServiceWithFileToken(fileData []byte, serviceName, namespace string) (apiAnnotate map[string]*ApiAnnotate, err error)

Types

type AnnotateParser

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

type ApiAnnotate

type ApiAnnotate struct {
	Interface string
	Apis      []ApiAnnotateItem
}

type ApiAnnotateItem

type ApiAnnotateItem struct {
	Handler string
	Params  []string
	Returns []string
	Title   string
	Method  string
	Args    []string
	Options map[string]string
	Doc     []string
}

type Option

type Option func(*opt)

func WithIdent

func WithIdent(ident string) Option

type Options

type Options []Option

func (Options) Apply

func (os Options) Apply() *opt

type Service

type Service struct {
	InterfaceName string
	ServiceName   string
	Pkg           string
	OtherOptions  map[string]string
	ApiAnnotates  map[string]*ApiAnnotate
}

func GetAllService

func GetAllService(file string, opts ...Option) (res []Service, err error)

func (Service) GetPath

func (r Service) GetPath(apiDir string) (groupRoute, dir, pkg string)

Directories

Path Synopsis
service2api

Jump to

Keyboard shortcuts

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