api

package
v0.0.0-...-9fc37f3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TableName = "api"

TableName default api

Functions

func NewHTTPServer

func NewHTTPServer(opts ...component.Option) (component.Component, error)

NewHTTPServer new api service

func RegistCustomHandlers

func RegistCustomHandlers(name, path, method string, fn gin.HandlerFunc)

RegistCustomHandlers register customer's handlers

Types

type API

type API struct {
	ID             string `xorm:"id"`
	Name           string `xorm:"name"`
	ServiceDomain  string `xorm:"service_domain"`
	ServiceName    string `xorm:"service_name"`
	ServiceVersion string `xorm:"service_version"`
	Topic          string `xorm:"topic"`
	Status         string `xorm:"status"`
}

API api struct

func (*API) TableName

func (*API) TableName() string

TableName database table name

type InnerResult

type InnerResult struct {
	HTTPCode    int
	RedirectURL string
	Body        interface{}
}

InnerResult result of running component

type Response

type Response struct {
	TraceID   string      `json:"trace_id"`
	TraceIP   string      `json:"trace_ip"`
	Code      uint64      `json:"code"`
	Namespace string      `json:"namespace,omitempty"`
	Msg       string      `json:"msg,omitempty"`
	Result    interface{} `json:"result"`
}

Response response

Jump to

Keyboard shortcuts

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