更新依赖

This commit is contained in:
JinMao 2023-12-14 09:57:02 +08:00
parent 3d61be5bc2
commit fad4fdfb68
13 changed files with 144 additions and 32 deletions

View File

@ -14,5 +14,5 @@ logger:
database:
default:
# link: "pgsql:user=gfvben password=JBprEMNHJ7Md host=47.116.71.73 port=5432 dbname=gfvben sslmode=disable"
link: "mysql:gf-vben:rdSWTt3dsLMTMHhE@tcp(114.115.157.254:3306)/gf-vben"
link: "mysql:vben:ZmdjwPdb3BBPsXhN@tcp(114.115.157.254:3306)/vben"
debug: true

44
go.mod
View File

@ -1,37 +1,37 @@
module Gf-Vben
go 1.20
go 1.21
require (
github.com/gogf/gf-jwt/v2 v2.0.1
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.0
github.com/gogf/gf/v2 v2.4.0
github.com/jinmao88/gf-utility v1.0.2
github.com/gogf/gf-jwt/v2 v2.1.0
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.5.7
github.com/gogf/gf/v2 v2.5.7
github.com/jinmao88/gf-utility v1.0.4
github.com/yitter/idgenerator-go v1.3.3
)
require (
github.com/BurntSushi/toml v1.1.0 // indirect
github.com/clbanning/mxj/v2 v2.5.5 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grokify/html-strip-tags-go v0.0.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.12 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/rivo/uniseg v0.1.0 // indirect
go.opentelemetry.io/otel v1.7.0 // indirect
go.opentelemetry.io/otel/sdk v1.7.0 // indirect
go.opentelemetry.io/otel/trace v1.7.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
github.com/rivo/uniseg v0.4.4 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@ -2,7 +2,7 @@
gfcli:
gen:
dao:
- link: "mysql:gf-vben:rdSWTt3dsLMTMHhE@tcp(114.115.157.254:3306)/gf-vben"
- link: "mysql:vben:ZmdjwPdb3BBPsXhN@tcp(114.115.157.254:3306)/vben"
build:
name: "gf-vben"

View File

@ -0,0 +1,27 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"Gf-Vben/internal/dao/internal"
)
// internalCasbinRuleDao is internal type for wrapping internal DAO implements.
type internalCasbinRuleDao = *internal.CasbinRuleDao
// casbinRuleDao is the data access object for table casbin_rule.
// You can define custom methods on it to extend its functionality as you wish.
type casbinRuleDao struct {
internalCasbinRuleDao
}
var (
// CasbinRule is globally public accessible object for table casbin_rule operations.
CasbinRule = casbinRuleDao{
internal.NewCasbinRuleDao(),
}
)
// Fill with you ideas below.

View File

@ -0,0 +1,85 @@
// ==========================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// CasbinRuleDao is the data access object for table casbin_rule.
type CasbinRuleDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of current DAO.
columns CasbinRuleColumns // columns contains all the column names of Table for convenient usage.
}
// CasbinRuleColumns defines and stores column names for table casbin_rule.
type CasbinRuleColumns struct {
Ptype string //
V0 string //
V1 string //
V2 string //
V3 string //
V4 string //
V5 string //
}
// casbinRuleColumns holds the columns for table casbin_rule.
var casbinRuleColumns = CasbinRuleColumns{
Ptype: "ptype",
V0: "v0",
V1: "v1",
V2: "v2",
V3: "v3",
V4: "v4",
V5: "v5",
}
// NewCasbinRuleDao creates and returns a new DAO object for table data access.
func NewCasbinRuleDao() *CasbinRuleDao {
return &CasbinRuleDao{
group: "default",
table: "casbin_rule",
columns: casbinRuleColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *CasbinRuleDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *CasbinRuleDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *CasbinRuleDao) Columns() CasbinRuleColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *CasbinRuleDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *CasbinRuleDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note that, you should not Commit or Rollback the transaction in function f
// as it is automatically handled by this function.
func (dao *CasbinRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -1,5 +1,5 @@
// ==========================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal

View File

@ -1,5 +1,5 @@
// ==========================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity

View File

@ -1,5 +1,5 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity