define

package
v0.0.0-...-cc63be1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-15 22:30

Package define ...

Description : app表

Author : [email protected]<白茶清欢>

Date : 2021-09-18 2:06 下午

Package define ...

Description : app 访问 api 授权信息表

Author : [email protected]<白茶清欢>

Date : 2021-09-18 4:22 下午

Package define ...

Description : dao...

Author : [email protected]<白茶清欢>

Date : 2021-09-17 10:44 上午

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2022-01-02 8:34 PM

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2022-01-02 8:10 PM

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2022-01-31 9:21 下午

Package define ...

Description : 操作记录表

Author : [email protected]<白茶清欢>

Date : 2021-10-08 3:47 下午

Package define...

Description : define...

Author : [email protected]<白茶清欢>

Date : 2021-09-26 2:22 下午

Package define...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2021-09-26 2:26 下午

Package define...

Description : define...

Author : [email protected]<白茶清欢>

Date : 2021-09-26 2:33 下午

Package define ...

Author: [email protected]<白茶清欢>

Description: method 表相关定义

File: method.go

Version: 1.0.0

Date: 2020/07/25 12:52:15

Package define ...

Author: [email protected]<白茶清欢>

Description: project 表相关定义

File: project.go

Version: 1.0.0

Date: 2020/07/25 13:11:08

Package define ...

Author: [email protected]<白茶清欢>

Description: project_api 表相关定义

File: project_api.go

Version: 1.0.0

Date: 2020/07/25 14:36:48

Package define ...

Author: [email protected]<白茶清欢>

Description: project_api_param 表相关定义

File: project_api_param.go

Version: 1.0.0

Date: 2020/07/25 18:30:07

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2022/01/11 9:40 PM

Package define ...

Author: [email protected]<白茶清欢>

Description: scheme 表相关定义

File: scheme.go

Version: 1.0.0

Date: 2020/07/25 12:35:29

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-28 17:09

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-03-07 14:25

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-15 22:16

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-15 22:21

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-15 22:25

Package define ...

Description : define ...

Author : [email protected]<白茶清欢>

Date : 2023-02-18 22:47

Index

Constants

View Source
const (
	// AdminApiStatusNormal 正常
	AdminApiStatusNormal = 0
	// AdminApiStatusForbidden 禁用
	AdminApiStatusForbidden = 1
	// AdminApiStatusOffline 下线
	AdminApiStatusOffline = 2
)
View Source
const (
	AdminApiCheckLoginNo  = 0
	AdminApiCheckLoginYes = 1
)
View Source
const (
	// AppStatusInit 初始化状态
	AppStatusInit = 0
	// AppStatusUsing 使用中
	AppStatusUsing = 1
	// AppStatusForbidden 禁用
	AppStatusForbidden = 2
	// AppStatusDelete 删除
	AppStatusDelete = 3
)

当前状态 0 - 初始化 1- 使用中 2 - 禁用 3 - 删除

View Source
const (
	// DBTableProject 项目表名
	DBTableProject = "project"

	// DBTableScheme scheme表
	DBTableScheme = "scheme"

	// DBTableMethod method表
	DBTableMethod = "method"

	// DBTableContentType content_type表
	DBTableContentType = "content_type"

	// DBTableLog 操作日志表
	DBTableLog = "log"

	// DBTableProjectApi project_api表
	DBTableProjectApi = "project_api"

	// DBTableProjectApiParam api参数信息表
	DBTableProjectApiParam = "project_api_param"

	// DBTableProjectApiResult 项目API返回结果表
	DBTableProjectApiResult = "project_api_result"

	// DBTableGatewayApi 网关API
	DBTableGatewayApi = "gateway_api"

	// DBTableGatewayApiParam 网关API参数
	DBTableGatewayApiParam = "gateway_api_param"

	// DBTableGatewayApiResult ...
	DBTableGatewayApiResult = "gateway_api_result"

	// DBTableAPP app表
	DBTableAPP = "app"

	// DBTableAppApiPermission app 的api授权表
	DBTableAppApiPermission = "app_api_permission"

	// DBTableMeshAPI mesh_api表
	DBTableMeshAPI = "mesh_api"

	// DBTableMeshAPIConfig mesh_api_config表
	DBTableMeshAPIConfig = "mesh_api_config"

	// DBTableMeshAPIResult mesh_api_result 表结构
	DBTableMeshAPIResult = "mesh_api_result"

	// DBTableUser ...
	DBTableUser = "user"

	// DBTableUserRole 用户角色
	DBTableUserRole = "user_role"

	// DBTableUserRolePermission ...
	DBTableUserRolePermission = "user_role_permission"

	// DBTableAdminApi ...
	DBTableAdminApi = "admin_api"

	// DBTableUserToken ...
	DBTableUserToken = "user_token"

	// DBTableSystemEvent 系统事件
	DBTableSystemEvent = "system_event"
	// DBTableSystemEventReceiveLog 系统事件接收记录表
	DBTableSystemEventReceiveLog = "system_event_receive_log"
)

定义表名

View Source
const (
	// ContentTypeStatusUnused 待启用
	ContentTypeStatusUnused = 0
	// ContentTypeUsing 使用中
	ContentTypeUsing = 1
	// ContentTypeForbidden 已禁用
	ContentTypeForbidden = 2
)
View Source
const (
	// GatewayApiStatusUnused 待启用
	GatewayApiStatusUnused = 0
	// GatewayApiStatusUsing 使用中
	GatewayApiStatusUsing = 1
	// GatewayApiStatusForbidden 停用
	GatewayApiStatusForbidden = 2
)
View Source
const (
	// GatewayApiParamStatusUnused 未使用
	GatewayApiParamStatusUnused = 0
	// GatewayApiParamStatusUsing 使用中
	GatewayApiParamStatusUsing = 1
	// GatewayApiParamStatusForbidden 禁用
	GatewayApiParamStatusForbidden = 2
)
View Source
const (
	// GatewayApiParamIsNotRequired 网关参数非必传
	GatewayApiParamIsNotRequired = 0
	// GatewayApiParamIsRequired 网关参数必传
	GatewayApiParamIsRequired = 1
)
View Source
const (
	// GatewayApiResultStatusUnused 未使用
	GatewayApiResultStatusUnused = 0
	// GatewayApiResultStatusUsing 使用中
	GatewayApiResultStatusUsing = 1
	// GatewayApiResultStatusForbidden 禁用
	GatewayApiResultStatusForbidden = 2
)
View Source
const (
	// OperateModePC pc后台操作
	OperateModePC = 0
	// OperateModeApi 接口操作
	OperateModeApi = 1
)
View Source
const (
	// MethodStatusUnused 待启用
	//
	// Author : [email protected]<白茶清欢>
	MethodStatusUnused = 0

	// MethodStatusUsing 使用中
	//
	// Author : [email protected]<白茶清欢>
	MethodStatusUsing = 1

	// MethodStatusForbidden 禁用
	//
	// Author : [email protected]<白茶清欢>
	MethodStatusForbidden = 2
)
View Source
const (
	// ProjectStatusUnused 待启用
	//
	// Author : [email protected]<白茶清欢>
	ProjectStatusUnused = 0

	// ProjectStatusUsing 使用中
	//
	// Author : [email protected]<白茶清欢>
	ProjectStatusUsing = 1

	// ProjectStatusForbidden 禁用
	//
	// Author : [email protected]<白茶清欢>
	ProjectStatusForbidden = 2
)
View Source
const (
	// ProjectApiStatusUnused 待启用
	//
	// Author : [email protected]<白茶清欢>
	ProjectApiStatusUnused = 0

	// ProjectApiStatusUsing 使用中
	//
	// Author : [email protected]<白茶清欢>
	ProjectApiStatusUsing = 1

	// ProjectApiStatusForbidden 禁用
	//
	// Author : [email protected]<白茶清欢>
	ProjectApiStatusForbidden = 2
)
View Source
const (
	// APIParamStatusUnused 未使用
	//
	// Author : [email protected]<白茶清欢>
	APIParamStatusUnused = 0
	// APIParamStatusUsing 生效中
	//
	// Author : [email protected]<白茶清欢>
	APIParamStatusUsing = 1
	// APIParamStatusForbidden 禁用
	//
	// Author : [email protected]<白茶清欢>
	APIParamStatusForbidden = 2
)
View Source
const (
	// ParamTypeString 字符串类型
	ParamTypeString = "string"
	// ParamTypeInt 整数类型
	ParamTypeInt = "int64"
	// ParamTypeFloat float 类型
	ParamTypeFloat = "float64"
	// ParamTypeIntListWithSplit 使用指定分隔符分隔的整数list
	ParamTypeIntListWithSplit = "split_int64_list"
	// ParamTypeStringListWithSplit 使用指定分隔符分隔的字符串list
	ParamTypeStringListWithSplit = "split_string_list"
	// ParamTypeFloatListWithSplit 使用指定分隔符分隔的浮点list
	ParamTypeFloatListWithSplit = "split_float64_string"
	// ParamTypeIntJsonList json序列化之后的list列表
	ParamTypeIntJsonList = "int64_list"
	// ParamTypeStringJsonList json序列化之后的 string list
	ParamTypeStringJsonList = "string_list"
	// ParamTypeFloatJsonList json序列化之后的float list
	ParamTypeFloatJsonList = "float_list"
	// ParamTypeJsonObject json序列化之后的map[string]interface{}
	ParamTypeJsonObject = "map<string,interface{}>"
	// ParamTypeOther 其他参数类型,统一为 interface{}
	ParamTypeOther = "interface"
)
View Source
const (
	// ProjectApiParamIsNotRequired 非必传
	ProjectApiParamIsNotRequired = 0
	// ProjectApiParamIsRequired 必传
	ProjectApiParamIsRequired = 1
)
View Source
const (
	// ProjectApiParamBindRouterNo 不绑定到URL
	ProjectApiParamBindRouterNo = 0
	// ProjectApiParamBindRouterYes 绑定到URL
	ProjectApiParamBindRouterYes = 1
)
View Source
const (
	// APIResultStatusUnused 未使用
	APIResultStatusUnused = 0
	// APIResultStatusUsing 生效中
	APIResultStatusUsing = 1
	// APIResultStatusForbidden 禁用
	APIResultStatusForbidden = 2
)
View Source
const (
	// SchemeStatusUnused 待启用
	//
	// Author : [email protected]<白茶清欢>
	SchemeStatusUnused = 0

	// SchemeStatusUsing 使用中
	//
	// Author : [email protected]<白茶清欢>
	SchemeStatusUsing = 1

	// SchemeStatusForbidden 禁止使用
	//
	// Author : [email protected]<白茶清欢>
	SchemeStatusForbidden = 2
)

协议状态枚举

View Source
const (
	// SystemEventStatusSuccess 事件发送成功
	SystemEventStatusSuccess = 0
	// SystemEventStatusFail 事件发送失败
	SystemEventStatusFail = 1
	// SystemEventStatusNoSend 事件未发送
	SystemEventStatusNoSend = 2
	// SystemEventStatusResendSuccess 事件重发成功
	SystemEventStatusResendSuccess = 3
	// SystemEventStatusResendFail 事件重发失败
	SystemEventStatusResendFail = 4
)

事件状态 0 - 发送成功 1 - 发送失败 2 - 未发送 3 - 重发成功 4 - 重发失败

View Source
const (
	// SystemEventReceiveHandleSuccess 事件处理成功
	SystemEventReceiveHandleSuccess = 0
	// SystemEventReceiveHandleFail 事件处理失败
	SystemEventReceiveHandleFail = 1
)
View Source
const (
	// UserStatusWaitActive 待激活
	UserStatusWaitActive = 0
	// UserStatusNormal 正常
	UserStatusNormal = 1
	// UserStatusForbidden 禁用
	UserStatusForbidden = 2
	// UserStatusDelete 删除
	UserStatusDelete = 3
)
View Source
const (
	// ApiEnableNo api访问不可用
	ApiEnableNo = 0
	// ApiEnableYes api访问可用
	ApiEnableYes = 1
)
View Source
const (
	// UserRoleStatusNormal 正常
	UserRoleStatusNormal = 0
	// UserRoleStatusForbidden 禁用
	UserRoleStatusForbidden = 1
	// UserRoleStatusDelete 删除
	UserRoleStatusDelete = 2
)
View Source
const (
	// LoginTypePhone ...
	LoginTypePhone = 0
	// LoginTypeMail ...
	LoginTypeMail = 1
)
View Source
const (
	// UserTokenStatusNormal 正常
	UserTokenStatusNormal = 0
	// UserTokenStatusExpired 过期
	UserTokenStatusExpired = 1
	// UserTokenStatusOtherClientLogin 其他客户端登录
	UserTokenStatusOtherClientLogin = 2
	// UserTokenStatusAdminObsolete 管理后台作废
	UserTokenStatusAdminObsolete = 3
)

1 - 过期 2 - 被其他客户端踢掉 3 - 管理后台作废',

Variables

View Source
var (
	// AppStatusTable ...
	AppStatusTable = map[int]string{
		AppStatusInit:      "初始化",
		AppStatusUsing:     "使用中",
		AppStatusForbidden: "禁用",
		AppStatusDelete:    "删除",
	}
)
View Source
var ProjectApiStatusTable = map[uint]string{
	ProjectApiStatusUnused:    "未启用",
	ProjectApiStatusUsing:     "使用中",
	ProjectApiStatusForbidden: "停用",
}
View Source
var SystemEventReceiveHandleStatusTable = map[int]string{
	SystemEventReceiveHandleSuccess: "处理成功",
	SystemEventReceiveHandleFail:    "处理失败",
}

SystemEventReceiveHandleStatusTable ...

Author : [email protected]<白茶清欢>

Date : 16:59 2023/3/12

View Source
var (
	// SystemEventStatusTable 状态信息表
	SystemEventStatusTable = map[int]string{
		SystemEventStatusSuccess:       "事件发送成功",
		SystemEventStatusFail:          "事件发送失败",
		SystemEventStatusNoSend:        "事件未发送",
		SystemEventStatusResendSuccess: "事件重发成功",
		SystemEventStatusResendFail:    "事件重发失败",
	}
)

Functions

func GetAPIParamStatusDesc

func GetAPIParamStatusDesc(status int) string

GetAPIParamStatusDesc 获取参数状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:59:56

func GetAPIParamStatusTable

func GetAPIParamStatusTable() map[int]string

GetAPIParamStatusTable 获取api参数状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:57:36

func GetAPIResultStatusDesc

func GetAPIResultStatusDesc(status int) string

GetAPIResultStatusDesc 获取参数状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:59:56

func GetAPIResultStatusTable

func GetAPIResultStatusTable() map[int]string

GetAPIResultStatusTable 获取api参数状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:57:36

func GetAdminApiStatusDesc

func GetAdminApiStatusDesc(status int) string

GetAdminApiStatusDesc ...

Author : [email protected]<白茶清欢>

Date : 16:05 2023/2/20

func GetApiEnableDesc

func GetApiEnableDesc(apiEnable int) string

GetApiEnableDesc api接口访问是否可用

Author : [email protected]<白茶清欢>

Date : 19:12 2023/3/5

func GetAppStatusDesc

func GetAppStatusDesc(status int) string

GetAppStatusDesc 获取APP应用状态

Author : [email protected]<白茶清欢>

Date : 12:54 2023/3/4

func GetContentTypeStatusDesc

func GetContentTypeStatusDesc(status int) string

GetContentTypeStatusDesc 获取方法状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 13:06:37

func GetContentTypeStatusTable

func GetContentTypeStatusTable() map[int]string

GetContentTypeStatusTable 获取请求方法状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 13:00:27

func GetGatewayApiStatusDesc

func GetGatewayApiStatusDesc(status int) string

GetGatewayApiStatusDesc 获取网关接口状态的描述

Author : [email protected]<白茶清欢>

Date : 23:57 2022/10/16

func GetGatewayApiStatusTable

func GetGatewayApiStatusTable() map[int]string

GetGatewayApiStatusTable 获取网关接口状态配置

Author : [email protected]<白茶清欢>

Date : 23:55 2022/10/16

func GetMethodStatusDesc

func GetMethodStatusDesc(status int) string

GetMethodStatusDesc 获取方法状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 13:06:37

func GetMethodStatusTable

func GetMethodStatusTable() map[int]string

GetMethodStatusTable 获取请求方法状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 13:00:27

func GetOperateModeDesc

func GetOperateModeDesc(operateMode int) string

GetOperateModeDesc ...

Author : [email protected]<白茶清欢>

Date : 19:46 2023/3/5

func GetProjectApiStatusDesc

func GetProjectApiStatusDesc(status uint) string

GetProjectApiStatusDesc 状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:26:42

func GetProjectApiStatusTable

func GetProjectApiStatusTable() map[uint]string

GetProjectApiStatusTable 获取api状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 18:24:35

func GetProjectStatusDesc

func GetProjectStatusDesc(status int) string

GetProjectStatusDesc ...

Author : [email protected]<白茶清欢>

Date : 2020/07/25 14:21:28

func GetProjectStatusTable

func GetProjectStatusTable() map[int]string

GetProjectStatusTable 获取项目状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 14:16:41

func GetSchemeStatusDesc

func GetSchemeStatusDesc(status int) string

GetSchemeStatusDesc 获取状态描述

Author : [email protected]<白茶清欢>

Date : 2020/07/25 12:50:52

func GetSchemeStatusTable

func GetSchemeStatusTable() map[int]string

GetSchemeStatusTable 获取状态表

Author : [email protected]<白茶清欢>

Date : 2020/07/25 12:48:31

func GetSystemEventReceiveHandleStatusDesc

func GetSystemEventReceiveHandleStatusDesc(status int) string

GetSystemEventReceiveHandleStatusDesc ...

Author : [email protected]<白茶清欢>

Date : 17:00 2023/3/12

func GetSystemEventStatusDesc

func GetSystemEventStatusDesc(status int) string

GetSystemEventStatusDesc ...

Author : [email protected]<白茶清欢>

Date : 21:51 2023/3/2

func GetUserRoleStatusDesc

func GetUserRoleStatusDesc(status int) string

GetUserRoleStatusDesc ...

Author : [email protected]<白茶清欢>

Date : 11:36 2023/2/21

func GetUserStatusDesc

func GetUserStatusDesc(status int) string

GetUserStatusDesc 获取用户状态描述

Author : [email protected]<白茶清欢>

Date : 21:19 2023/2/18

func GetUserTokenDesc

func GetUserTokenDesc(status int) string

GetUserTokenDesc ...

Author : [email protected]<白茶清欢>

Date : 00:03 2023/2/20

Types

type AdminApi

type AdminApi struct {
	ID           int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	Description  string    `json:"description" gorm:"column:description;default:;NOT NULL"`                  // 接口描述
	Name         string    `json:"name" gorm:"column:name;default:;NOT NULL"`                                // 接口名称
	Uri          string    `json:"uri" gorm:"column:uri;default:;NOT NULL"`                                  // 接口uri
	Status       int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 接口状态 0 - 正常 1 - 禁用 2 - 下线
	CheckLogin   int       `json:"check_login" gorm:"column:check_login;default:0;NOT NULL"`                 // 校验登录 0 - 不校验 1 - 校验
	ParentApiID  int64     `json:"parent_api_id" gorm:"column:parent_api_id;default:0;NOT NULL"`             // 父级接口ID
	CreateUserID string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`            // 创建人ID
	ModifyUserID string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`            // 修改人ID
	CreateTime   time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime   time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

func (AdminApi) TableName

func (aa AdminApi) TableName() string

type App

type App struct {
	ID               int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	Code             string    `gorm:"column:code;NOT NULL" json:"code"`                                         // 分配的app_code
	Secret           string    `gorm:"column:secret;NOT NULL" json:"secret"`                                     // 分配的私钥
	Status           int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 当前状态 0 - 初始化 1- 使用中 2 - 禁用 3 - 删除
	GlobalPerSecond  int       `gorm:"column:global_per_second;default:0;NOT NULL" json:"global_per_second"`     // 每秒请求数
	GlobalPerMinute  int       `gorm:"column:global_per_minute;default:0;NOT NULL" json:"global_per_minute"`     // 每分钟请求数
	GlobalPerHour    int       `gorm:"column:global_per_hour;default:0;NOT NULL" json:"global_per_hour"`         // 每小时请求数
	GlobalPerDay     int       `gorm:"column:global_per_day;default:0;NOT NULL" json:"global_per_day"`           // 每天请求数
	ItemTokenCount   int       `gorm:"column:item_token_count;default:1;NOT NULL" json:"item_token_count"`       // 每次接口调用消耗的令牌数
	Description      string    `gorm:"column:description;NOT NULL" json:"description"`                           // 描述信息
	ApplyUserName    string    `gorm:"column:apply_user_name;NOT NULL" json:"apply_user_name"`                   // 申请人姓名
	ApplyUserContact string    `gorm:"column:apply_user_contact;NOT NULL" json:"apply_user_contact"`             // 申请人联系方式
	CreateUserID     string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID     string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime       time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime       time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

App app表信息

Author : [email protected]<白茶清欢>

Date : 2:07 下午 2021/9/18

func (*App) TableName

func (a *App) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2:06 下午 2021/9/18

type AppApiPermission

type AppApiPermission struct {
	ID             int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	AppID          int64     `json:"app_id" gorm:"column:app_id;default:0;NOT NULL"`                           // 分配的应用ID
	GatewayApiID   int64     `json:"gateway_api_id" gorm:"column:gateway_api_id;default:0;NOT NULL"`           // 网关接口ID
	PerSecond      int       `json:"per_second" gorm:"column:per_second;default:0;NOT NULL"`                   // 接口每秒访问限制, 默认为 0 - 不限制
	PerMinute      int       `json:"per_minute" gorm:"column:per_minute;default:0;NOT NULL"`                   // 接口每分钟访问限制, 默认为 0 - 不限制
	PerHour        int       `json:"per_hour" gorm:"column:per_hour;default:0;NOT NULL"`                       // 接口每小时访问限制, 默认为 0 - 不限制
	PerDay         int       `json:"per_day" gorm:"column:per_day;default:0;NOT NULL"`                         // 接口每天访问限制, 默认为 0 - 不限制
	ItemTokenCount int       `json:"item_token_count" gorm:"column:item_token_count;default:1;NOT NULL"`       // 每次接口访问消耗的令牌数量, 默认1
	CreateUserID   string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`            // 创建人ID
	ModifyUserID   string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`            // 修改人ID
	CreateTime     time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime     time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

AppApiPermission app 授权信息表

Author : [email protected]<白茶清欢>

Date : 4:25 下午 2021/9/18

func (*AppApiPermission) TableName

func (ap *AppApiPermission) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 4:27 下午 2021/9/18

type ContentType

type ContentType struct {
	ID           int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	Value        string    `gorm:"column:value;NOT NULL" json:"value"`                                       // 请求方法
	Status       int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 状态 0 - 待启用 1 - 可用中 2 - 禁用
	CreateUserID string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime   time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime   time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

ContentType 表数据结构

Author : [email protected]<白茶清欢>

Date : 10:44 上午 2021/9/17

func (*ContentType) TableName

func (ct *ContentType) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 10:45 上午 2021/9/17

type GatewayApi

type GatewayApi struct {
	ID            int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	ProjectID     int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`                   // 所属的项目的ID
	ProjectApiID  int64     `gorm:"column:project_api_id;default:0;NOT NULL" json:"project_api_id"`           // 所属的网关API的ID
	Uri           string    `gorm:"column:uri;NOT NULL" json:"uri"`                                           // 网关API的URI
	MethodID      int64     `gorm:"column:method_id;default:0;NOT NULL" json:"method_id"`                     // 请求方法ID
	ContentTypeID int64     `gorm:"column:content_type_id;default:0;NOT NULL" json:"content_type_id"`         // 请求类型ID
	Name          string    `gorm:"column:name;default:0;NOT NULL" json:"name"`                               // 网关API名称
	Description   string    `gorm:"column:description;default:0;NOT NULL" json:"description"`                 // 网关API描述
	Status        int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // API状态: 0 - 待激活 1 - 正常 2 - 停用
	CreateUserID  string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID  string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime    time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime    time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

GatewayApi 网关API

Author : [email protected]<白茶清欢>

Date : 8:34 PM 2022/1/2

func (*GatewayApi) TableName

func (ga *GatewayApi) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 8:37 PM 2022/1/2

type GatewayApiParam

type GatewayApiParam struct {
	ID                int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                   // 主键ID
	ProjectID         int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`           // 所属项目ID
	GatewayApiID      int64     `gorm:"column:gateway_api_id;default:0;NOT NULL" json:"gateway_api_id"`   // 所属的网关API的ID
	Name              string    `gorm:"column:name;default:0;NOT NULL" json:"name"`                       // 参数名称
	Status            int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                   // 参数状态: 0 - 待激活 1 - 正常 2 - 停用
	ProjectApiParamID int64     `gorm:"column:project_api_param_id;NOT NULL" json:"project_api_param_id"` // 后端参数ID
	GroupID           string    `gorm:"column:group_id;default:;NOT NULL" json:"group_id"`                // 参数分组id
	Sort              int       `gorm:"column:sort;default:0;NOT NULL" json:"sort"`                       // 参数分组排序
	IsRequired        int       `gorm:"column:is_required;default:0;NOT NULL" json:"is_required"`         // 是否必传
	DefaultValue      string    `gorm:"column:default_value;NOT NULL" json:"default_value"`               // 非必传参数的默认值
	ExampleValue      string    `gorm:"column:example_value;NOT NULL" json:"example_value"`               // 示例的值
	Description       string    `gorm:"column:description;default:0;NOT NULL" json:"description"`         // 描述
	CreateUserID      string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`             // 创建人ID
	ModifyUserID      string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`             // 修改人ID
	CreateTime        time.Time `gorm:"column:create_time;default:NULL;NOT NULL" json:"create_time"`      // 创建时间
	ModifyTime        time.Time `gorm:"column:modify_time;default:NULLs;NOT NULL" json:"modify_time"`     // 更新时间
}

GatewayApiParam 网关API参数

Author : [email protected]<白茶清欢>

Date : 8:10 PM 2022/1/2

func (*GatewayApiParam) TableName

func (gap *GatewayApiParam) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 8:42 PM 2022/1/2

type GatewayApiResult

type GatewayApiResult struct {
	ID                 int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                        // id 主键ID
	ProjectID          int64     `json:"project_id" gorm:"column:project_id;default:0;NOT NULL"`                       // project_id 所属项目ID
	GatewayApiID       int64     `json:"gateway_api_id" gorm:"column:gateway_api_id;default:0;NOT NULL"`               // gateway_api_id 所属的网关API的ID
	OutputDataPath     string    `json:"output_data_path" gorm:"column:output_data_path;default:;NOT NULL"`            // output_data_path 输出的数据路径
	DataType           string    `json:"data_type" gorm:"column:data_type;default:string;NOT NULL"`                    // data_type 数据类型
	Status             int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                               // status 参数状态: 0 - 待激活 1 - 正常 2 - 停用
	ProjectApiResultID int64     `json:"project_api_result_id" gorm:"column:project_api_result_id;default:0;NOT NULL"` // project_api_result_id 后端返回值ID
	DefaultValue       string    `json:"default_value" gorm:"column:default_value;default:;NOT NULL"`                  // default_value 非必传参数的默认值
	ExampleValue       string    `json:"example_value" gorm:"column:example_value;default:;NOT NULL"`                  // example_value 示例的值
	CreateUserID       string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`                // create_user_id 创建人ID
	ModifyUserID       string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`                // modify_user_id 修改人ID
	CreateTime         time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"`     // create_time 创建时间
	ModifyTime         time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"`     // modify_time 更新时间
	Description        string    `json:"description" gorm:"column:description;default:;NOT NULL"`                      // description 返回值描述
}

GatewayApiResult 万贯api返回值

Author : [email protected]<白茶清欢>

Date : 9:21 下午 2022/1/31

func (GatewayApiResult) Table

func (gar GatewayApiResult) Table() string

Table ...

Author : [email protected]<白茶清欢>

Date : 9:22 下午 2022/1/31

type Log

type Log struct {
	ID            int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                 // 主键ID
	TraceID       string    `gorm:"column:trace_id;NOT NULL" json:"trace_id"`                       // 操作ID
	DBTable       string    `gorm:"column:db_table;NOT NULL" json:"db_table"`                       // 操作的表
	OperateType   string    `gorm:"column:operate_type;NOT NULL" json:"operate_type"`               // 操作类型
	OperateUserID string    `gorm:"column:operate_user_id;NOT NULL" json:"operate_user_id"`         // 操作人ID
	ClientIp      string    `gorm:"column:client_ip;NOT NULL" json:"client_ip"`                     // 客户端IP
	ClientUA      string    `gorm:"column:client_ua;NOT NULL" json:"client_ua"`                     // 客户端ua
	OperateMode   int       `gorm:"column:operate_mode;default:0;NOT NULL" json:"operate_mode"`     // 操作模式 0 - PC后台操作 2 - 接口API操作
	CreateTime    time.Time `gorm:"column:create_time;NOT NULL" json:"create_time"`                 // 创建时间
	BeforeValue   string    `gorm:"column:before_value;default:{};NOT NULL" json:"before_value"`    // 操作之前的值
	AfterValue    string    `gorm:"column:after_value;default:{};NOT NULL" json:"after_value"`      // 操作之后的值
	PrimaryID     int64     `gorm:"column:primary_id;default:0;NOT NULL" json:"primary_id"`         // 主键ID
	ProjectID     int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`         // 项目ID
	ProjectApiID  int64     `gorm:"column:project_api_id;default:0;NOT NULL" json:"project_api_id"` // API ID
}

Log ...

Author : [email protected]<白茶清欢>

Date : 3:47 下午 2021/10/8

func (*Log) TableName

func (l *Log) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 3:49 下午 2021/10/8

type MeshAPI

type MeshAPI struct {
	ID            int64     `gorm:"column:id;AUTO_INCREMENT;NOT NULL" json:"id"`                              // 主键ID
	Name          string    `gorm:"column:name;NOT NULL" json:"name"`                                         // api名称
	Status        int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 项目状态: 0 - 待激活 1 - 正常 2 - 停用
	URI           string    `gorm:"column:uri;NOT NULL" json:"uri"`                                           // 请求的uri(网关对外暴露的uri)
	SchemeID      int64     `gorm:"column:scheme_id;default:0;NOT NULL" json:"scheme_id"`                     // 请求协议
	MethodID      int64     `gorm:"column:method_id;default:0;NOT NULL" json:"method_id"`                     // 请求方法
	ContentTypeID int64     `gorm:"column:content_type_id;default:0;NOT NULL" json:"content_type_id"`         // 请求类型
	Description   string    `gorm:"column:description;NOT NULL" json:"description"`                           // 功能的详细描述
	CreateUserID  string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID  string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime    time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime    time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

MeshAPI mesh_api表结构

Author : [email protected]<白茶清欢>

Date : 2:22 下午 2021/9/26

func (*MeshAPI) TableName

func (ma *MeshAPI) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2:25 下午 2021/9/26

type MeshAPIConfig

type MeshAPIConfig struct {
	ID                int64     `gorm:"column:id;AUTO_INCREMENT;NOT NULL" json:"id"`                              // 主键ID
	Sort              int       `gorm:"column:sort;default:0;NOT NULL" json:"sort"`                               // 执行顺序
	MeshApiID         int64     `gorm:"column:mesh_api_id;default:mesh_api表主键ID;NOT NULL" json:"mesh_api_id"`     // mesh api id
	ApiID             int64     `gorm:"column:api_id;default:0;NOT NULL" json:"api_id"`                           // project_api表主键ID
	DependenceApiList string    `gorm:"column:dependence_api_list;NOT NULL" json:"dependence_api_list"`           // project_api表主键ID
	ParamRule         string    `gorm:"column:param_rule;default:{};NOT NULL" json:"param_rule"`                  // 参数规则
	CreateUserID      string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID      string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime        time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime        time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

MeshAPIConfig mesh_api_config 表结构

Author : [email protected]<白茶清欢>

Date : 2:26 下午 2021/9/26

func (*MeshAPIConfig) TableName

func (mac *MeshAPIConfig) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2:28 下午 2021/9/26

type MeshAPIResult

type MeshAPIResult struct {
	ID           int64     `gorm:"column:id;AUTO_INCREMENT;NOT NULL" json:"id"`                              // 主键ID
	Description  string    `gorm:"column:description;NOT NULL" json:"description"`                           // 返回值的描述
	ResultKey    string    `gorm:"column:result_key;NOT NULL" json:"result_key"`                             // 返回结果的key
	ApiID        int64     `gorm:"column:api_id;default:0;NOT NULL" json:"api_id"`                           // project_api表主键ID
	MeshApiID    int64     `gorm:"column:mesh_api_id;default:0;NOT NULL" json:"mesh_api_id"`                 // project_api表主键ID
	ValuePath    string    `gorm:"column:value_path;NOT NULL" json:"value_path"`                             // 提取结果的值路径
	CreateUserID string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime   time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime   time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

MeshAPIResult mesh_api_result 表结构

Author : [email protected]<白茶清欢>

Date : 2:34 下午 2021/9/26

func (*MeshAPIResult) TableName

func (mar *MeshAPIResult) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2:36 下午 2021/9/26

type Method

type Method struct {
	ID           int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	Method       string    `gorm:"column:method;NOT NULL" json:"method"`                                     // 请求协议
	Status       int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 状态 0 - 待启用 1 - 可用中 2 - 禁用
	CreateUserID string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime   time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime   time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

Method 表结构

Author : [email protected]<白茶清欢>

func (*Method) TableName

func (m *Method) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2021/06/05 23:47:17

type Project

type Project struct {
	ID              int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	Flag            string    `gorm:"column:flag;NOT NULL" json:"flag"`                                         // 项目标识,全局唯一
	Name            string    `gorm:"column:name;NOT NULL" json:"name"`                                         // 项目名称
	Description     string    `gorm:"column:description;NOT NULL" json:"description"`                           // 项目详细描述
	Status          int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 项目状态: 0 - 待激活 1 - 正常 2 - 停用
	Domain          string    `gorm:"column:domain;NOT NULL" json:"domain"`                                     // 项目域名
	Port            int       `gorm:"column:port;default:80;NOT NULL" json:"port"`                              // 服务端口
	SchemeID        int64     `gorm:"column:scheme_id;default:0;NOT NULL" json:"scheme_id"`                     // 协议ID
	ConnectTimeout  int64     `gorm:"column:connect_timeout;default:500;NOT NULL" json:"connect_timeout"`       // 连接超时时间, 默认: 500ms
	ReadTimeout     int64     `gorm:"column:read_timeout;default:5000;NOT NULL" json:"read_timeout"`            // 读取超时时间, 默认: 5000ms
	CodeField       string    `gorm:"column:code_field;NOT NULL" json:"code_field"`                             // 业务状态码字段
	SuccessCode     string    `gorm:"column:success_code;default:0" json:"success_code"`                        // 业务成功的状态码
	MessageField    string    `gorm:"column:message_field;default:message" json:"message_field"`                // 业务信息的字段
	DataField       string    `gorm:"column:data_field;default:data" json:"data_field"`                         // 业务数据的字段
	GlobalPerSecond int       `gorm:"column:global_per_second;default:0;NOT NULL" json:"global_per_second"`     // 每秒请求数
	GlobalPerMinute int       `gorm:"column:global_per_minute;default:0;NOT NULL" json:"global_per_minute"`     // 每分钟请求数
	GlobalPerHour   int       `gorm:"column:global_per_hour;default:0;NOT NULL" json:"global_per_hour"`         // 每小时请求数
	GlobalPerDay    int       `gorm:"column:global_per_day;default:0;NOT NULL" json:"global_per_day"`           // 每天请求数
	CreateUserID    string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID    string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime      time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime      time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

Project project表数据结构

Author : [email protected]<白茶清欢>

func (*Project) TableName

func (p *Project) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2021/06/05 23:40:25

type ProjectApi

type ProjectApi struct {
	ID            int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	ProjectID     int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`                   // 所属项目ID
	Name          string    `gorm:"column:name;NOT NULL" json:"name"`                                         // api名称
	Status        int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 项目状态: 0 - 待激活 1 - 正常 2 - 停用
	URI           string    `gorm:"column:uri;NOT NULL" json:"uri"`                                           // 请求的uri(网关对外暴露的uri)
	SchemeID      int64     `gorm:"column:scheme_id;default:0;NOT NULL" json:"scheme_id"`                     // 请求协议
	MethodID      int64     `gorm:"column:method_id;default:0;NOT NULL" json:"method_id"`                     // 请求方法
	ContentTypeID int64     `gorm:"column:content_type_id;default:0;NOT NULL" json:"content_type_id"`         // 请求类型
	ReadTimeout   int64     `gorm:"column:read_timeout;default:5000;NOT NULL" json:"read_timeout"`            // 读取超时时间, 默认: 5000ms
	Description   string    `gorm:"column:description;NOT NULL" json:"description"`                           // 功能的详细描述
	CreateUserID  string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID  string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime    time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime    time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

ProjectApi project_api 表数据结构

Author : [email protected]@ke.com<白茶清欢>

func (*ProjectApi) TableName

func (pa *ProjectApi) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2021/06/05 23:45:42

type ProjectApiParam

type ProjectApiParam struct {
	ID           int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	ProjectID    int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`                   // 所属项目ID
	ProjectApiID int64     `gorm:"column:project_api_id;default:0;NOT NULL" json:"project_api_id"`           // 所属的API的ID
	Name         string    `gorm:"column:name;default:0;NOT NULL" json:"name"`                               // 参数名称
	Status       int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 参数状态: 0 - 待激活 1 - 正常 2 - 停用
	BindRouter   int64     `gorm:"column:bind_router;default:0;NOT NULL" json:"bind_router"`                 // 参数类型: string int64 float64 list(指定分隔符) list(json序列化后的list) json(map[string]) 其他
	ParamType    string    `gorm:"column:param_type;default:0;NOT NULL" json:"param_type"`                   // 参数类型: string int64 float64 list(指定分隔符) list(json序列化后的list) json(map[string]) 其他
	IsRequired   int       `gorm:"column:is_required;default:0;NOT NULL" json:"is_required"`                 // 是否必传
	DefaultValue string    `gorm:"column:default_value;NOT NULL" json:"default_value"`                       // 非必传参数的默认值
	ExampleValue string    `gorm:"column:example_value;NOT NULL" json:"example_value"`                       // 示例的值
	Description  string    `gorm:"column:description;NOT NULL" json:"description"`                           // 示例的值
	CreateUserID string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime   time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime   time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

ProjectApiParam 数据结构定义

Author : [email protected]<白茶清欢>

func (*ProjectApiParam) TableName

func (pap *ProjectApiParam) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2021/06/05 23:46:40

type ProjectApiResult

type ProjectApiResult struct {
	ID             int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	ProjectID      int64     `gorm:"column:project_id;default:0;NOT NULL" json:"project_id"`                   // 所属项目ID
	ProjectApiID   int64     `gorm:"column:project_api_id;default:0;NOT NULL" json:"project_api_id"`           // 项目API ID
	OutputDataPath string    `gorm:"column:output_data_path;NOT NULL" json:"output_data_path"`                 // 返回值字段路径
	DataType       string    `gorm:"column:data_type;NOT NULL" json:"data_type"`                               // 返回值字段路径
	Status         int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 参数状态: 0 - 待激活 1 - 正常 2 - 停用
	ExampleValue   string    `gorm:"column:example_value;NOT NULL" json:"example_value"`                       // 示例的值
	Description    string    `gorm:"column:description;NOT NULL" json:"description"`                           // 字段描述
	CreateUserID   string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID   string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime     time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime     time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

ProjectApiResult 项目API返回值信息

Author : [email protected]<白茶清欢>

Date : 2022/1/11 9:40 PM

func (*ProjectApiResult) TableName

func (par *ProjectApiResult) TableName() string

TableName 获取表名

Author : [email protected]<白茶清欢>

Date : 2022/1/11 9:44 PM

type Scheme

type Scheme struct {
	ID           int64     `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`                           // 主键ID
	Scheme       string    `gorm:"column:scheme;NOT NULL" json:"scheme"`                                     // 请求协议
	Status       int       `gorm:"column:status;default:0;NOT NULL" json:"status"`                           // 状态 0 - 待启用 1 - 可用中 2 - 禁用
	CreateUserID string    `gorm:"column:create_user_id;NOT NULL" json:"create_user_id"`                     // 创建人ID
	ModifyUserID string    `gorm:"column:modify_user_id;NOT NULL" json:"modify_user_id"`                     // 修改人ID
	CreateTime   time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"` // 创建时间
	ModifyTime   time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"modify_time"` // 更新时间
}

Scheme 请求scheme定义

Author : [email protected]<白茶清欢>

func (*Scheme) TableName

func (s *Scheme) TableName() string

TableName ...

Author : [email protected]<白茶清欢>

Date : 2021/06/05 23:39:35

type SystemEvent

type SystemEvent struct {
	ID            int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	UserID        string    `json:"user_id" gorm:"column:user_id;default:;NOT NULL"`                          // 触发用户 id
	EventType     string    `json:"event_type" gorm:"column:event_type;default:;NOT NULL"`                    // 事件类型
	EventData     string    `json:"event_data" gorm:"column:event_data;default:{};NOT NULL"`                  // 事件数据
	EventResult   string    `json:"event_result" gorm:"column:event_result;default:{};NOT NULL"`              // 事件发送结果
	TriggerUri    string    `json:"trigger_uri" gorm:"column:trigger_uri;default:;NOT NULL"`                  // 触发事件的接口
	TraceID       string    `json:"trace_id" gorm:"column:trace_id;default:;NOT NULL"`                        // 事件追踪的trace_id
	ServerIp      string    `json:"server_ip" gorm:"column:server_ip;default:0.0.0.0;NOT NULL"`               // 事件发送的服务器IP
	ParentEventID int64     `json:"parent_event_id" gorm:"column:parent_event_id;default:0;NOT NULL"`         // 事件重发时, 原始事件ID
	Status        int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 事件状态 0 - 发送成功 1 - 发送失败 2 - 未发送 3 - 重发成功 4 - 重发失败
	CreateTime    time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime    time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

SystemEvent ...

Author : [email protected]<白茶清欢>

Date : 17:10 2023/2/28

func (SystemEvent) TableName

func (s SystemEvent) TableName() string

TableName 获取表名称

type SystemEventReceiveLog

type SystemEventReceiveLog struct {
	ID           int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	EventType    string    `json:"event_type" gorm:"column:event_type;default:;NOT NULL"`                    // 事件类型
	EventData    string    `json:"event_data" gorm:"column:event_data;default:{};NOT NULL"`                  // 事件数据
	ResultReason string    `json:"result_reason" gorm:"column:result_reason;default:;NOT NULL"`              // 事件接收处理结果原因
	TraceID      string    `json:"trace_id" gorm:"column:trace_id;default:;NOT NULL"`                        // 事件追踪的trace_id
	ServerIp     string    `json:"server_ip" gorm:"column:server_ip;default:0.0.0.0;NOT NULL"`               // 事件接收的服务器IP
	Status       int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 事件状态 0 - 处理成功 1 - 处理失败
	CreateTime   time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime   time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

SystemEventReceiveLog 系统事件接收记录表

Author : [email protected]<白茶清欢>

Date : 14:26 2023/3/7

func (SystemEventReceiveLog) TableName

func (s SystemEventReceiveLog) TableName() string

TableName 获取表名称

type User

type User struct {
	ID            int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	Description   string    `json:"description" gorm:"column:description;default:;NOT NULL"`                  // 用户描述
	Name          string    `json:"name" gorm:"column:name;default:;NOT NULL"`                                // 用户名称
	Avatar        string    `json:"avatar" gorm:"column:avatar;default:;NOT NULL"`                            // 用户头像
	Status        int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 用户状态 0 - 待激活 1 - 正常 2 - 停用 3 - 删除
	RoleID        int64     `json:"role_id" gorm:"column:role_id;default:0;NOT NULL"`                         // 角色ID
	Mail          string    `json:"mail" gorm:"column:mail;default:;NOT NULL"`                                // 用户邮箱
	Phone         string    `json:"phone" gorm:"column:phone;default:;NOT NULL"`                              // 用户手机
	Password      string    `json:"password" gorm:"column:password;default:;NOT NULL"`                        // 用户密码
	Salt          string    `json:"salt" gorm:"column:salt;default:;NOT NULL"`                                // 加密私钥
	Authorization string    `json:"authorization" gorm:"column:authorization;default:;NOT NULL"`              // api访问授权key
	ApiEnable     int       `json:"api_enable" gorm:"column:api_enable;default:0;NOT NULL"`                   // 接口访问是否可用
	CreateUserID  string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`            // 创建人ID
	ModifyUserID  string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`            // 修改人ID
	CreateTime    time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime    time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

User 用户信息表

Author : [email protected]<白茶清欢>

Date : 22:16 2023/2/15

func (*User) TableName

func (u *User) TableName() string

type UserRole

type UserRole struct {
	ID           int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	Description  string    `json:"description" gorm:"column:description;default:;NOT NULL"`                  // 角色描述
	Name         string    `json:"name" gorm:"column:name;default:;NOT NULL"`                                // 角色名称
	Status       int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 角色状态: 0 - 正常 1 - 禁用 2 - 删除
	CreateUserID string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`            // 创建人ID
	ModifyUserID string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`            // 修改人ID
	CreateTime   time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime   time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

UserRole 用户角色

Author : [email protected]<白茶清欢>

Date : 22:21 2023/2/15

func (UserRole) TableName

func (ur UserRole) TableName() string

type UserRolePermission

type UserRolePermission struct {
	ID           int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	RoleID       int64     `json:"role_id" gorm:"column:role_id;default:0;NOT NULL"`                         // 角色ID
	ApiIDList    string    `json:"api_id_list" gorm:"column:api_id_list;default:[];NOT NULL"`                // 接口ID列表
	CreateUserID string    `json:"create_user_id" gorm:"column:create_user_id;default:;NOT NULL"`            // 创建人ID
	ModifyUserID string    `json:"modify_user_id" gorm:"column:modify_user_id;default:;NOT NULL"`            // 修改人ID
	CreateTime   time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime   time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

UserRolePermission 用户角色权限

Author : [email protected]<白茶清欢>

Date : 22:26 2023/2/15

func (UserRolePermission) TableName

func (urp UserRolePermission) TableName() string

type UserToken

type UserToken struct {
	ID            int64     `json:"id" gorm:"column:id;default:;NOT NULL"`                                    // 主键ID
	Token         string    `json:"token" gorm:"column:token;default:;NOT NULL"`                              // 用户token
	UserID        int64     `json:"user_id" gorm:"column:user_id;default:0;NOT NULL"`                         // 用户 id
	LoginTime     int64     `json:"login_time" gorm:"column:login_time;default:0;NOT NULL"`                   // 登录时间
	EffectiveTime int64     `json:"effective_time" gorm:"column:effective_time;default:0;NOT NULL"`           // token有效时长
	ExpireAt      int64     `json:"expire_at" gorm:"column:expire_at;default:0;NOT NULL"`                     // token过期时间
	LoginType     int       `json:"login_type" gorm:"column:login_type;default:0;NOT NULL"`                   // 用户登录方式 0 - 手机 1 - 邮箱
	Status        int       `json:"status" gorm:"column:status;default:0;NOT NULL"`                           // 用户token状态
	LoginIp       string    `json:"login_ip" gorm:"column:login_ip;default:0.0.0.0;NOT NULL"`                 // 登录的IP
	UserAgent     string    `json:"user_agent" gorm:"column:user_agent;default:;NOT NULL"`                    // 登录的UA
	CreateTime    time.Time `json:"create_time" gorm:"column:create_time;default:current_timestamp;NOT NULL"` // 创建时间
	ModifyTime    time.Time `json:"modify_time" gorm:"column:modify_time;default:current_timestamp;NOT NULL"` // 更新时间
}

UserToken 用户token信息表

Author : [email protected]<白茶清欢>

Date : 22:47 2023/2/18

func (UserToken) TableName

func (ut UserToken) TableName() string

Jump to

Keyboard shortcuts

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