repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/sys_menu.go
server/model/system/request/sys_menu.go
package request import ( "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" ) // Add menu authority info structure type AddMenuAuthorityInfo struct { Menus []system.SysBaseMenu `json:"menus"` AuthorityId uint `json:"authorityId"` // 角色...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/sys_auto_history.go
server/model/system/request/sys_auto_history.go
package request import "github.com/test-instructor/yangfan/server/model/common/request" type SysAutoHistory struct { request.PageInfo } // GetById Find by id structure type RollBack struct { ID int `json:"id" form:"id"` // 主键ID DeleteTable bool `json:"deleteTable" form:"deleteTable"` /...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/jwt.go
server/model/system/request/jwt.go
package request import ( "github.com/golang-jwt/jwt/v4" uuid "github.com/satori/go.uuid" ) // Custom claims structure type CustomClaims struct { BaseClaims BufferTime int64 jwt.StandardClaims } type BaseClaims struct { UUID uuid.UUID ID uint Username string NickName string AuthorityId...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/sys_casbin.go
server/model/system/request/sys_casbin.go
package request // Casbin info structure type CasbinInfo struct { Path string `json:"path"` // 路径 Method string `json:"method"` // 方法 } // Casbin structure for input parameters type CasbinInReceive struct { AuthorityId uint `json:"authorityId"` // 权限id CasbinInfos []CasbinInfo `json:"casbinInfos"` } ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/project.go
server/model/system/request/project.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/system" ) type ProjectSearch struct { system.Project request.PageInfo } type SysProjectUsers struct { ProjectId uint `json:"projectId" form:"projectId"` request.PageInfo }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/system/request/sys_user.go
server/model/system/request/sys_user.go
package request import model "github.com/test-instructor/yangfan/server/model/system" // User register structure type Register struct { Username string `json:"userName"` Password string `json:"passWord"` NickName string `json:"nickName" gorm:"default:'QMPlusUser'"` HeaderImg string `json:"h...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_env.go
server/model/interfacecase/api_env.go
package interfacecase import ( "gorm.io/datatypes" "github.com/test-instructor/yangfan/server/global" ) type ApiEnv struct { global.GVA_MODEL Operator Default bool `json:"default,omitempty" form:"default" gorm:"column:default;comment:默认环境;"` Key string `json:"key,omitempty" form:"key"` Name string `j...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_user_config.go
server/model/interfacecase/api_user_config.go
package interfacecase import "github.com/test-instructor/yangfan/server/global" type ApiUserConfig struct { global.GVA_MODEL Operator ApiConfig *ApiConfig `json:"api_config"` ApiConfigID *uint `json:"api_config_id" gorm:"comment:接口配置ID"` ApiEnv *ApiEnv `json:"api_env"` ApiEnvID *uint `jso...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_timer_task.go
server/model/interfacecase/api_timer_task.go
// 自动生成模板TimerTask package interfacecase import ( "time" "github.com/test-instructor/yangfan/server/global" ) // ApiTimerTask 结构体 // 如果含有time.Time 请自行import time包 type ApiTimerTask struct { global.GVA_MODEL Operator Name string `json:"name,omitempty" form:"name" gorm:"column:name;comment:...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/py_pkg.go
server/model/interfacecase/py_pkg.go
package interfacecase import "github.com/test-instructor/yangfan/server/global" type HrpPyPkg struct { global.GVA_MODEL Name string `json:"name,omitempty" form:"name" gorm:"uniqueIndex:idx_name"` Version string `json:"version,omitempty" form:"version" gorm:"column:version;comment:;"` IsUninstall *bool ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_requests.go
server/model/interfacecase/api_requests.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" "gorm.io/datatypes" ) type ApiRequest struct { global.GVA_MODEL Agreement string `json:"agreement,omitempty" form:"agreement" gorm:"column:agreement;comment:协议"` Method string `json:"method,omitem...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/debugtalk.go
server/model/interfacecase/debugtalk.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) type FileType uint const ( FileDebugTalk FileType = 1 FileDebugTalkDefault FileType = 10 FileDebugTalkGen FileType = 2 FileDebugTalkGenDefault FileType = 20 ) var _ = []FileType{FileDebugTalkDefault, FileDeb...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_grpc.go
server/model/interfacecase/api_grpc.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" "gorm.io/datatypes" ) type GrpcType string const ( GrpcTypeSimple GrpcType = "Simple" GrpcTypeServerSideStream GrpcType = "ServerSideStream" GrpcTypeClientSideStream GrpcType = "ClientSideStream" GrpcTypeBidire...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/operator.go
server/model/interfacecase/operator.go
package interfacecase import "github.com/test-instructor/yangfan/server/model/system" type Operator struct { CreatedBy *uint `json:"CreatedBy,omitempty" gorm:"column:created_by_id;comment:创建者"` UpdateBy *uint `json:"UpdateBy,omitempty" gorm:"column:update_by_id;comment:更新者"` DeleteBy *uint `json:"DeleteBy,omitem...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/CI.go
server/model/interfacecase/CI.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" "gorm.io/datatypes" ) type ApiReportCI struct { global.GVA_MODEL Key string `json:"key" yaml:"key"` TagID uint `json:"tag" fo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/apimenu.go
server/model/interfacecase/apimenu.go
// 自动生成模板ApiMenu package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) type MenuType int // ApiMenu 结构体 // 如果含有time.Time 请自行import time包 type ApiMenu struct { global.GVA_MODEL Operator Name string `json:"name,omitempty" form:"name" gorm:"column:name;comment:菜单名称;"` Parent uin...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/report_performance.go
server/model/interfacecase/report_performance.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" "gorm.io/datatypes" ) type PerformanceReport struct { global.GVA_MODEL Name string `json:"name"` State State ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/interface_template.go
server/model/interfacecase/interface_template.go
// 自动生成模板InterfaceTemplate package interfacecase import ( "gorm.io/datatypes" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase/customType" ) type ApiType int const ( ApiTypeTemplate ApiType = 1 // 接口模板 ApiTypeCase ApiType = 2 //...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/many2many.go
server/model/interfacecase/many2many.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) type ApiCaseStepRelationship struct { global.GVA_MODEL ApiStep ApiStep ApiStepId uint `gorm:"comment:测试步骤"` ApiCaseStep ApiCaseStep ApiCaseStepId uint `gorm:"comment:测试步骤"` Sort uint `gorm:"comment:排序"` } ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/performance.go
server/model/interfacecase/performance.go
package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) type Performance struct { global.GVA_MODEL Operator Name string `json:"name,omitempty" form:"name" gorm:"column:name;comment:性能任务名称;"` State State `json:"status,omitempty" form:"status" gorm:"column:status;c...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_config.go
server/model/interfacecase/api_config.go
// 自动生成模板ApiConfig package interfacecase import ( "gorm.io/datatypes" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase/customType" ) // ApiConfig 结构体 // 如果含有time.Time 请自行import time包 type ApiConfig struct { global.GVA_MODEL Operator Name ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/apiReport.go
server/model/interfacecase/apiReport.go
package interfacecase import ( "time" "gorm.io/datatypes" "github.com/test-instructor/yangfan/server/global" ) type CaseType int type RunType int const ( CaseTypeApi CaseType = 1 // api 运行 CaseTypeStep CaseType = 2 // 步骤运行 CaseTypeCases CaseType = 3 // 用例运行 CaseTypeTask CaseType ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_case_step.go
server/model/interfacecase/api_case_step.go
// 自动生成模板TestCase package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) type ApiStepType string const ( ApiStepTypeTransaction ApiStepType = "Transaction" ApiStepTypeTransactionStart ApiStepType = "TransactionStart" ApiStepTypeTransactionEnd ApiStepType = "TransactionEnd" Ap...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/message.go
server/model/interfacecase/message.go
package interfacecase import "github.com/test-instructor/yangfan/server/global" type MessageType string const MessageTypeFeishu MessageType = "feishu" const MessageTypeDingtalk MessageType = "dingtalk" const MessageTypeWechat MessageType = "wechat" const MessageTypeWechatText MessageType = "wechat_text" const Messag...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/api_case.go
server/model/interfacecase/api_case.go
// 自动生成模板ApiCase package interfacecase import ( "github.com/test-instructor/yangfan/server/global" ) // ApiCase 结构体 // 如果含有time.Time 请自行import time包 type ApiCase struct { global.GVA_MODEL Operator Name string `json:"name,omitempty" form:"name" gorm:"column:name;comment:用例名称;"` Status *bool ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/customType/customType.go
server/model/interfacecase/customType/customType.go
package customType import ( "bytes" "database/sql/driver" "encoding/json" "errors" "fmt" ) type TypeArgsMap []map[string]interface{} // Scan Scanner func (argsMap *TypeArgsMap) Scan(value interface{}) error { if value == nil { return nil } b, ok := value.([]byte) if !ok { return fmt.Errorf("value is not...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/hrp/reportToJson.go
server/model/interfacecase/hrp/reportToJson.go
package hrp type StepResultStruct struct { ID int `json:"ID"` ParntID int `json:"parntID"` Name string `json:"name"` StepType string `json:"step_type"` Success bool `json:"success"` ElapsedMs int ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/py_pkg.go
server/model/interfacecase/request/py_pkg.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type HrpPyPkgRequest struct { interfacecase.HrpPyPkg request.PageInfo }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/grpc.go
server/model/interfacecase/request/grpc.go
package request type GrpcFunc struct { Host *string `json:"host" form:"host"` Server *string `json:"server" form:"server"` Method *string `json:"method" form:"method"` Ref *bool `json:"ref" form:"ref"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/apiCase.go
server/model/interfacecase/request/apiCase.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type ApiCaseSearch struct { interfacecase.ApiCase request.PageInfo FrontCase bool `json:"front_case,omitempty" form:"front_case"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/CI.go
server/model/interfacecase/request/CI.go
package request import "gorm.io/datatypes" type CIRun struct { TagID uint `json:"tag" form:"tag"` // 标签ID TaskID uint `json:"task" form:"task"` // 任务ID EnvID uint `json:"env" form:"env"` // 环境ID UUID ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/apimenu.go
server/model/interfacecase/request/apimenu.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type ApiMenuSearch struct { interfacecase.ApiMenu request.PageInfo }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/timer_task.go
server/model/interfacecase/request/timer_task.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type TimerTaskSearch struct { interfacecase.ApiTimerTask request.PageInfo } type TimerTaskTagSearch struct { interfacecase.ApiTimerTaskTag } type SetTimerC...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/interface_template.go
server/model/interfacecase/request/interface_template.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type InterfaceTemplateSearch struct { interfacecase.ApiStep request.PageInfo ApiType int `json:"type,omitempty" form:"type"` } type InterfaceTemplateApi str...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/environment.go
server/model/interfacecase/request/environment.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type EnvSearch struct { interfacecase.ApiEnv request.PageInfo } type EnvVariableSearch struct { ShowKey bool `json:"show_key,omitempty" form:"show_key"` in...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/performance.go
server/model/interfacecase/request/performance.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type PerformancekSearch struct { interfacecase.Performance request.PageInfo }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/api_config.go
server/model/interfacecase/request/api_config.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type ApiConfigSearch struct { interfacecase.ApiConfig request.PageInfo }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/api_case_step.go
server/model/interfacecase/request/api_case_step.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type TestCaseSearch struct { interfacecase.ApiCaseStep request.PageInfo FrontCase bool `json:"front_case,omitempty" form:"front_case"` ApiT...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/report.go
server/model/interfacecase/request/report.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type ReportSearch struct { interfacecase.ApiReport request.PageInfo ApiType int `json:"type,omitempty" form:"type"` RunType int `json:"runType,omitempty" fo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/interfacecase/request/message.go
server/model/interfacecase/request/message.go
package request import ( "github.com/test-instructor/yangfan/server/model/common/request" "github.com/test-instructor/yangfan/server/model/interfacecase" ) type ApiMessaceSearch struct { request.PageInfo interfacecase.ApiMessage }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/common/response/response.go
server/model/common/response/response.go
package response import ( "net/http" "github.com/gin-gonic/gin" ) type Response struct { Code int `json:"code"` Data interface{} `json:"data"` Msg string `json:"msg"` } const ( ERROR = 7 SUCCESS = 0 ) func Result(code int, data interface{}, msg string, c *gin.Context) { // 开始时间 c.JSON(http...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/common/response/common.go
server/model/common/response/common.go
package response type PageResult struct { List interface{} `json:"list"` Total int64 `json:"total"` Page int `json:"page"` PageSize int `json:"pageSize"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/common/request/common.go
server/model/common/request/common.go
package request // PageInfo Paging common input parameter structure type PageInfo struct { Page int `json:"page" form:"page"` // 页码 PageSize int `json:"pageSize" form:"pageSize"` // 每页大小 Keyword string `json:"keyword" form:"keyword"` //关键字 } // GetById Find by id structure type GetById struct ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/exa_customer.go
server/model/example/exa_customer.go
package example import ( "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" ) type ExaCustomer struct { global.GVA_MODEL CustomerName string `json:"customerName" form:"customerName" gorm:"comment:客户名"` // 客户名 CustomerPhoneData ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/exa_excel.go
server/model/example/exa_excel.go
package example import "github.com/test-instructor/yangfan/server/model/system" type ExcelInfo struct { FileName string `json:"fileName"` // 文件名 InfoList []system.SysBaseMenu `json:"infoList"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/exa_breakpoint_continue.go
server/model/example/exa_breakpoint_continue.go
package example import ( "github.com/test-instructor/yangfan/server/global" ) // file struct, 文件结构体 type ExaFile struct { global.GVA_MODEL FileName string FileMd5 string FilePath string ExaFileChunk []ExaFileChunk ChunkTotal int IsFinish bool } // file chunk struct, 切片结构体 type ExaFileChunk...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/exa_file_upload_download.go
server/model/example/exa_file_upload_download.go
package example import ( "github.com/test-instructor/yangfan/server/global" ) type ExaFileUploadAndDownload struct { global.GVA_MODEL Name string `json:"name" gorm:"comment:文件名"` // 文件名 Url string `json:"url" gorm:"comment:文件地址"` // 文件地址 Tag string `json:"tag" gorm:"comment:文件标签"` // 文件标签 Key string `json:"k...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/response/exa_customer.go
server/model/example/response/exa_customer.go
package response import "github.com/test-instructor/yangfan/server/model/example" type ExaCustomerResponse struct { Customer example.ExaCustomer `json:"customer"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/response/exa_breakpoint_continue.go
server/model/example/response/exa_breakpoint_continue.go
package response import "github.com/test-instructor/yangfan/server/model/example" type FilePathResponse struct { FilePath string `json:"filePath"` } type FileResponse struct { File example.ExaFile `json:"file"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/model/example/response/exa_file_upload_download.go
server/model/example/response/exa_file_upload_download.go
package response import "github.com/test-instructor/yangfan/server/model/example" type ExaFileResponse struct { File example.ExaFileUploadAndDownload `json:"file"` }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/need_init.go
server/middleware/need_init.go
package middleware import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" ) // 处理跨域请求,支持options访问 func NeedInit() gin.HandlerFunc { return func(c *gin.Context) { if global.GVA_DB == nil { response.OkWithDetailed...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/cors.go
server/middleware/cors.go
package middleware import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/config" "github.com/test-instructor/yangfan/server/global" "net/http" ) // Cors 直接放行所有跨域请求并放行所有 OPTIONS 方法 func Cors() gin.HandlerFunc { return func(c *gin.Context) { method := c.Request.Method origin := c.Reque...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/loadtls.go
server/middleware/loadtls.go
package middleware import ( "fmt" "github.com/gin-gonic/gin" "github.com/unrolled/secure" ) // 用https把这个中间件在router里面use一下就好 func LoadTls() gin.HandlerFunc { return func(c *gin.Context) { middleware := secure.New(secure.Options{ SSLRedirect: true, SSLHost: "localhost:443", }) err := middleware.Pr...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/error.go
server/middleware/error.go
package middleware import ( "net" "net/http" "net/http/httputil" "os" "runtime/debug" "strings" "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) // GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志 func GinRecovery(stack bool) gin.HandlerFunc { return func(c *gi...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/casbin_rbac.go
server/middleware/casbin_rbac.go
package middleware import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" "github.com/test-instructor/yangfan/server/service" "github.com/test-instructor/yangfan/server/utils" "strconv" ) var casbinService = servic...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/CI.go
server/middleware/CI.go
package middleware import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" interfacecaseReq "github.com/test-instructor/yangfan/server/model/interfacecase/request" "github.com/test-instructor/yangfan/server/model/syst...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/email.go
server/middleware/email.go
package middleware import ( "bytes" "io/ioutil" "strconv" "time" "github.com/test-instructor/yangfan/server/plugin/email/utils" utils2 "github.com/test-instructor/yangfan/server/utils" "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/mo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/jwt.go
server/middleware/jwt.go
package middleware import ( "strconv" "time" "github.com/test-instructor/yangfan/server/utils" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/serve...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/operation.go
server/middleware/operation.go
package middleware import ( "bytes" "encoding/json" "io/ioutil" "net/http" "net/url" "strconv" "strings" "sync" "time" "github.com/test-instructor/yangfan/server/utils" "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/logger.go
server/middleware/logger.go
package middleware import ( "bytes" "encoding/json" "fmt" "io/ioutil" "strings" "time" "github.com/gin-gonic/gin" ) // LogLayout 日志layout type LogLayout struct { Time time.Time Metadata map[string]interface{} // 存储自定义原数据 Path string // 访问路径 Query string // 携带...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/project.go
server/middleware/project.go
package middleware import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/utils" "net/http" ) //var projectService...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/middleware/limit_ip.go
server/middleware/limit_ip.go
package middleware import ( "context" "errors" "net/http" "time" "go.uber.org/zap" "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/common/response" ) type LimitConfig struct { // GenerationKey 根据业务生成key 下面CheckOrMark查询生成 Genera...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/api.go
server/source/system/api.go
package system import ( "context" "github.com/pkg/errors" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) type initApi struct{} const initOrderApi = system.InitOrderSystem + 1 // auto run func init() { system.Registe...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/view_authority_menu_mysql.go
server/source/system/view_authority_menu_mysql.go
package system import ( "context" "fmt" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" "strings" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" sysModel "github.com/test-instructor/yangfan/server/model/system" ) const initOrderMenuViewMysql = initOrderMe...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/dictionary_detail.go
server/source/system/dictionary_detail.go
package system import ( "context" "fmt" "github.com/pkg/errors" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderDictDetail = initOrderDict + 1 type initDictDetail struct{} // auto run func init() { sy...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/dictionary.go
server/source/system/dictionary.go
package system import ( "context" "github.com/pkg/errors" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderDict = initOrderCasbin + 1 type initDict struct{} // auto run func init() { system.RegisterInit...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/casbin.go
server/source/system/casbin.go
package system import ( "context" adapter "github.com/casbin/gorm-adapter/v3" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderCasbin = initOrderApi + 1 type initCasbin struct{} // auto run func init() { system.RegisterInit(initOrderCasbin, &i...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/menu.go
server/source/system/menu.go
package system import ( "context" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" . "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" "time" ) const initOrderMenu = initOrderAuthority + 1 type initMenu ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/user.go
server/source/system/user.go
package system import ( "context" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "github.com/test-instructor/yangfan/server/utils" "gorm.io/gorm" ) const initOrderUser = initOr...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/authority.go
server/source/system/authority.go
package system import ( "context" "github.com/pkg/errors" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderAuthority = initOrderCasbin + 1 type initAuthority struct{} // auto run func init() { system.Re...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/authorities_menus.go
server/source/system/authorities_menus.go
package system import ( "context" "github.com/pkg/errors" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderMenuAuthority = initOrderMenu + initOrderAuthority type initMenuAuthority struct{} // auto run ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/system/view_authority_menu_postgres.go
server/source/system/view_authority_menu_postgres.go
package system import ( "context" "fmt" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" "strings" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" sysModel "github.com/test-instructor/yangfan/server/model/system" ) const initOrderMenuViewPg = initOrderMenuA...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/yangfan/yangfan.go
server/source/yangfan/yangfan.go
package yangfan func Init() { go RegisterApis() go RegisterMenus() go InitPythonPackage(true) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/yangfan/api_platform.go
server/source/yangfan/api_platform.go
package yangfan import ( "time" system2 "github.com/test-instructor/yangfan/server/service/system" "go.uber.org/zap" "gorm.io/gorm" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/system" ) func RegisterApis() { entities := []system.SysApi{ {ApiGroup: "...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
true
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/yangfan/pypkg.go
server/source/yangfan/pypkg.go
package yangfan import ( "fmt" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "github.com/test-instructor/yangfan/server/model/interfacecase/request" "github.com/test-instructor/yangfan/server/service" "go.uber.org/zap" "gopkg.in/yaml.v3" "os"...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/source/example/file_upload_download.go
server/source/example/file_upload_download.go
package example import ( "context" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/model/example" "github.com/test-instructor/yangfan/server/service/system" "gorm.io/gorm" ) const initOrderExaFile = system.InitOrderInternal + 1 type initExaFileMysql struct{} // auto run func init() { system...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/gorm_pgsql.go
server/initialize/gorm_pgsql.go
package initialize import ( "gorm.io/driver/postgres" "gorm.io/gorm" "github.com/test-instructor/yangfan/server/config" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/initialize/internal" ) // GormPgSql 初始化 Postgresql 数据库 // GormPgSql Author [SliverHorn](https://g...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/redis.go
server/initialize/redis.go
package initialize import ( "context" "github.com/test-instructor/yangfan/server/global" "github.com/go-redis/redis/v8" "go.uber.org/zap" ) func Redis() { redisCfg := global.GVA_CONFIG.Redis client := redis.NewClient(&redis.Options{ Addr: redisCfg.Addr, Password: redisCfg.Password, // no password set ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/timer.go
server/initialize/timer.go
package initialize import ( "fmt" ifc "github.com/test-instructor/yangfan/server/service/interfacecase" "strconv" "github.com/robfig/cron/v3" "github.com/test-instructor/yangfan/server/config" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/router.go
server/initialize/router.go
package initialize import ( "net/http" "github.com/gin-gonic/gin" "github.com/swaggo/gin-swagger" "github.com/swaggo/gin-swagger/swaggerFiles" _ "github.com/test-instructor/yangfan/server/docs" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/middleware" "github.c...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/register_init.go
server/initialize/register_init.go
package initialize import ( _ "github.com/test-instructor/yangfan/server/source/example" _ "github.com/test-instructor/yangfan/server/source/system" ) func init() { // do nothing,only import source package so that inits can be registered }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/validator.go
server/initialize/validator.go
package initialize import "github.com/test-instructor/yangfan/server/utils" func init() { _ = utils.RegisterRule("PageVerify", utils.Rules{ "Page": {utils.NotEmpty()}, "PageSize": {utils.NotEmpty()}, }, ) _ = utils.RegisterRule("IdVerify", utils.Rules{ "Id": {utils.NotEmpty()}, }, ) _ = util...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/gorm_mysql.go
server/initialize/gorm_mysql.go
package initialize import ( "gorm.io/driver/mysql" "gorm.io/gorm" "github.com/test-instructor/yangfan/server/config" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/initialize/internal" ) // GormMysql 初始化Mysql数据库 // GormMysql Author [SliverHorn](https://github.com/...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/ensure_tables.go
server/initialize/ensure_tables.go
package initialize import ( "context" adapter "github.com/casbin/gorm-adapter/v3" "gorm.io/gorm" "github.com/test-instructor/yangfan/server/model/example" sysModel "github.com/test-instructor/yangfan/server/model/system" "github.com/test-instructor/yangfan/server/service/system" ) const initOrderEnsureTables ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/db_list.go
server/initialize/db_list.go
package initialize import ( "gorm.io/gorm" "github.com/test-instructor/yangfan/server/config" "github.com/test-instructor/yangfan/server/global" ) const sys = "system" func DBList() { dbMap := make(map[string]*gorm.DB) for _, info := range global.GVA_CONFIG.DBList { if info.Disable { continue } switch...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/plugin.go
server/initialize/plugin.go
package initialize import ( "fmt" "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/middleware" "github.com/test-instructor/yangfan/server/plugin/email" "github.com/test-instructor/yangfan/server/plugin/fslogin" "github.com/test-instructor...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/gorm.go
server/initialize/gorm.go
package initialize import ( "os" "github.com/test-instructor/yangfan/server/model/interfacecase" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/example" "github.com/test-instructor/yangfan/server/model/system" "go.uber.org/zap" "gorm.io/gorm" ) // Gorm 初始...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/internal/logger.go
server/initialize/internal/logger.go
package internal import ( "fmt" "github.com/test-instructor/yangfan/server/global" "gorm.io/gorm/logger" ) type writer struct { logger.Writer } // NewWriter writer 构造函数 // Author [SliverHorn](https://github.com/SliverHorn) func NewWriter(w logger.Writer) *writer { return &writer{Writer: w} } // Printf 格式化打印日志...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/initialize/internal/gorm.go
server/initialize/internal/gorm.go
package internal import ( "log" "os" "time" "github.com/test-instructor/yangfan/server/global" "gorm.io/gorm" "gorm.io/gorm/logger" ) type DBBASE interface { GetLogMode() string } var Gorm = new(_gorm) type _gorm struct{} // Config gorm 自定义配置 // Author [SliverHorn](https://github.com/SliverHorn) func (g *_...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/breakpoint_continue.go
server/utils/breakpoint_continue.go
package utils import ( "io/ioutil" "os" "strconv" ) // 前端传来文件片与当前片为什么文件的第几片 // 后端拿到以后比较次分片是否上传 或者是否为不完全片 // 前端发送每片多大 // 前端告知是否为最后一片且是否完成 const ( breakpointDir = "./breakpointDir/" finishDir = "./fileDir/" ) //@author: [piexlmax](https://github.com/piexlmax) //@function: BreakPointContinue //@description: 断...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/verify.go
server/utils/verify.go
package utils var ( IdVerify = Rules{"ID": {NotEmpty()}} ApiVerify = Rules{"Path": {NotEmpty()}, "Description": {NotEmpty()}, "ApiGroup": {NotEmpty()}, "Method": {NotEmpty()}} MenuVerify = Rules{"Path": {NotEmpty()}, "ParentId": {NotEmpty()}, "Name": {NotEmpty()}, "Component":...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/injection_code.go
server/utils/injection_code.go
package utils import ( "errors" "fmt" "go/ast" "go/parser" "go/token" "io/ioutil" "strings" ) //@author: [LeonardWang](https://github.com/WangLeonard) //@function: AutoInjectionCode //@description: 向文件中固定注释位置写入代码 //@param: filepath string, funcName string, codeData string //@return: error const ( startCommen...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/zipfiles.go
server/utils/zipfiles.go
package utils import ( "archive/zip" "io" "os" "strings" ) //@author: [piexlmax](https://github.com/piexlmax) //@function: ZipFiles //@description: 压缩文件 //@param: filename string, files []string, oldForm, newForm string //@return: error func ZipFiles(filename string, files []string, oldForm, newForm string) erro...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/fmt_plus.go
server/utils/fmt_plus.go
package utils import ( "fmt" "reflect" "strings" ) //@author: [piexlmax](https://github.com/piexlmax) //@function: StructToMap //@description: 利用反射将结构体转化为map //@param: obj interface{} //@return: map[string]interface{} func StructToMap(obj interface{}) map[string]interface{} { obj1 := reflect.TypeOf(obj) obj2 :=...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/hash.go
server/utils/hash.go
package utils import ( "golang.org/x/crypto/bcrypt" ) // BcryptHash 使用 bcrypt 对密码进行加密 func BcryptHash(password string) string { bytes, _ := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) return string(bytes) } // BcryptCheck 对比明文密码和数据库的哈希值 func BcryptCheck(password, hash string) bool { err := ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/file_operations.go
server/utils/file_operations.go
package utils import ( "os" "path/filepath" "reflect" "strings" ) //@author: [songzhibin97](https://github.com/songzhibin97) //@function: FileMove //@description: 文件移动供外部调用 //@param: src string, dst string(src: 源位置,绝对路径or相对路径, dst: 目标位置,绝对路径or相对路径,必须为文件夹) //@return: err error func FileMove(src string, dst string...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/directory.go
server/utils/directory.go
package utils import ( "errors" "os" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) //@author: [piexlmax](https://github.com/piexlmax) //@function: PathExists //@description: 文件目录是否存在 //@param: path string //@return: bool, error func PathExists(path string) (bool, error) { fi, err := os...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/zip.go
server/utils/zip.go
package utils import ( "archive/zip" "io" "os" "path/filepath" ) //解压 func Unzip(zipFile string, destDir string) ([]string, error) { zipReader, err := zip.OpenReader(zipFile) var paths []string if err != nil { return []string{}, err } defer zipReader.Close() for _, f := range zipReader.File { fpath := ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/validator.go
server/utils/validator.go
package utils import ( "errors" "reflect" "regexp" "strconv" "strings" ) type Rules map[string][]string type RulesMap map[string]Rules var CustomizeMap = make(map[string]Rules) //@author: [piexlmax](https://github.com/piexlmax) //@function: RegisterRule //@description: 注册自定义规则方案建议在路由初始化层即注册 //@param: key stri...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/utils/md5.go
server/utils/md5.go
package utils import ( "crypto/md5" "encoding/hex" ) //@author: [piexlmax](https://github.com/piexlmax) //@function: MD5V //@description: md5加密 //@param: str []byte //@return: string func MD5V(str []byte, b ...byte) string { h := md5.New() h.Write(str) return hex.EncodeToString(h.Sum(b)) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false