Skip to content

Commit

Permalink
优化更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Apr 3, 2022
1 parent 39b33d5 commit 35b7b2d
Show file tree
Hide file tree
Showing 268 changed files with 6,188 additions and 1,125 deletions.
35 changes: 21 additions & 14 deletions app/example/controller/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package controller
import (
"github.com/gin-gonic/gin"

"github.com/deatil/lakego-doak/lakego/pipeline"
"github.com/deatil/lakego-doak/lakego/exception"
"github.com/deatil/lakego-doak/lakego/filesystem"
"github.com/deatil/lakego-doak/lakego/support/str"
"github.com/deatil/lakego-doak/lakego/support/datebin"
"github.com/deatil/lakego-doak/lakego/support/snowflake"
"github.com/deatil/lakego-doak/lakego/support/cryptobin"
"github.com/deatil/lakego-doak/lakego/support/hash"
"github.com/deatil/go-hash/hash"
"github.com/deatil/go-datebin/datebin"
"github.com/deatil/go-pipeline/pipeline"
"github.com/deatil/go-exception/exception"
"github.com/deatil/go-cryptobin/cryptobin"
"github.com/deatil/lake-filesystem/filesystem"

"github.com/deatil/lakego-doak/lakego/str"
"github.com/deatil/lakego-doak/lakego/snowflake"

"github.com/deatil/lakego-doak-admin/admin/support/controller"
)
Expand Down Expand Up @@ -151,13 +152,19 @@ func (this *Data) Error(ctx *gin.Context) {
Decrypt().
ToString()

// 签名
// 生成证书
rsa := cryptobin.NewRsa()
rsaPriKey, _ := rsa.MakePassPKCS8PrvKey(1024, "123", "DES")
rsaPubKey, _ := rsa.MakePKCS8PubKeyFromPassPKCS8PrvKey(rsaPriKey, "123")
rsaPriKey := rsa.
GenerateKey(2048).
CreatePKCS8WithPassword("123", "AES256CBC", "SHA256").
ToKeyString()
rsaPubKey := rsa.
FromPKCS8WithPassword([]byte(rsaPriKey), "123").
CreatePublicKey().
ToKeyString()

// 签名
hashData := hash.MD5SHA1("123")
hashData := hash.FromString("123").MD5_16().ToString()

this.SuccessWithData(ctx, "Error 测试", gin.H{
"error": data,
Expand All @@ -176,8 +183,8 @@ func (this *Data) Error(ctx *gin.Context) {
"cypt": cypt,
"cyptde": cyptde,

"rsaPriKey": string(rsaPriKey),
"rsaPubKey": string(rsaPubKey),
"rsaPriKey": rsaPriKey,
"rsaPubKey": rsaPubKey,

"hashData": hashData,
})
Expand Down
2 changes: 1 addition & 1 deletion app/example/provider/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
"github.com/gin-gonic/gin"

"github.com/deatil/lake-filesystem/filesystem"
"github.com/deatil/lakego-doak/lakego/provider"
"github.com/deatil/lakego-doak/lakego/filesystem"
pathTool "github.com/deatil/lakego-doak/lakego/path"
providerInterface "github.com/deatil/lakego-doak/lakego/provider/interfaces"

Expand Down
3 changes: 3 additions & 0 deletions app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ module app
go 1.18

require (
github.com/deatil/go-goch v0.0.3
github.com/deatil/go-hash v0.0.3
github.com/deatil/go-cryptobin v0.0.3
github.com/deatil/lakego-doak v0.0.3
github.com/deatil/lakego-doak-admin v0.0.3
github.com/gin-gonic/gin v1.7.2
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
107 changes: 103 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ go 1.18

replace (
app => ./app
github.com/deatil/go-filesystem => ./pkg/go-filesystem
github.com/deatil/go-goch => ./pkg/lakego-pkg/go-goch
github.com/deatil/go-hash => ./pkg/lakego-pkg/go-hash
github.com/deatil/go-datebin => ./pkg/lakego-pkg/go-datebin
github.com/deatil/go-encoding => ./pkg/lakego-pkg/go-encoding
github.com/deatil/go-cryptobin => ./pkg/lakego-pkg/go-cryptobin
github.com/deatil/go-exception => ./pkg/lakego-pkg/go-exception
github.com/deatil/go-collection => ./pkg/lakego-pkg/go-collection
github.com/deatil/go-filesystem => ./pkg/lakego-pkg/go-filesystem
github.com/deatil/go-pipeline => ./pkg/lakego-pkg/go-pipeline
github.com/deatil/lake-filesystem => ./pkg/lakego-pkg/lake-filesystem
github.com/deatil/lakego-doak => ./pkg/lakego-doak
github.com/deatil/lakego-doak-action-log => ./pkg/lakego-app/doak-action-log
github.com/deatil/lakego-doak-admin => ./pkg/lakego-app/doak-admin
Expand All @@ -17,14 +26,104 @@ require (
github.com/deatil/lakego-doak-action-log v0.0.3
github.com/deatil/lakego-doak-admin v0.0.3
github.com/deatil/lakego-doak-swagger v0.0.3
github.com/swaggo/swag v1.8.0
)

require (
github.com/AlecAivazis/survey/v2 v2.3.2 // indirect
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/casbin/casbin/v2 v2.37.4 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/deatil/go-collection v0.0.0-00010101000000-000000000000 // indirect
github.com/deatil/go-cryptobin v0.0.3 // indirect
github.com/deatil/go-datebin v0.0.3 // indirect
github.com/deatil/go-encoding v0.0.0-00010101000000-000000000000 // indirect
github.com/deatil/go-exception v0.0.0-00010101000000-000000000000 // indirect
github.com/deatil/go-filesystem v0.0.3 // indirect
github.com/deatil/go-goch v0.0.3 // indirect
github.com/deatil/go-hash v0.0.3 // indirect
github.com/deatil/go-pipeline v0.0.0-00010101000000-000000000000 // indirect
github.com/deatil/lake-filesystem v0.0.0-00010101000000-000000000000 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.7.7 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.9.0 // indirect
github.com/go-redis/cache/v8 v8.4.3 // indirect
github.com/go-redis/redis/extra/rediscmd/v8 v8.11.4 // indirect
github.com/go-redis/redis/extra/redisotel/v8 v8.11.4 // indirect
github.com/go-redis/redis/v8 v8.11.4 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/golang-jwt/jwt/v4 v4.1.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/h2non/filetype v1.1.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/iancoleman/strcase v0.2.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.2 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f // indirect
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/swaggo/swag v1.8.0
github.com/ugorji/go v1.2.6 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mojocn/base64Captcha v1.3.5 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cobra v1.2.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.9.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
github.com/swaggo/gin-swagger v1.4.1 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.opentelemetry.io/otel v1.0.0 // indirect
go.opentelemetry.io/otel/trace v1.0.0 // indirect
go.uber.org/dig v1.13.0 // indirect
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect
golang.org/x/exp v0.0.0-20211012155715-ffe10e552389 // indirect
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.9 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/driver/mysql v1.1.2 // indirect
gorm.io/gorm v1.21.16 // indirect
)
Loading

0 comments on commit 35b7b2d

Please sign in to comment.