refactor: 更改module路径为独立仓库路径
- go.yandata.net/iod/iod/go-trustlog → go.yandata.net/wangsiyuan/go-trustlog - 更新 go.mod module声明 - 更新 README.md 安装说明 - 批量更新所有 .go 文件中的 import 路径 - 61个文件受影响 这样go-trustlog可以作为独立SDK使用
This commit is contained in:
@@ -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 基于配置的通用签名器
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 定义支持的签名算法类型.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 包装序列化后的数据,包含元信息和报文体。
|
||||
|
||||
@@ -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 详细测试加签和验签的数据一致性.
|
||||
|
||||
@@ -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 测试加签和验签的一致性
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
//
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 序列化/反序列化后能保留纳秒精度
|
||||
|
||||
@@ -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树证明项.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 表示一条记录。
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 序列化/反序列化后能保留纳秒精度
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 签名器接口,用于抽象不同的签名算法实现。
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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加签和验签的一致性
|
||||
|
||||
@@ -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数据
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user