route

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSSA

func BuildSSA(c *gin.Context)

BuildSSA serves the code send by user and builds its SSA IR into html. TODO: speedup for request response, e.g. as async rest api.

func Pong

func Pong(c *gin.Context)

Pong response for health check

func Register

func Register() *gin.Engine

Register routers

Types

type BuildSSAInput

type BuildSSAInput struct {
	FuncName string `json:"funcname"`
	GcFlags  string `json:"gcflags"`
	Code     string `json:"code"`
}

type BuildSSAOutput

type BuildSSAOutput struct {
	BuildID string `json:"build_id"`
	Msg     string `json:"msg"`
}

type PingInput

type PingInput struct {
}

PingInput is a a reserved structure

type PingOutput

type PingOutput struct {
	Message   string `json:"message"`
	GoVersion string `json:"go_version"`
}

PingOutput is used for service health

type Router

type Router struct {
	Engine *gin.Engine
}

func (*Router) SetupAPI

func (r *Router) SetupAPI()

func (*Router) SetupApp

func (r *Router) SetupApp()

func (*Router) SetupProfile

func (r *Router) SetupProfile()

profile the standard HandlerFuncs from the net/http/pprof package with the provided gin.Engine. prefixOptions is a optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.

Basic Usage:

Jump to

Keyboard shortcuts

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