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/utils/jwt.go | server/utils/jwt.go | package utils
import (
"errors"
"time"
"github.com/golang-jwt/jwt/v4"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/system/request"
)
type JWT struct {
SigningKey []byte
}
var (
TokenExpired = errors.New("Token is expired")
TokenNotValidYet = errors.... | 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/server.go | server/utils/server.go | package utils
import (
"runtime"
"time"
"github.com/shirou/gopsutil/v3/cpu"
"github.com/shirou/gopsutil/v3/disk"
"github.com/shirou/gopsutil/v3/mem"
)
const (
B = 1
KB = 1024 * B
MB = 1024 * KB
GB = 1024 * MB
)
type Server struct {
Os Os `json:"os"`
Cpu Cpu `json:"cpu"`
Ram Ram `json:"ram"`
Di... | 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/clamis.go | server/utils/clamis.go | package utils
import (
"github.com/gin-gonic/gin"
uuid "github.com/satori/go.uuid"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/system"
systemReq "github.com/test-instructor/yangfan/server/model/system/request"
"strconv"
)
func GetClaims(c *gin.Context) (*s... | 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/db_automation.go | server/utils/db_automation.go | package utils
import (
"errors"
"fmt"
"time"
"gorm.io/gorm"
)
//@author: [songzhibin97](https://github.com/songzhibin97)
//@function: ClearTable
//@description: 清理数据库表数据
//@param: db(数据库对象) *gorm.DB, tableName(表名) string, compareField(比较字段) string, interval(间隔) string
//@return: error
func ClearTable(db *gorm.D... | 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/reload.go | server/utils/reload.go | package utils
import (
"errors"
"os"
"os/exec"
"runtime"
"strconv"
)
func Reload() error {
if runtime.GOOS == "windows" {
return errors.New("系统不支持")
}
pid := os.Getpid()
cmd := exec.Command("kill", "-1", strconv.Itoa(pid))
return cmd.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/utils/plugin/plugin_uinx.go | server/utils/plugin/plugin_uinx.go | //go:build !windows
// +build !windows
package plugin
import (
"errors"
"fmt"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
"plugin"
"sync"
)
var ManagementPlugin = managementPlugin{mp: make(map[string]*plugin.Plugin)}
type managementPlugin struct {
mp map[string]*plugin.Plugin
sync.Mutex
}
func (m *managemen... | 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/plugin/plugin.go | server/utils/plugin/plugin.go | package plugin
import (
"github.com/gin-gonic/gin"
)
const (
OnlyFuncName = "Plugin"
)
// Plugin 插件模式接口化
type Plugin interface {
// Register 注册路由
Register(group *gin.RouterGroup)
// RouterPath 用户返回注册路由
RouterPath() 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/upload/local.go | server/utils/upload/local.go | package upload
import (
"errors"
"io"
"mime/multipart"
"os"
"path"
"strings"
"time"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/utils"
"go.uber.org/zap"
)
type Local struct{}
//@author: [piexlmax](https://github.com/piexlmax)
//@author: [ccfish86](https://... | 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/upload/qiniu.go | server/utils/upload/qiniu.go | package upload
import (
"context"
"errors"
"fmt"
"mime/multipart"
"time"
"github.com/qiniu/api.v7/v7/auth/qbox"
"github.com/qiniu/api.v7/v7/storage"
"github.com/test-instructor/yangfan/server/global"
"go.uber.org/zap"
)
type Qiniu struct{}
//@author: [piexlmax](https://github.com/piexlmax)
//@author: [ccfi... | 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/upload/aliyun_oss.go | server/utils/upload/aliyun_oss.go | package upload
import (
"errors"
"mime/multipart"
"time"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
"github.com/test-instructor/yangfan/server/global"
"go.uber.org/zap"
)
type AliyunOSS struct{}
func (*AliyunOSS) UploadFile(file *multipart.FileHeader) (string, string, error) {
bucket, err := NewBucket()
if e... | 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/upload/tencent_cos.go | server/utils/upload/tencent_cos.go | package upload
import (
"context"
"errors"
"fmt"
"mime/multipart"
"net/http"
"net/url"
"time"
"github.com/test-instructor/yangfan/server/global"
"github.com/tencentyun/cos-go-sdk-v5"
"go.uber.org/zap"
)
type TencentCOS struct{}
// UploadFile upload file to COS
func (*TencentCOS) UploadFile(file *multipar... | 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/upload/obs.go | server/utils/upload/obs.go | package upload
import (
"github.com/huaweicloud/huaweicloud-sdk-go-obs/obs"
"github.com/pkg/errors"
"github.com/test-instructor/yangfan/server/global"
"mime/multipart"
)
var HuaWeiObs = new(_obs)
type _obs struct{}
func NewHuaWeiObsClient() (client *obs.ObsClient, err error) {
return obs.New(global.GVA_CONFIG.... | 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/upload/upload.go | server/utils/upload/upload.go | package upload
import (
"mime/multipart"
"github.com/test-instructor/yangfan/server/global"
)
// OSS 对象存储接口
// Author [SliverHorn](https://github.com/SliverHorn)
// Author [ccfish86](https://github.com/ccfish86)
type OSS interface {
UploadFile(file *multipart.FileHeader) (string, string, error)
DeleteFile(key st... | 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/upload/aws_s3.go | server/utils/upload/aws_s3.go | package upload
import (
"errors"
"fmt"
"mime/multipart"
"time"
"github.com/test-instructor/yangfan/server/global"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/... | 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/timer/timed_task.go | server/utils/timer/timed_task.go | package timer
import (
"sync"
"github.com/robfig/cron/v3"
)
type Timer interface {
AddTaskByFunc(taskName string, spec string, task func(), option ...cron.Option) (cron.EntryID, error)
AddTaskByJob(taskName string, spec string, job interface{ Run() }, option ...cron.Option) (cron.EntryID, error)
FindCron(taskNa... | 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/timer/timed_task_test.go | server/utils/timer/timed_task_test.go | package timer
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
var job = mockJob{}
type mockJob struct{}
func (job mockJob) Run() {
mockFunc()
}
func mockFunc() {
time.Sleep(time.Second)
fmt.Println("1s...")
}
func TestNewApiCase(t *testing.T) {
tm := NewApiCase()
_tm := tm.(*timer... | 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/captcha/redis.go | server/utils/captcha/redis.go | package captcha
import (
"context"
"time"
"github.com/mojocn/base64Captcha"
"github.com/test-instructor/yangfan/server/global"
"go.uber.org/zap"
)
func NewDefaultRedisStore() *RedisStore {
return &RedisStore{
Expiration: time.Second * 180,
PreKey: "CAPTCHA_",
}
}
type RedisStore struct {
Expiration ... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/enter.go | server/api/v1/enter.go | package v1
import (
"github.com/test-instructor/yangfan/server/api/v1/example"
"github.com/test-instructor/yangfan/server/api/v1/interfacecase"
"github.com/test-instructor/yangfan/server/api/v1/system"
)
type ApiGroup struct {
SystemApiGroup system.ApiGroup
ExampleApiGroup example.ApiGroup
Interfa... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_dictionary_detail.go | server/api/v1/system/sys_dictionary_detail.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"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/model/system/request"
"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/api/v1/system/sys_dictionary.go | server/api/v1/system/sys_dictionary.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"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/model/system/request"
"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/api/v1/system/sys_auto_code_history.go | server/api/v1/system/sys_auto_code_history.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
systemReq "github.com/test-instructor/yangfan/server/model/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/api/v1/system/sys_authority.go | server/api/v1/system/sys_authority.go | package system
import (
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
systemReq "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/api/v1/system/sys_authority_btn.go | server/api/v1/system/sys_authority_btn.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system/request"
)
type AuthorityBtnApi struct{}
// GetAuthorityBtn @Tags Aut... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_initdb.go | server/api/v1/system/sys_initdb.go | package system
import (
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system/request"
"go.uber.org/zap"
"github.com/gin-gonic/gin"
)
type DBApi struct{}
// InitDB
// @Tags InitDB
// @Summary... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_system.go | server/api/v1/system/sys_system.go | package system
import (
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
systemRes "github.com/test-instructor/yangfan/server/model/system/response"
"github.com/test-instructor/yangfan/serv... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_auto_code.go | server/api/v1/system/sys_auto_code.go | package system
import (
"errors"
"fmt"
"net/url"
"os"
"strings"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"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/t... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_operation_record.go | server/api/v1/system/sys_operation_record.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
sys... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_api.go | server/api/v1/system/sys_api.go | package system
import (
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
systemReq "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/api/v1/system/sys_menu.go | server/api/v1/system/sys_menu.go | package system
import (
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
systemReq "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/api/v1/system/sys_captcha.go | server/api/v1/system/sys_captcha.go | package system
import (
"github.com/gin-gonic/gin"
"github.com/mojocn/base64Captcha"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
systemRes "github.com/test-instructor/yangfan/server/model/system/response"
)
// 当开启多服务器部署时... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_casbin.go | server/api/v1/system/sys_casbin.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system/request"
systemRes "github.com/test-instructor/yangfan/server/model/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/api/v1/system/project.go | server/api/v1/system/project.go | package system
import (
"github.com/gin-gonic/gin"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
interfacecaseReq "githu... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_jwt_blacklist.go | server/api/v1/system/sys_jwt_blacklist.go | package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
)
type JwtApi struct{}
// JsonInBlacklist @Tags Jwt
// @Summary jwt加... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/sys_user.go | server/api/v1/system/sys_user.go | package system
import (
"strconv"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/system"
systemReq "github.com/test-instructor/y... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/system/enter.go | server/api/v1/system/enter.go | package system
import "github.com/test-instructor/yangfan/server/service"
type ApiGroup struct {
DBApi
JwtApi
BaseApi
SystemApi
CasbinApi
AutoCodeApi
SystemApiApi
AuthorityApi
DictionaryApi
AuthorityMenuApi
OperationRecordApi
AutoCodeHistoryApi
DictionaryDetailApi
AuthorityBtnApi
ProjectApi
}
var (
a... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/run_case.go | server/api/v1/interfacecase/run_case.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/interfacecase"
"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/api/v1/interfacecase/py_pkg.go | server/api/v1/interfacecase/py_pkg.go | package interfacecase
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/interfacecase"
"github.com/test-instructor/yangfan/server/model/interfacecase/request"
"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/api/v1/interfacecase/CI.go | server/api/v1/interfacecase/CI.go | package interfacecase
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/interfacecase"
interfacecaseReq "github.com/test-instructor/yangfan/server/model/interface... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/apimenu.go | server/api/v1/interfacecase/apimenu.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/inter... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/timer_task.go | server/api/v1/interfacecase/timer_task.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/inter... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/interface_template.go | server/api/v1/interfacecase/interface_template.go | package interfacecase
import (
"strconv"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"gorm.io/gorm"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructo... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/environment.go | server/api/v1/interfacecase/environment.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/interfacecase"
interfacecaseReq "github.com/test-instructor/yangfan/se... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/performance.go | server/api/v1/interfacecase/performance.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/interfacecase"
"github.com/test-instructor/yangfan/server/model/interf... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/api_config.go | server/api/v1/interfacecase/api_config.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/inter... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/api_case_step.go | server/api/v1/interfacecase/api_case_step.go | package interfacecase
import (
"strconv"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/report.go | server/api/v1/interfacecase/report.go | package interfacecase
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/interfacecase"
interfacecaseReq "github.com/test-instructor/yangfan/se... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/message.go | server/api/v1/interfacecase/message.go | package interfacecase
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/interfacecase"
interfacecaseReq "github.com/test-instructor/yangfan/server/model/interface... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/enter.go | server/api/v1/interfacecase/enter.go | package interfacecase
type ApiGroup struct {
// Code generated by server Begin; DO NOT EDIT.
ApiMenuApi
InterfaceTemplateApi
ApiCase
RunCaseApi
ApiConfigApi
ReportApi
ApiCaseApi
TimerTaskApi
PerformanceApi
PyPkg
EnvironmentAPi
MessageApi
ApiCIApi
// Code generated by server End; DO NOT EDIT.
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/interfacecase/api_case.go | server/api/v1/interfacecase/api_case.go | package interfacecase
import (
"strconv"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/example/exa_customer.go | server/api/v1/example/exa_customer.go | package example
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/example"
e... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/example/exa_excel.go | server/api/v1/example/exa_excel.go | package example
import (
"os"
"strings"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/example"
)
type ExcelApi struct{}
// /excel/importExcel 接... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/example/exa_breakpoint_continue.go | server/api/v1/example/exa_breakpoint_continue.go | package example
import (
"fmt"
"io/ioutil"
"mime/multipart"
"strconv"
"github.com/test-instructor/yangfan/server/model/example"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/response"
exampleRes "gith... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/example/exa_file_upload_download.go | server/api/v1/example/exa_file_upload_download.go | package example
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/common/request"
"github.com/test-instructor/yangfan/server/model/common/response"
"github.com/test-instructor/yangfan/server/model/example"
e... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/api/v1/example/enter.go | server/api/v1/example/enter.go | package example
import "github.com/test-instructor/yangfan/server/service"
type ApiGroup struct {
ExcelApi
CustomerApi
FileUploadAndDownloadApi
}
var (
excelService = service.ServiceGroupApp.ExampleServiceGroup.ExcelService
customerService = service.ServiceGroupApp.ExampleServiceGro... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/docs/docs.go | server/docs/docs.go | // Code generated by swaggo/swag. DO NOT EDIT.
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | true |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/grpc/grpc.go | server/grpc/grpc.go | package grpc
import (
"crypto/rand"
"encoding/hex"
"github.com/test-instructor/yangfan/proto/tools"
"github.com/test-instructor/yangfan/server/global"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"net"
"sync"
"ti... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/grpc/pkg/pkg.go | server/grpc/pkg/pkg.go | package pkg
import (
"context"
"fmt"
"github.com/robfig/cron/v3"
"github.com/test-instructor/yangfan/server/core/pkg"
"github.com/test-instructor/yangfan/server/grpc/client"
"github.com/test-instructor/yangfan/server/service/interfacecase/runTestCase"
"strconv"
"github.com/test-instructor/yangfan/proto/tools"... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/grpc/client/client.go | server/grpc/client/client.go | package client
import (
"context"
"fmt"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry"
"github.com/test-instructor/yangfan/proto/master"
"github.com/test-instructor/yangfan/proto/run"
"github.com/test-instructor/yangfan/proto/tools"
"github.com/test-instructor/yangfan/server/global"
"go.u... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/packfile/notUsePackFile.go | server/packfile/notUsePackFile.go | //go:build !packfile
// +build !packfile
package packfile
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/packfile/usePackFile.go | server/packfile/usePackFile.go | //go:build packfile
// +build packfile
package packfile
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
//go:generate go-bindata -o=staticFile.go -pkg=packfile -tags=packfile ../resource/... ../config.yaml
func writeFile(path string, data []byte) {
// 如果文件夹不存在,预先创建文件夹
if lastSeparator := strings.... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/zap.go | server/core/zap.go | package core
import (
"fmt"
"os"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/test-instructor/yangfan/server/core/internal"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/utils"
)
// Zap 获取 zap.Logger
// Author [SliverHorn](https://github.com/SliverHo... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/viper.go | server/core/viper.go | package core
import (
"flag"
"fmt"
"os"
"path/filepath"
"time"
"github.com/gin-gonic/gin"
"github.com/test-instructor/yangfan/server/core/internal"
"github.com/songzhibin97/gkit/cache/local_cache"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
"github.com/test-instructor/yangfan/server/global"... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/server_win.go | server/core/server_win.go | //go:build windows
// +build windows
package core
import (
"net/http"
"time"
"github.com/gin-gonic/gin"
)
func initServer(address string, router *gin.Engine) server {
return &http.Server{
Addr: address,
Handler: router,
ReadTimeout: 20 * time.Second,
WriteTimeout: 20 * time.Second,... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/server.go | server/core/server.go | package core
import (
"fmt"
"time"
"go.uber.org/zap"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/initialize"
"github.com/test-instructor/yangfan/server/service/system"
)
type server interface {
ListenAndServe() error
}
func RunWindowsServer() {
if global.GV... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/server_other.go | server/core/server_other.go | //go:build !windows
// +build !windows
package core
import (
"time"
"github.com/fvbock/endless"
"github.com/gin-gonic/gin"
)
func initServer(address string, router *gin.Engine) server {
s := endless.NewServer(address, router)
s.ReadHeaderTimeout = 20 * time.Second
s.WriteTimeout = 20 * time.Second
s.MaxHeade... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/pkg/install.go | server/core/pkg/install.go | package pkg
import (
"encoding/json"
"errors"
"github.com/test-instructor/yangfan/server/global"
"github.com/test-instructor/yangfan/server/model/interfacecase"
"github.com/test-instructor/yangfan/server/model/interfacecase/request"
"go.uber.org/zap"
"os"
"os/exec"
"strings"
"time"
)
func PyPkgInstallServic... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/internal/zap.go | server/core/internal/zap.go | package internal
import (
"fmt"
"time"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/test-instructor/yangfan/server/global"
)
var Zap = new(_zap)
type _zap struct{}
// GetEncoder 获取 zapcore.Encoder
// Author [SliverHorn](https://github.com/SliverHorn)
func (z *_zap) GetEncoder() zapcore.Encoder {
... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/internal/file_rotatelogs.go | server/core/internal/file_rotatelogs.go | package internal
import (
"os"
"path"
"time"
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"go.uber.org/zap/zapcore"
"github.com/test-instructor/yangfan/server/global"
)
var FileRotatelogs = new(fileRotatelogs)
type fileRotatelogs struct{}
// GetWriteSyncer 获取 zapcore.WriteSyncer
// Author [SliverHorn... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/core/internal/constant.go | server/core/internal/constant.go | package internal
const (
ConfigEnv = "GVA_CONFIG"
ConfigDefaultFile = "config.yaml"
ConfigTestFile = "config.test.yaml"
ConfigDebugFile = "config.debug.yaml"
ConfigReleaseFile = "config.release.yaml"
)
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/zap.go | server/config/zap.go | package config
import (
"go.uber.org/zap/zapcore"
"strings"
)
type Zap struct {
Level string `mapstructure:"level" json:"level" yaml:"level"` // 级别
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 日志前缀
Format string `map... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/cors.go | server/config/cors.go | package config
type CORS struct {
Mode string `mapstructure:"mode" json:"mode" yaml:"mode"`
Whitelist []CORSWhitelist `mapstructure:"whitelist" json:"whitelist" yaml:"whitelist"`
}
type CORSWhitelist struct {
AllowOrigin string `mapstructure:"allow-origin" json:"allow-origin" yaml:"allow-origin"... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/gorm_pgsql.go | server/config/gorm_pgsql.go | package config
type Pgsql struct {
GeneralDB `yaml:",inline" mapstructure:",squash"`
}
// Dsn 基于配置文件获取 dsn
// Author [SliverHorn](https://github.com/SliverHorn)
func (p *Pgsql) Dsn() string {
return "host=" + p.Path + " user=" + p.Username + " password=" + p.Password + " dbname=" + p.Dbname + " port=" + p.Port + " ... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_aliyun.go | server/config/oss_aliyun.go | package config
type AliyunOSS struct {
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
AccessKeyId string `mapstructure:"access-key-id" json:"access-key-id" yaml:"access-key-id"`
AccessKeySecret string `mapstructure:"access-key-secret" json:"access-key-secret" yaml:"access-key-s... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/redis.go | server/config/redis.go | package config
type Redis struct {
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/timer.go | server/config/timer.go | package config
type Timer struct {
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
WithSeconds bool `mapstructure:"with_seconds" json:"with_seconds" yaml:"with... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/config.go | server/config/config.go | package config
import "github.com/test-instructor/yangfan/server/plugin/fslogin/config"
type Server struct {
JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
Zap Zap `mapstructure:"zap" json:"zap" yaml:"zap"`
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
Email Email `mapst... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/captcha.go | server/config/captcha.go | package config
type Captcha struct {
KeyLong int `mapstructure:"key-long" json:"key-long" yaml:"key-long"` // 验证码长度
ImgWidth int `mapstructure:"img-width" json:"img-width" yaml:"img-width"` // 验证码宽度
ImgHeight int `mapstructure:"img-height" json:"img-height" yaml:"img-height"` // 验证码高度
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/system.go | server/config/system.go | package config
type System struct {
Env string `mapstructure:"env" json:"env" yaml:"env"` // 环境值
Addr int `mapstructure:"addr" json:"addr" yaml:"addr"` // 端口值
DbType string `mapstructure:"db-type" json:"db-type" yaml:"db-typ... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_huawei.go | server/config/oss_huawei.go | package config
type HuaWeiObs struct {
Path string `mapstructure:"path" json:"path" yaml:"path"`
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
AccessKey string `mapstructure:"access-key" json:"access-key" yaml:"a... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/gorm_mysql.go | server/config/gorm_mysql.go | package config
type Mysql struct {
GeneralDB `yaml:",inline" mapstructure:",squash"`
}
func (m *Mysql) Dsn() string {
return m.Username + ":" + m.Password + "@tcp(" + m.Path + ":" + m.Port + ")/" + m.Dbname + "?" + m.Config
}
func (m *Mysql) GetLogMode() string {
return m.LogMode
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/email.go | server/config/email.go | package config
type Email struct {
To string `mapstructure:"to" json:"to" yaml:"to"` // 收件人:多个以英文逗号分隔
Port int `mapstructure:"port" json:"port" yaml:"port"` // 端口
From string `mapstructure:"from" json:"from" yaml:"from"` // 收件人
Host string `mapstructur... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/jwt.go | server/config/jwt.go | package config
type JWT struct {
SigningKey string `mapstructure:"signing-key" json:"signing-key" yaml:"signing-key"` // jwt签名
ExpiresTime int64 `mapstructure:"expires-time" json:"expires-time" yaml:"expires-time"` // 过期时间
BufferTime int64 `mapstructure:"buffer-time" json:"buffer-time" yaml:"buffer-time"` ... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/db_list.go | server/config/db_list.go | package config
type DsnProvider interface {
Dsn() string
}
// Embeded 结构体可以压平到上一层,从而保持 config 文件的结构和原来一样
// 见 playground: https://go.dev/play/p/KIcuhqEoxmY
// GeneralDB 也被 Pgsql 和 Mysql 原样使用
type GeneralDB struct {
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/excel.go | server/config/excel.go | package config
type Excel struct {
Dir string `mapstructure:"dir" json:"dir" yaml:"dir"`
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_qiniu.go | server/config/oss_qiniu.go | package config
type Qiniu struct {
Zone string `mapstructure:"zone" json:"zone" yaml:"zone"` // 存储区域
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` // 空间名称
ImgPath string `mapstructure:"img-path" json:"img-path" yam... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_local.go | server/config/oss_local.go | package config
type Local struct {
Path string `mapstructure:"path" json:"path" yaml:"path"` // 本地文件访问路径
StorePath string `mapstructure:"store-path" json:"store-path" yaml:"store-path"` // 本地文件存储路径
}
| go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_tencent.go | server/config/oss_tencent.go | package config
type TencentCOS struct {
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Region string `mapstructure:"region" json:"region" yaml:"region"`
SecretID string `mapstructure:"secret-id" json:"secret-id" yaml:"secret-id"`
SecretKey string `mapstructure:"secret-key" json:"secre... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/grpc_host.go | server/config/grpc_host.go | package config
type YangFan struct {
Front string `mapstructure:"front" json:"front" yaml:"front"`
Report string `mapstructure:"report" json:"report" yaml:"report"`
Background string `mapstructure:"background" json:"background" yaml:"background"`
BackgroundGrpc... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/auto_code.go | server/config/auto_code.go | package config
type Autocode struct {
TransferRestart bool `mapstructure:"transfer-restart" json:"transfer-restart" yaml:"transfer-restart"`
Root string `mapstructure:"root" json:"root" yaml:"root"`
Server string `mapstructure:"server" json:"server" yaml:"server"`
SApi string `maps... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/config/oss_aws.go | server/config/oss_aws.go | package config
type AwsS3 struct {
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Region string `mapstructure:"region" json:"region" yaml:"region"`
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
S3ForcePathStyle bool `mapstructure:"s3-forc... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/enter.go | server/router/enter.go | package router
import (
"github.com/test-instructor/yangfan/server/router/example"
"github.com/test-instructor/yangfan/server/router/interfacecase"
"github.com/test-instructor/yangfan/server/router/system"
)
type RouterGroup struct {
System system.RouterGroup
Example example.RouterGroup
Interfaceca... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_base.go | server/router/system/sys_base.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
)
type BaseRouter struct{}
func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
baseRouter := Router.Group("base")
baseApi := v1.ApiGroupApp.SystemApiGroup.BaseApi
{
baseRouter.P... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_dictionary_detail.go | server/router/system/sys_dictionary_detail.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
"github.com/test-instructor/yangfan/server/middleware"
)
type DictionaryDetailRouter struct{}
func (s *DictionaryDetailRouter) InitSysDictionaryDetailRouter(Router *gin.RouterGroup) {
dictionaryDetailRouter ... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_dictionary.go | server/router/system/sys_dictionary.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
"github.com/test-instructor/yangfan/server/middleware"
)
type DictionaryRouter struct{}
func (s *DictionaryRouter) InitSysDictionaryRouter(Router *gin.RouterGroup) {
sysDictionaryRouter := Router.Group("sysD... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_auto_code_history.go | server/router/system/sys_auto_code_history.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
)
type AutoCodeHistoryRouter struct{}
func (s *AutoCodeRouter) InitAutoCodeHistoryRouter(Router *gin.RouterGroup) {
autoCodeHistoryRouter := Router.Group("autoCode")
autoCodeHistoryApi := v1.ApiGroupApp.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/router/system/sys_authority.go | server/router/system/sys_authority.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
"github.com/test-instructor/yangfan/server/middleware"
)
type AuthorityRouter struct{}
func (s *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) {
authorityRouter := Router.Group("authority").Us... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_authority_btn.go | server/router/system/sys_authority_btn.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
)
type AuthorityBtnRouter struct{}
func (s *AuthorityBtnRouter) InitAuthorityBtnRouterRouter(Router *gin.RouterGroup) {
//authorityRouter := Router.Group("authorityBtn").Use(middleware.OperationRecord())
aut... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_system.go | server/router/system/sys_system.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
"github.com/test-instructor/yangfan/server/middleware"
)
type SysRouter struct{}
func (s *SysRouter) InitSystemRouter(Router *gin.RouterGroup) {
sysRouter := Router.Group("system").Use(middleware.OperationRe... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_auto_code.go | server/router/system/sys_auto_code.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
)
type AutoCodeRouter struct{}
func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup) {
autoCodeRouter := Router.Group("autoCode")
autoCodeApi := v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
{
... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
test-instructor/yangfan | https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_operation_record.go | server/router/system/sys_operation_record.go | package system
import (
"github.com/gin-gonic/gin"
v1 "github.com/test-instructor/yangfan/server/api/v1"
)
type OperationRecordRouter struct{}
func (s *OperationRecordRouter) InitSysOperationRecordRouter(Router *gin.RouterGroup) {
operationRecordRouter := Router.Group("sysOperationRecord")
authorityMenuApi := v... | go | Apache-2.0 | b652da8cc7c6973b1ff10c8154fac49f2d99834d | 2026-01-07T09:45:38.570425Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.