From 0ec1d3b87d320659485aa5e5e2f846bcc94f4e39 Mon Sep 17 00:00:00 2001 From: ryan <2650306917@qq.com> Date: Fri, 26 Dec 2025 14:35:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=94=B9module=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=B8=BA=E7=8B=AC=E7=AB=8B=E4=BB=93=E5=BA=93=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - go.yandata.net/iod/iod/go-trustlog → go.yandata.net/wangsiyuan/go-trustlog - 更新 go.mod module声明 - 更新 README.md 安装说明 - 批量更新所有 .go 文件中的 import 路径 - 61个文件受影响 这样go-trustlog可以作为独立SDK使用 --- README.md | 14 +++++++------- api/adapter/publisher.go | 2 +- api/adapter/subscriber.go | 2 +- api/grpc/generator.go | 2 +- api/highclient/client.go | 6 +++--- api/highclient/client_test.go | 8 ++++---- api/logger/adapter_test.go | 2 +- api/model/config_signer.go | 2 +- api/model/config_signer_test.go | 2 +- api/model/converter.go | 2 +- api/model/converter_test.go | 4 ++-- api/model/crypto_config.go | 2 +- api/model/crypto_config_test.go | 2 +- api/model/envelope.go | 4 ++-- api/model/envelope_debug_test.go | 2 +- api/model/envelope_sign_verify_test.go | 2 +- api/model/envelope_test.go | 2 +- api/model/hash_test.go | 2 +- api/model/operation.go | 4 ++-- api/model/operation_test.go | 2 +- api/model/operation_timestamp_test.go | 2 +- api/model/proof.go | 2 +- api/model/proof_test.go | 4 ++-- api/model/record.go | 4 ++-- api/model/record_test.go | 2 +- api/model/record_timestamp_test.go | 2 +- api/model/signature.go | 2 +- api/model/signature_test.go | 2 +- api/model/signer.go | 2 +- api/model/signer_test.go | 2 +- api/model/sm2_consistency_test.go | 2 +- api/model/sm2_hash_test.go | 2 +- api/model/validation_test.go | 2 +- api/persistence/client.go | 6 +++--- api/persistence/cluster_safety_test.go | 8 ++++---- api/persistence/cursor_init_verification_test.go | 8 ++++---- api/persistence/cursor_worker.go | 4 ++-- api/persistence/e2e_integration_test.go | 8 ++++---- api/persistence/example_test.go | 8 ++++---- api/persistence/manager_test.go | 2 +- api/persistence/pg_integration_test.go | 2 +- api/persistence/pg_query_integration_test.go | 6 +++--- api/persistence/pulsar_integration_test.go | 4 ++-- api/persistence/query_test.go | 4 ++-- api/persistence/repository.go | 4 ++-- api/persistence/repository_test.go | 4 ++-- api/persistence/retry_worker.go | 4 ++-- api/persistence/standalone_test.go | 2 +- api/persistence/strategy.go | 4 ++-- api/queryclient/client.go | 8 ++++---- api/queryclient/client_additional_test.go | 8 ++++---- api/queryclient/client_test.go | 8 ++++---- go.mod | 2 +- internal/grpcclient/config_test.go | 2 +- internal/grpcclient/loadbalancer_test.go | 2 +- internal/helpers/cbor_test.go | 2 +- internal/helpers/cbor_time_test.go | 2 +- internal/helpers/tlv_test.go | 2 +- internal/helpers/uuid_test.go | 2 +- internal/helpers/validate_test.go | 2 +- internal/logger/logger_test.go | 4 ++-- 61 files changed, 110 insertions(+), 110 deletions(-) diff --git a/README.md b/README.md index 6872671..868ced2 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ git config --global url."git@gitea.internetapi.cn:".insteadOf "https://gitea.int go env -w GOPRIVATE="go.yandata.net" # 安装SDK -go get go.yandata.net/iod/iod/go-trustlog +go get go.yandata.net/wangsiyuan/go-trustlog ``` ### 1. 基本使用 - 发布操作 @@ -52,8 +52,8 @@ package main import ( "context" "time" - "go.yandata.net/iod/iod/go-trustlog/api/highclient" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/highclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func main() { @@ -96,7 +96,7 @@ func main() { ```go import ( "database/sql" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" _ "github.com/lib/pq" ) @@ -144,7 +144,7 @@ func main() { ```go import ( - "go.yandata.net/iod/iod/go-trustlog/api/queryclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/queryclient" ) func main() { @@ -189,7 +189,7 @@ func main() { ### 4. 数据库查询(持久化后) ```go -import "go.yandata.net/iod/iod/go-trustlog/api/persistence" +import "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" func main() { repo := persistence.NewOperationRepository(db, log) @@ -388,7 +388,7 @@ op.ServerIP = &serverIP // 可选 ### 3. 自定义签名 ```go -import "go.yandata.net/iod/iod/go-trustlog/api/sm2signer" +import "go.yandata.net/wangsiyuan/go-trustlog/api/sm2signer" // 使用SM2算法签名 signer := sm2signer.NewSM2Signer(privateKeyBytes) diff --git a/api/adapter/publisher.go b/api/adapter/publisher.go index 85f8ae3..61d1132 100644 --- a/api/adapter/publisher.go +++ b/api/adapter/publisher.go @@ -7,7 +7,7 @@ import ( "github.com/ThreeDotsLabs/watermill/message" "github.com/apache/pulsar-client-go/pulsar" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) const ( diff --git a/api/adapter/subscriber.go b/api/adapter/subscriber.go index 2063386..967c8d5 100644 --- a/api/adapter/subscriber.go +++ b/api/adapter/subscriber.go @@ -11,7 +11,7 @@ import ( "github.com/ThreeDotsLabs/watermill/message" "github.com/apache/pulsar-client-go/pulsar" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) const ( diff --git a/api/grpc/generator.go b/api/grpc/generator.go index 5c795a1..7238862 100644 --- a/api/grpc/generator.go +++ b/api/grpc/generator.go @@ -1,5 +1,5 @@ package grpc -//go:generate protoc --go_out=./pb --go-grpc_out=./pb --go_opt=module=go.yandata.net/iod/iod/go-trustlog/api/grpc/pb --go-grpc_opt=module=go.yandata.net/iod/iod/go-trustlog/api/grpc/pb --proto_path=. ./common.proto ./operation.proto ./record.proto +//go:generate protoc --go_out=./pb --go-grpc_out=./pb --go_opt=module=go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb --go-grpc_opt=module=go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb --proto_path=. ./common.proto ./operation.proto ./record.proto // 注意:common.proto 必须首先列出,因为 operation.proto 和 record.proto 都依赖它 // 生成的代码将包含 common.pb.go,其中定义了 Proof 类型 diff --git a/api/highclient/client.go b/api/highclient/client.go index 099e152..27fd974 100644 --- a/api/highclient/client.go +++ b/api/highclient/client.go @@ -6,9 +6,9 @@ import ( "github.com/ThreeDotsLabs/watermill/message" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) type Client struct { diff --git a/api/highclient/client_test.go b/api/highclient/client_test.go index 708c6fb..f7dae7b 100644 --- a/api/highclient/client_test.go +++ b/api/highclient/client_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/highclient" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/highclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // MockPublisher 模拟 message.Publisher. diff --git a/api/logger/adapter_test.go b/api/logger/adapter_test.go index 4270e22..ecac70f 100644 --- a/api/logger/adapter_test.go +++ b/api/logger/adapter_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) func TestNewLogger(t *testing.T) { diff --git a/api/model/config_signer.go b/api/model/config_signer.go index f0d6faf..7bb6bc6 100644 --- a/api/model/config_signer.go +++ b/api/model/config_signer.go @@ -7,7 +7,7 @@ import ( _ "github.com/crpt/go-crpt/ed25519" // 注册 Ed25519 _ "github.com/crpt/go-crpt/sm2" // 注册 SM2 - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) // ConfigSigner 基于配置的通用签名器 diff --git a/api/model/config_signer_test.go b/api/model/config_signer_test.go index 21e5d98..b56b052 100644 --- a/api/model/config_signer_test.go +++ b/api/model/config_signer_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestNewConfigSigner_SM2(t *testing.T) { diff --git a/api/model/converter.go b/api/model/converter.go index 617ea7a..22b4cea 100644 --- a/api/model/converter.go +++ b/api/model/converter.go @@ -6,7 +6,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" ) // FromProtobuf 将protobuf的OperationData转换为model.Operation. diff --git a/api/model/converter_test.go b/api/model/converter_test.go index de78400..e8da00f 100644 --- a/api/model/converter_test.go +++ b/api/model/converter_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/timestamppb" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestFromProtobuf_Nil(t *testing.T) { diff --git a/api/model/crypto_config.go b/api/model/crypto_config.go index 7b47ab0..3a330dc 100644 --- a/api/model/crypto_config.go +++ b/api/model/crypto_config.go @@ -11,7 +11,7 @@ import ( _ "github.com/crpt/go-crpt/ed25519" // Import Ed25519 _ "github.com/crpt/go-crpt/sm2" // Import SM2 - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) // SignatureAlgorithm 定义支持的签名算法类型. diff --git a/api/model/crypto_config_test.go b/api/model/crypto_config_test.go index 910770e..8c6953b 100644 --- a/api/model/crypto_config_test.go +++ b/api/model/crypto_config_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestCryptoConfig_Validate(t *testing.T) { diff --git a/api/model/envelope.go b/api/model/envelope.go index cfd4d3a..8f89254 100644 --- a/api/model/envelope.go +++ b/api/model/envelope.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) // Envelope 包装序列化后的数据,包含元信息和报文体。 diff --git a/api/model/envelope_debug_test.go b/api/model/envelope_debug_test.go index f5499f8..23b3299 100644 --- a/api/model/envelope_debug_test.go +++ b/api/model/envelope_debug_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestSignVerifyDataConsistency 详细测试加签和验签的数据一致性. diff --git a/api/model/envelope_sign_verify_test.go b/api/model/envelope_sign_verify_test.go index 4d8a248..3eafb4a 100644 --- a/api/model/envelope_sign_verify_test.go +++ b/api/model/envelope_sign_verify_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestSignVerifyConsistency 测试加签和验签的一致性 diff --git a/api/model/envelope_test.go b/api/model/envelope_test.go index 5a5e87b..88e5409 100644 --- a/api/model/envelope_test.go +++ b/api/model/envelope_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestNewEnvelopeConfig(t *testing.T) { diff --git a/api/model/hash_test.go b/api/model/hash_test.go index ecb7184..c79c1c6 100644 --- a/api/model/hash_test.go +++ b/api/model/hash_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestGetHashTool(t *testing.T) { diff --git a/api/model/operation.go b/api/model/operation.go index 9fa44d5..b96c7ea 100644 --- a/api/model/operation.go +++ b/api/model/operation.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) // diff --git a/api/model/operation_test.go b/api/model/operation_test.go index f7df776..3b30a76 100644 --- a/api/model/operation_test.go +++ b/api/model/operation_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestOperation_Key(t *testing.T) { diff --git a/api/model/operation_timestamp_test.go b/api/model/operation_timestamp_test.go index f32b0ac..8cbe7e3 100644 --- a/api/model/operation_timestamp_test.go +++ b/api/model/operation_timestamp_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestOperation_TimestampNanosecondPrecision 验证 Operation 的时间戳在 CBOR 序列化/反序列化后能保留纳秒精度 diff --git a/api/model/proof.go b/api/model/proof.go index 7a02c50..9948a68 100644 --- a/api/model/proof.go +++ b/api/model/proof.go @@ -1,7 +1,7 @@ package model import ( - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" ) // MerkleTreeProofItem 表示Merkle树证明项. diff --git a/api/model/proof_test.go b/api/model/proof_test.go index 693ec7b..ba0a799 100644 --- a/api/model/proof_test.go +++ b/api/model/proof_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestProofFromProtobuf_Nil(t *testing.T) { diff --git a/api/model/record.go b/api/model/record.go index efea812..24c8c9d 100644 --- a/api/model/record.go +++ b/api/model/record.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) // Record 表示一条记录。 diff --git a/api/model/record_test.go b/api/model/record_test.go index 72971eb..669bc59 100644 --- a/api/model/record_test.go +++ b/api/model/record_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestRecord_Key(t *testing.T) { diff --git a/api/model/record_timestamp_test.go b/api/model/record_timestamp_test.go index c356eaf..e1d23b1 100644 --- a/api/model/record_timestamp_test.go +++ b/api/model/record_timestamp_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestRecord_TimestampNanosecondPrecision 验证 Record 的时间戳在 CBOR 序列化/反序列化后能保留纳秒精度 diff --git a/api/model/signature.go b/api/model/signature.go index 9add7bf..35c3731 100644 --- a/api/model/signature.go +++ b/api/model/signature.go @@ -8,7 +8,7 @@ import ( "github.com/crpt/go-crpt" _ "github.com/crpt/go-crpt/sm2" // Import SM2 to register it - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) var ( diff --git a/api/model/signature_test.go b/api/model/signature_test.go index 6ce914b..3974a60 100644 --- a/api/model/signature_test.go +++ b/api/model/signature_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestComputeSignature_EmptyPrivateKey(t *testing.T) { diff --git a/api/model/signer.go b/api/model/signer.go index f9c494b..986ce36 100644 --- a/api/model/signer.go +++ b/api/model/signer.go @@ -3,7 +3,7 @@ package model import ( "bytes" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) // Signer 签名器接口,用于抽象不同的签名算法实现。 diff --git a/api/model/signer_test.go b/api/model/signer_test.go index 540fcb1..545b2bc 100644 --- a/api/model/signer_test.go +++ b/api/model/signer_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestNewSM2Signer(t *testing.T) { diff --git a/api/model/sm2_consistency_test.go b/api/model/sm2_consistency_test.go index cf5cd50..245c1dc 100644 --- a/api/model/sm2_consistency_test.go +++ b/api/model/sm2_consistency_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestSM2HashConsistency 验证SM2加签和验签的一致性 diff --git a/api/model/sm2_hash_test.go b/api/model/sm2_hash_test.go index 3da60a4..92e9fc5 100644 --- a/api/model/sm2_hash_test.go +++ b/api/model/sm2_hash_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // TestSM2RequiresHash 测试SM2是否要求预先hash数据 diff --git a/api/model/validation_test.go b/api/model/validation_test.go index 62fcb0c..b3c783b 100644 --- a/api/model/validation_test.go +++ b/api/model/validation_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestValidationResult_IsProcessing(t *testing.T) { diff --git a/api/persistence/client.go b/api/persistence/client.go index 075d88e..25e2ab1 100644 --- a/api/persistence/client.go +++ b/api/persistence/client.go @@ -7,9 +7,9 @@ import ( "github.com/ThreeDotsLabs/watermill/message" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // operationPublisherAdapter 适配器,将 PersistenceClient 的 publishToTrustlog 方法适配为 OperationPublisher 接口 diff --git a/api/persistence/cluster_safety_test.go b/api/persistence/cluster_safety_test.go index 9aaafa0..1ee0a7b 100644 --- a/api/persistence/cluster_safety_test.go +++ b/api/persistence/cluster_safety_test.go @@ -13,10 +13,10 @@ import ( _ "github.com/lib/pq" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // TestClusterSafety_MultipleCursorWorkers 测试多个 Cursor Worker 并发安全 diff --git a/api/persistence/cursor_init_verification_test.go b/api/persistence/cursor_init_verification_test.go index 75cc286..890ad4a 100644 --- a/api/persistence/cursor_init_verification_test.go +++ b/api/persistence/cursor_init_verification_test.go @@ -11,10 +11,10 @@ import ( _ "github.com/lib/pq" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // TestCursorInitialization 验证 cursor 初始化逻辑 diff --git a/api/persistence/cursor_worker.go b/api/persistence/cursor_worker.go index 759f7e1..ee55298 100644 --- a/api/persistence/cursor_worker.go +++ b/api/persistence/cursor_worker.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // OperationRecord 操作记录(包含数据库扩展字段) diff --git a/api/persistence/e2e_integration_test.go b/api/persistence/e2e_integration_test.go index 95fecda..a861c8f 100644 --- a/api/persistence/e2e_integration_test.go +++ b/api/persistence/e2e_integration_test.go @@ -13,10 +13,10 @@ import ( _ "github.com/lib/pq" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // 端到端集成测试配置 diff --git a/api/persistence/example_test.go b/api/persistence/example_test.go index 3cfd09e..45b2dfe 100644 --- a/api/persistence/example_test.go +++ b/api/persistence/example_test.go @@ -7,10 +7,10 @@ import ( "github.com/go-logr/logr" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // Example_dbOnly 演示仅落库策略 diff --git a/api/persistence/manager_test.go b/api/persistence/manager_test.go index aa8e5af..f935a1f 100644 --- a/api/persistence/manager_test.go +++ b/api/persistence/manager_test.go @@ -8,7 +8,7 @@ import ( _ "github.com/mattn/go-sqlite3" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) func TestPersistenceManager_DBOnly(t *testing.T) { diff --git a/api/persistence/pg_integration_test.go b/api/persistence/pg_integration_test.go index 15ff2e3..fa0e777 100644 --- a/api/persistence/pg_integration_test.go +++ b/api/persistence/pg_integration_test.go @@ -9,7 +9,7 @@ import ( _ "github.com/lib/pq" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) const ( diff --git a/api/persistence/pg_query_integration_test.go b/api/persistence/pg_query_integration_test.go index 84f152a..ce1a421 100644 --- a/api/persistence/pg_query_integration_test.go +++ b/api/persistence/pg_query_integration_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // TestPG_Query_Integration 测试 PostgreSQL 查询功能集成 diff --git a/api/persistence/pulsar_integration_test.go b/api/persistence/pulsar_integration_test.go index 1fd37d3..24c37d7 100644 --- a/api/persistence/pulsar_integration_test.go +++ b/api/persistence/pulsar_integration_test.go @@ -10,8 +10,8 @@ import ( "github.com/ThreeDotsLabs/watermill/message" _ "github.com/lib/pq" - "go.yandata.net/iod/iod/go-trustlog/api/adapter" - "go.yandata.net/iod/iod/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/adapter" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" ) const ( diff --git a/api/persistence/query_test.go b/api/persistence/query_test.go index b4a8fd2..98ee402 100644 --- a/api/persistence/query_test.go +++ b/api/persistence/query_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) func TestOperationRepository_Query(t *testing.T) { diff --git a/api/persistence/repository.go b/api/persistence/repository.go index 5c34fe9..cea9be3 100644 --- a/api/persistence/repository.go +++ b/api/persistence/repository.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // OperationQueryRequest 操作记录查询请求 diff --git a/api/persistence/repository_test.go b/api/persistence/repository_test.go index 92cb226..f0732c6 100644 --- a/api/persistence/repository_test.go +++ b/api/persistence/repository_test.go @@ -8,8 +8,8 @@ import ( _ "github.com/mattn/go-sqlite3" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // setupTestDB 创建测试用的 SQLite 内存数据库 diff --git a/api/persistence/retry_worker.go b/api/persistence/retry_worker.go index 258ab0a..fbe9e22 100644 --- a/api/persistence/retry_worker.go +++ b/api/persistence/retry_worker.go @@ -7,8 +7,8 @@ import ( "github.com/ThreeDotsLabs/watermill/message" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // RetryWorkerConfig 重试工作器配置 diff --git a/api/persistence/standalone_test.go b/api/persistence/standalone_test.go index 41dd160..6b3bb39 100644 --- a/api/persistence/standalone_test.go +++ b/api/persistence/standalone_test.go @@ -10,7 +10,7 @@ import ( _ "github.com/mattn/go-sqlite3" - "go.yandata.net/iod/iod/go-trustlog/api/persistence" + "go.yandata.net/wangsiyuan/go-trustlog/api/persistence" ) // Standalone tests - 独立测试,不依赖复杂模块 diff --git a/api/persistence/strategy.go b/api/persistence/strategy.go index 5f6dc5e..41aa178 100644 --- a/api/persistence/strategy.go +++ b/api/persistence/strategy.go @@ -5,8 +5,8 @@ import ( "database/sql" "fmt" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" ) // PersistenceStrategy 存证策略枚举 diff --git a/api/queryclient/client.go b/api/queryclient/client.go index eebbef9..4b229b2 100644 --- a/api/queryclient/client.go +++ b/api/queryclient/client.go @@ -10,10 +10,10 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/internal/grpcclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/internal/grpcclient" ) const ( diff --git a/api/queryclient/client_additional_test.go b/api/queryclient/client_additional_test.go index a0c43e9..fd59924 100644 --- a/api/queryclient/client_additional_test.go +++ b/api/queryclient/client_additional_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/timestamppb" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/queryclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/queryclient" ) // TestNewClient_ErrorCases 测试客户端创建的错误情况 diff --git a/api/queryclient/client_test.go b/api/queryclient/client_test.go index 7c5dd6e..c010eaa 100644 --- a/api/queryclient/client_test.go +++ b/api/queryclient/client_test.go @@ -12,10 +12,10 @@ import ( "google.golang.org/grpc/test/bufconn" "google.golang.org/protobuf/types/known/timestamppb" - "go.yandata.net/iod/iod/go-trustlog/api/grpc/pb" - "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/api/model" - "go.yandata.net/iod/iod/go-trustlog/api/queryclient" + "go.yandata.net/wangsiyuan/go-trustlog/api/grpc/pb" + "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/api/model" + "go.yandata.net/wangsiyuan/go-trustlog/api/queryclient" ) const bufSize = 1024 * 1024 diff --git a/go.mod b/go.mod index a49ecfa..06b91a9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.yandata.net/iod/iod/go-trustlog +module go.yandata.net/wangsiyuan/go-trustlog go 1.25 diff --git a/internal/grpcclient/config_test.go b/internal/grpcclient/config_test.go index fe71a3d..8375f32 100644 --- a/internal/grpcclient/config_test.go +++ b/internal/grpcclient/config_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/grpcclient" + "go.yandata.net/wangsiyuan/go-trustlog/internal/grpcclient" ) func TestConfig_GetAddrs(t *testing.T) { diff --git a/internal/grpcclient/loadbalancer_test.go b/internal/grpcclient/loadbalancer_test.go index fe53199..1a0b137 100644 --- a/internal/grpcclient/loadbalancer_test.go +++ b/internal/grpcclient/loadbalancer_test.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "go.yandata.net/iod/iod/go-trustlog/internal/grpcclient" + "go.yandata.net/wangsiyuan/go-trustlog/internal/grpcclient" ) // mockClient 用于测试的模拟客户端. diff --git a/internal/helpers/cbor_test.go b/internal/helpers/cbor_test.go index a18b11b..a994fc5 100644 --- a/internal/helpers/cbor_test.go +++ b/internal/helpers/cbor_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) func TestMarshalCanonical(t *testing.T) { diff --git a/internal/helpers/cbor_time_test.go b/internal/helpers/cbor_time_test.go index 3a5dc95..7e8d2db 100644 --- a/internal/helpers/cbor_time_test.go +++ b/internal/helpers/cbor_time_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) func TestCBORTimePrecision(t *testing.T) { diff --git a/internal/helpers/tlv_test.go b/internal/helpers/tlv_test.go index 7e48819..b62361a 100644 --- a/internal/helpers/tlv_test.go +++ b/internal/helpers/tlv_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) func TestNewTLVReader(t *testing.T) { diff --git a/internal/helpers/uuid_test.go b/internal/helpers/uuid_test.go index a47278d..695a116 100644 --- a/internal/helpers/uuid_test.go +++ b/internal/helpers/uuid_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) func TestNewUUIDv7(t *testing.T) { diff --git a/internal/helpers/validate_test.go b/internal/helpers/validate_test.go index 1fab71f..44f5b78 100644 --- a/internal/helpers/validate_test.go +++ b/internal/helpers/validate_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.yandata.net/iod/iod/go-trustlog/internal/helpers" + "go.yandata.net/wangsiyuan/go-trustlog/internal/helpers" ) func TestGetValidator(t *testing.T) { diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go index 916fe4d..d86afc8 100644 --- a/internal/logger/logger_test.go +++ b/internal/logger/logger_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - apilogger "go.yandata.net/iod/iod/go-trustlog/api/logger" - "go.yandata.net/iod/iod/go-trustlog/internal/logger" + apilogger "go.yandata.net/wangsiyuan/go-trustlog/api/logger" + "go.yandata.net/wangsiyuan/go-trustlog/internal/logger" ) func TestNewWatermillLoggerAdapter(t *testing.T) {