2 Commits 440df85e7e ... 0047c85d94

Author SHA1 Message Date
  qinxiaodong 0047c85d94 v1.0.1 修改接口,添加记录前缀 1 month ago
  qinxiaodong 9700dcd347 v1.0.1 修改接口,添加记录前缀 1 month ago
3 changed files with 265 additions and 121 deletions
  1. 46 0
      go.mod
  2. 158 0
      go.sum
  3. 61 121
      osm_sdk.go

+ 46 - 0
go.mod

@@ -0,0 +1,46 @@
+module git.sxidc.com/service-supports/osm_sdk
+
+go 1.23.1
+
+require (
+	git.sxidc.com/go-framework/baize v1.4.9
+	git.sxidc.com/go-tools/utils v1.5.29
+	git.sxidc.com/service-supports/dapr_api v0.2.0
+	github.com/pkg/errors v0.9.1
+)
+
+require (
+	github.com/bytedance/sonic v1.11.6 // indirect
+	github.com/bytedance/sonic/loader v0.1.1 // indirect
+	github.com/cloudwego/base64x v0.1.4 // indirect
+	github.com/cloudwego/iasm v0.2.0 // indirect
+	github.com/gabriel-vasile/mimetype v1.4.3 // indirect
+	github.com/gin-contrib/sse v0.1.0 // indirect
+	github.com/gin-gonic/gin v1.10.0 // indirect
+	github.com/go-playground/locales v0.14.1 // indirect
+	github.com/go-playground/universal-translator v0.18.1 // indirect
+	github.com/go-playground/validator/v10 v10.20.0 // indirect
+	github.com/go-resty/resty/v2 v2.11.0 // indirect
+	github.com/goccy/go-json v0.10.2 // indirect
+	github.com/json-iterator/go v1.1.12 // indirect
+	github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+	github.com/kr/pretty v0.3.1 // indirect
+	github.com/leodido/go-urn v1.4.0 // indirect
+	github.com/mattn/go-isatty v0.0.20 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.2 // indirect
+	github.com/pelletier/go-toml/v2 v2.2.2 // indirect
+	github.com/satori/go.uuid v1.2.0 // indirect
+	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+	github.com/ugorji/go/codec v1.2.12 // indirect
+	go.uber.org/multierr v1.11.0 // indirect
+	go.uber.org/zap v1.27.0 // indirect
+	golang.org/x/arch v0.8.0 // indirect
+	golang.org/x/crypto v0.23.0 // indirect
+	golang.org/x/net v0.25.0 // indirect
+	golang.org/x/sys v0.20.0 // indirect
+	golang.org/x/text v0.15.0 // indirect
+	google.golang.org/protobuf v1.34.1 // indirect
+	gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
+)

+ 158 - 0
go.sum

@@ -0,0 +1,158 @@
+git.sxidc.com/go-framework/baize v1.4.9 h1:2Q0PenF5oeW/3vpVkyqY3NOjUhaz8K6rvQWlipLeV8Q=
+git.sxidc.com/go-framework/baize v1.4.9/go.mod h1:NUCqSKPVM2hUUTSmQPWiJcjxecQsbfNAS1STO7OqtyE=
+git.sxidc.com/go-tools/utils v1.5.29 h1:OUrjzmnjxn+Anmz6FK2X5Pr4ljyrq5qNBaDs1dJLM6g=
+git.sxidc.com/go-tools/utils v1.5.29/go.mod h1:uTDb6QK5JZzK5+Fzsfeng7TwmnRDZiTY6JLYxIX94Qw=
+git.sxidc.com/service-supports/dapr_api v0.2.0 h1:OFTvpvWeIIHASnwPm+7khb6A5kOmy8dtH5C3CO2J2Kk=
+git.sxidc.com/service-supports/dapr_api v0.2.0/go.mod h1:lvu4Pba0W9ne4vZFs/H5cxhjedD80MxAeLtCw9B8jJs=
+github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
+github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
+github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
+github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
+github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
+github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
+github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
+github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
+github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
+github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
+github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
+github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
+github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
+github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
+github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
+github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
+github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
+github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
+github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
+github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
+github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
+github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
+github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
+github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
+go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
+go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
+go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
+go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
+golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
+golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
+golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
+google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

+ 61 - 121
osm_sdk.go

@@ -25,33 +25,29 @@ type (
 
 	DeleteMultiObjJsonBody struct {
 		ConfigKey
-		ObjNames         []string `json:"objNames" binding:"required"`
-		UserID           string   `json:"userId"`
-		OperatorUserName string   `json:"operatorUserName" assign:"toField:OperatorUserName"`
+		ObjNames []string `json:"objNames" binding:"required"`
+		Prefix   string   `json:"prefix"`
 	}
 	CopyJsonBody struct {
 		ConfigKey
-		SrcObjName       string   `json:"srcObjName" binding:"required"`
-		DstObjName       string   `json:"dstObjName" binding:"required"`
-		RequireInfos     []string `json:"requireInfos"`
-		CreateUserID     string   `json:"createUserId" assign:"toField:CreateUserID"`
-		OperatorUserName string   `json:"operatorUserName" assign:"toField:OperatorUserName"`
+		SrcObjName   string   `json:"srcObjName" binding:"required"`
+		DstObjName   string   `json:"dstObjName" binding:"required"`
+		RequireInfos []string `json:"requireInfos"`
+		Prefix       string   `json:"prefix"`
 	}
 	MoveJsonBody struct {
 		ConfigKey
-		SrcObjName       string   `json:"srcObjName" binding:"required"`
-		DstObjName       string   `json:"dstObjName" binding:"required"`
-		RequireInfos     []string `json:"requireInfos"`
-		UpdateUserID     string   `json:"updateUserId" assign:"toField:LastUpdateUserID"`
-		OperatorUserName string   `json:"operatorUserName" assign:"toField:OperatorUserName"`
+		SrcObjName   string   `json:"srcObjName" binding:"required"`
+		DstObjName   string   `json:"dstObjName" binding:"required"`
+		RequireInfos []string `json:"requireInfos"`
+		Prefix       string   `json:"prefix"`
 	}
 	ZoomUrlJsonBody struct {
 		ConfigKey
-		ObjName          string   `json:"srcObjName" binding:"required"`
-		Process          string   `json:"dstObjName" binding:"required"`
-		RequireInfos     []string `json:"requireInfos"`
-		CreateUserID     string   `json:"createUserId" assign:"toField:CreateUserID"`
-		OperatorUserName string   `json:"operatorUserName" assign:"toField:OperatorUserName"`
+		ObjName      string   `json:"srcObjName" binding:"required"`
+		Process      string   `json:"dstObjName" binding:"required"`
+		RequireInfos []string `json:"requireInfos"`
+		Prefix       string   `json:"prefix"`
 	}
 )
 
@@ -86,15 +82,15 @@ func Init(configPrefix, configNamespace, configName, baseUrl string) error {
 //	return Bkt.PutObject(to, reader)
 //}
 
-func GetUrl(objName, userId string) (string, error) {
-	return getUrl(objName, userId)
+func GetUrl(objName string) (string, error) {
+	return getUrl(objName)
 }
 
-func GetUrlWithPrefix(objName, userId string) (string, error) {
-	return getUrl(prefix+objName, userId)
+func GetUrlWithPrefix(objName string) (string, error) {
+	return getUrl(prefix + objName)
 }
 
-func getUrl(objName, userId string) (string, error) {
+func getUrl(objName string) (string, error) {
 	if strutils.IsStringEmpty(objName) {
 		return "", nil
 	}
@@ -103,7 +99,6 @@ func getUrl(objName, userId string) (string, error) {
 		"namespace": namespace,
 		"name":      name,
 		"objName":   objName,
-		"userId":    userId,
 	})
 	if err != nil {
 		return "", err
@@ -145,14 +140,14 @@ func getUrl(objName, userId string) (string, error) {
 //}
 
 func ZoomUrl(objName, profess string) (string, error) {
-	return zoomlUrl(objName, profess)
+	return zoomUrl(objName, profess)
 }
 
 func ZoomUrlWithPrefix(objName, profess string) (string, error) {
-	return zoomlUrl(prefix+objName, profess)
+	return zoomUrl(prefix+objName, profess)
 }
 
-func zoomlUrl(objName, process string) (string, error) {
+func zoomUrl(objName, process string) (string, error) {
 	if strutils.IsStringEmpty(objName) {
 		return "", nil
 	}
@@ -197,15 +192,15 @@ func zoomlUrl(objName, process string) (string, error) {
 //	return Bkt.IsObjectExist(prefix + obj)
 //}
 
-func Exist(objName, userId string) (bool, error) {
-	return exist(objName, userId)
+func Exist(objName string) (bool, error) {
+	return exist(objName)
 }
 
-func ExistWithPrefix(objName, userId string) (bool, error) {
-	return exist(prefix+objName, userId)
+func ExistWithPrefix(objName string) (bool, error) {
+	return exist(prefix + objName)
 }
 
-func exist(objName, userId string) (bool, error) {
+func exist(objName string) (bool, error) {
 	if strutils.IsStringEmpty(objName) {
 		return false, nil
 	}
@@ -213,7 +208,6 @@ func exist(objName, userId string) (bool, error) {
 		"namespace": namespace,
 		"name":      name,
 		"objName":   objName,
-		"userId":    userId,
 	})
 	if err != nil {
 		return false, err
@@ -232,8 +226,8 @@ func exist(objName, userId string) (bool, error) {
 	return true, nil
 }
 
-func DeleteMulti(userId string, objNames ...string) error {
-	return deleteMulti(userId, objNames...)
+func DeleteMulti(objNames ...string) error {
+	return deleteMulti(objNames...)
 }
 
 func DeleteMultiWithPrefix(userId string, objNames ...string) error {
@@ -241,10 +235,10 @@ func DeleteMultiWithPrefix(userId string, objNames ...string) error {
 		objName = prefix + objName
 	}
 
-	return deleteMulti(userId, objNames...)
+	return deleteMulti(objNames...)
 }
 
-func deleteMulti(userId string, objNames ...string) error {
+func deleteMulti(objNames ...string) error {
 	if len(objNames) == 0 {
 		return nil
 	}
@@ -254,7 +248,7 @@ func deleteMulti(userId string, objNames ...string) error {
 			Namespace: namespace,
 			Name:      name,
 		},
-		UserID:   userId,
+		Prefix:   prefix,
 		ObjNames: objNames,
 	})
 	if err != nil {
@@ -279,15 +273,15 @@ func deleteMulti(userId string, objNames ...string) error {
 	return nil
 }
 
-func ListDir(dirPath, userId string) ([]string, error) {
-	return listDir(dirPath, userId)
+func ListDir(dirPath string) ([]string, error) {
+	return listDir(dirPath)
 }
 
-func ListDirWithPrefix(dirPath, userId string) ([]string, error) {
-	return listDir(prefix+dirPath, userId)
+func ListDirWithPrefix(dirPath string) ([]string, error) {
+	return listDir(prefix + dirPath)
 }
 
-func listDir(dirPath, userId string) ([]string, error) {
+func listDir(dirPath string) ([]string, error) {
 	if strutils.IsStringEmpty(dirPath) {
 		return nil, nil
 	}
@@ -296,7 +290,6 @@ func listDir(dirPath, userId string) ([]string, error) {
 		"namespace": namespace,
 		"name":      name,
 		"dirPath":   dirPath,
-		"userId":    userId,
 	})
 	if err != nil {
 		return nil, err
@@ -315,23 +308,13 @@ func listDir(dirPath, userId string) ([]string, error) {
 	return resp.Info, nil
 }
 
-//func LsWithoutPrefix(dir string) ([]string, error) {
-//	if strutils.HasBlank(dir) {
-//		return []string{}, nil
-//	}
-//
-//	v2, err := Bkt.ListObjectsV2(oss.Prefix(dir))
-//	if err != nil {
-//		return nil, err
-//	}
-//
-//	ks := make([]string, len(v2.Objects))
-//	for i, obj := range v2.Objects {
-//		ks[i] = obj.Key
-//	}
-//
-//	return ks, nil
-//}
+func LsDetails(dirPath string) ([]ObjectInfo, error) {
+	return lsDetails(dirPath)
+}
+
+func LsDetailsWithPrefix(dirPath string) ([]ObjectInfo, error) {
+	return lsDetails(prefix + dirPath)
+}
 
 type ObjectInfo struct {
 	Key  string
@@ -339,37 +322,7 @@ type ObjectInfo struct {
 	Size int64
 }
 
-//func LsDetails(dir string) ([]ObjectInfo, error) {
-//	if strutils.HasBlank(dir) {
-//		return []ObjectInfo{}, nil
-//	}
-//
-//	v2, err := Bkt.ListObjectsV2(oss.Prefix(prefix + dir))
-//	if err != nil {
-//		return nil, err
-//	}
-//
-//	ks := make([]ObjectInfo, len(v2.Objects))
-//	for i, obj := range v2.Objects {
-//		ks[i] = ObjectInfo{
-//			Key:  obj.Key,
-//			Type: obj.Type,
-//			Size: obj.Size,
-//		}
-//	}
-//
-//	return ks, nil
-//}
-
-func LsDetails(dirPath, userId string) ([]ObjectInfo, error) {
-	return lsDetails(dirPath, userId)
-}
-
-func LsDetailsWithPrefix(dirPath, userId string) ([]ObjectInfo, error) {
-	return lsDetails(prefix+dirPath, userId)
-}
-
-func lsDetails(dirPath, userId string) ([]ObjectInfo, error) {
+func lsDetails(dirPath string) ([]ObjectInfo, error) {
 	if strutils.IsStringEmpty(dirPath) {
 		return []ObjectInfo{}, nil
 	}
@@ -378,7 +331,6 @@ func lsDetails(dirPath, userId string) ([]ObjectInfo, error) {
 		"namespace": namespace,
 		"name":      name,
 		"dirPath":   dirPath,
-		"userId":    userId,
 	})
 	if err != nil {
 		return nil, err
@@ -406,30 +358,15 @@ func lsDetails(dirPath, userId string) ([]ObjectInfo, error) {
 //	return Bkt.DeleteObject(prefix + f)
 //}
 
-func Move(srcObjName, dstObjName, userId string, requireInfos []string) error {
-	return move(srcObjName, dstObjName, userId, requireInfos)
+func Move(srcObjName, dstObjName string) error {
+	return move(srcObjName, dstObjName, nil)
 }
 
-func MoveWithPrefix(srcObjName, dstObjName, userId string, requireInfos []string) error {
-	return move(prefix+srcObjName, prefix+dstObjName, userId, requireInfos)
-}
-
-func moves(srcObjName, dstObjName, userId string, requireInfos []string) error {
-	if strutils.IsStringEmpty(srcObjName) {
-		return nil
-	}
-	if strutils.IsStringEmpty(dstObjName) {
-		return nil
-	}
-	err := copying(srcObjName, dstObjName, requireInfos)
-	if err != nil {
-		return err
-	}
-	return deleteMulti(userId, srcObjName)
-
+func MoveWithPrefix(srcObjName, dstObjName string) error {
+	return move(prefix+srcObjName, prefix+dstObjName, nil)
 }
 
-func move(srcObjName, dstObjName, userId string, requireInfos []string) error {
+func move(srcObjName, dstObjName string, requireInfos []string) error {
 	if strutils.IsStringEmpty(srcObjName) {
 		return nil
 	}
@@ -444,6 +381,7 @@ func move(srcObjName, dstObjName, userId string, requireInfos []string) error {
 		SrcObjName:   srcObjName,
 		DstObjName:   dstObjName,
 		RequireInfos: requireInfos,
+		Prefix:       prefix,
 	})
 	if err != nil {
 		return err
@@ -469,12 +407,12 @@ func move(srcObjName, dstObjName, userId string, requireInfos []string) error {
 //	return err
 //}
 
-func Copy(srcObjName, dstObjName string, requireInfos []string) error {
-	return copying(srcObjName, dstObjName, requireInfos)
+func Copy(srcObjName, dstObjName string) error {
+	return copying(srcObjName, dstObjName, nil)
 }
 
-func CopyWithPrefix(srcObjName, dstObjName string, requireInfos []string) error {
-	return copying(prefix+srcObjName, prefix+dstObjName, requireInfos)
+func CopyWithPrefix(srcObjName, dstObjName string) error {
+	return copying(prefix+srcObjName, prefix+dstObjName, nil)
 }
 
 func copying(srcObjName, dstObjName string, requireInfos []string) error {
@@ -493,6 +431,7 @@ func copying(srcObjName, dstObjName string, requireInfos []string) error {
 		SrcObjName:   srcObjName,
 		DstObjName:   dstObjName,
 		RequireInfos: requireInfos,
+		Prefix:       prefix,
 	})
 	if err != nil {
 		return err
@@ -516,12 +455,12 @@ func copying(srcObjName, dstObjName string, requireInfos []string) error {
 	return nil
 }
 
-func CopyPublic(srcObjName, dstObjName string, requireInfos []string) error {
-	return copyPublic(srcObjName, dstObjName, requireInfos)
+func CopyPublic(srcObjName, dstObjName string) error {
+	return copyPublic(srcObjName, dstObjName, nil)
 }
 
-func CopyPublicWithPrefix(srcObjName, dstObjName string, requireInfos []string) error {
-	return copyPublic(prefix+srcObjName, prefix+dstObjName, requireInfos)
+func CopyPublicWithPrefix(srcObjName, dstObjName string) error {
+	return copyPublic(prefix+srcObjName, prefix+dstObjName, nil)
 }
 
 func copyPublic(srcObjName, dstObjName string, requireInfos []string) error {
@@ -539,6 +478,7 @@ func copyPublic(srcObjName, dstObjName string, requireInfos []string) error {
 		SrcObjName:   srcObjName,
 		DstObjName:   dstObjName,
 		RequireInfos: requireInfos,
+		Prefix:       prefix,
 	})
 	if err != nil {
 		return err