example

package
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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param struct {
	String  string
	Int     int
	Float32 float32
}

type Ret

type Ret struct {
	Data interface{} `json:"data"`
	Msg  string      `json:"msg"`
	Code int         `json:"code"`
}

type TestService

type TestService interface {
	// add func
	// @http(method=get,route="/add")
	Add(ctx context.Context, param Param) (res int, err error)
}

@service(test)

type TestService2

type TestService2 interface {
	// This is title
	//
	// Doc for 1
	// @test:http.get(route="/add")
	//
	// Doc for 2
	// @test:http.delete(route="/:add2")
	//
	// @test2:http.get("/add3","/add4")
	//
	// ignore this
	// ignore this
	Add2(ctx context.Context, param Param) (res Ret, err error)
	// dec func
	// Doc for 1
	// @http.post(method=post,route="/dec")
	Dec(ctx context.Context, param Param) (err error)
	// dec func
	// Doc for 1
	// @http.get(method=post,route="/:dec")
	Dec2(ctx context.Context, param Param)

	// ignore this
	// @test2:http.post(method=get,route="/dec")
	TestService
}

@service(test) @service(test2)

type TestService3

type TestService3 interface {
	// add func
	// @http(method=get,route="/add")
	Add(ctx context.Context, param Param) (res int, err error)
}

@service(test)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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