models

package
v0.0.0-...-70ad6e6 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: EPL-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusDisable = 0
	StatusEnable  = 1
)

Variables

This section is empty.

Functions

func QueryAllActiveRoutes

func QueryAllActiveRoutes() (map[string]Route, error)

QueryAllActiveRoutes ORM 操作说明请查看 https://beego.me/docs/mvc/model/object.md

Types

type Route

type Route struct {
	Id         int    `orm:"column(id);pk" json:"id"`
	AppId      string `orm:"column(app_id)" json:"app_id"`
	UrlPath    string `orm:"column(url_path)" json:"url_path"`
	ServiceUrl string `orm:"column(service_url)" json:"service"`
	RateLimit  int    `orm:"column(rate_limit)" json:"rate_limit"`
	Timeout    int    `orm:"column(timeout)" json:"timeout"`
	Status     int    `orm:"column(status)" json:"status"`
	Timestamp  string `orm:"column(timestamp)" json:"timestamp"`
}

Route 定义模型结构体,属性大写开头表示public权限,小写为私有

func (*Route) TableName

func (t *Route) TableName() string

Jump to

Keyboard shortcuts

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