From 9d04f431049e6fa7a937f55b16ccfad1ac33fc52 Mon Sep 17 00:00:00 2001 From: Alexander Lazarenko Date: Thu, 8 May 2025 11:32:21 +0300 Subject: [PATCH] Updated package name --- Makefile | 2 +- api.go | 4 ++-- examples/basic_usage.go | 4 ++-- go.mod | 2 +- grpc/client.go | 2 +- grpc/server.go | 4 ++-- grpc/snapshot.pb.go | 2 +- grpc/snapshot.proto | 2 +- interfaces/snapshot.go | 2 +- manager.go | 6 +++--- remote/client.go | 6 +++--- remote/server.go | 6 +++--- snapshot.go | 2 +- store/filesystem/filesystem.go | 4 ++-- store/sqlite/sqlite.go | 4 ++-- stores/stores.go | 8 ++++---- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index c8cacf8..192f27c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ download-third-party: mv ./grpc/third_party/googleapis/grafeas ./grpc rm -rf ./grpc/third_party -gen-proto-geolocation: +gen-proto: mkdir -p ./grpc @protoc -I ./grpc \ diff --git a/api.go b/api.go index 021ee37..53515d2 100644 --- a/api.go +++ b/api.go @@ -4,11 +4,11 @@ import ( "context" "errors" "fmt" + "gitea.unprism.ru/KRBL/Agate/grpc" "os" "path/filepath" - "unprism.ru/KRBL/agate/grpc" - "unprism.ru/KRBL/agate/store" + "gitea.unprism.ru/KRBL/Agate/store" ) // AgateOptions defines configuration options for the Agate library. diff --git a/examples/basic_usage.go b/examples/basic_usage.go index 870292f..9e62f1a 100644 --- a/examples/basic_usage.go +++ b/examples/basic_usage.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "unprism.ru/KRBL/agate" - "unprism.ru/KRBL/agate/stores" + "gitea.unprism.ru/KRBL/Agate" + "gitea.unprism.ru/KRBL/Agate/stores" ) func main() { diff --git a/go.mod b/go.mod index 87330da..671f209 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module unprism.ru/KRBL/agate +module gitea.unprism.ru/KRBL/Agate go 1.24.0 diff --git a/grpc/client.go b/grpc/client.go index 6cee3df..e4307f6 100644 --- a/grpc/client.go +++ b/grpc/client.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "unprism.ru/KRBL/agate/store" + "gitea.unprism.ru/KRBL/Agate/store" ) // SnapshotClient implements the client for connecting to a remote snapshot server diff --git a/grpc/server.go b/grpc/server.go index b310769..9c0464e 100644 --- a/grpc/server.go +++ b/grpc/server.go @@ -9,8 +9,8 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" - "unprism.ru/KRBL/agate/interfaces" - "unprism.ru/KRBL/agate/store" + "gitea.unprism.ru/KRBL/Agate/interfaces" + "gitea.unprism.ru/KRBL/Agate/store" ) // SnapshotServer implements the gRPC server for snapshots diff --git a/grpc/snapshot.pb.go b/grpc/snapshot.pb.go index 01d796d..f767642 100644 --- a/grpc/snapshot.pb.go +++ b/grpc/snapshot.pb.go @@ -476,7 +476,7 @@ const file_snapshot_proto_rawDesc = "" + "\x0fSnapshotService\x12k\n" + "\rListSnapshots\x12 .agate.grpc.ListSnapshotsRequest\x1a!.agate.grpc.ListSnapshotsResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/v1/snapshots\x12}\n" + "\x12GetSnapshotDetails\x12%.agate.grpc.GetSnapshotDetailsRequest\x1a\x1b.agate.grpc.SnapshotDetails\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/snapshots/{snapshot_id}\x12\x8a\x01\n" + - "\fDownloadFile\x12\x1f.agate.grpc.DownloadFileRequest\x1a .agate.grpc.DownloadFileResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/snapshots/{snapshot_id}/files/{file_path}0\x01B\x1cZ\x1aunprism.ru/KRBL/agate/grpcb\x06proto3" + "\fDownloadFile\x12\x1f.agate.grpc.DownloadFileRequest\x1a .agate.grpc.DownloadFileResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/snapshots/{snapshot_id}/files/{file_path}0\x01B\"Z gitea.unprism.ru/KRBL/Agate/grpcb\x06proto3" var ( file_snapshot_proto_rawDescOnce sync.Once diff --git a/grpc/snapshot.proto b/grpc/snapshot.proto index a5aa301..c617eb8 100644 --- a/grpc/snapshot.proto +++ b/grpc/snapshot.proto @@ -5,7 +5,7 @@ package agate.grpc; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; // Добавлено для HTTP mapping -option go_package = "unprism.ru/KRBL/agate/grpc"; +option go_package = "gitea.unprism.ru/KRBL/Agate/grpc"; // Сервис для управления снапшотами service SnapshotService { diff --git a/interfaces/snapshot.go b/interfaces/snapshot.go index 849c027..941ad2c 100644 --- a/interfaces/snapshot.go +++ b/interfaces/snapshot.go @@ -4,7 +4,7 @@ import ( "context" "io" - "unprism.ru/KRBL/agate/store" + "gitea.unprism.ru/KRBL/Agate/store" ) // SnapshotManager defines the interface that the server needs to interact with snapshots diff --git a/manager.go b/manager.go index a410c8b..5688f0c 100644 --- a/manager.go +++ b/manager.go @@ -13,9 +13,9 @@ import ( "github.com/google/uuid" - "unprism.ru/KRBL/agate/archive" - "unprism.ru/KRBL/agate/hash" - "unprism.ru/KRBL/agate/store" + "gitea.unprism.ru/KRBL/Agate/archive" + "gitea.unprism.ru/KRBL/Agate/hash" + "gitea.unprism.ru/KRBL/Agate/store" ) type SnapshotManagerData struct { diff --git a/remote/client.go b/remote/client.go index 186134d..4b626d8 100644 --- a/remote/client.go +++ b/remote/client.go @@ -10,9 +10,9 @@ import ( stdgrpc "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - agateGrpc "unprism.ru/KRBL/agate/grpc" - "unprism.ru/KRBL/agate/interfaces" - "unprism.ru/KRBL/agate/store" + agateGrpc "gitea.unprism.ru/KRBL/Agate/grpc" + "gitea.unprism.ru/KRBL/Agate/interfaces" + "gitea.unprism.ru/KRBL/Agate/store" ) // Client represents a client for connecting to a remote snapshot server diff --git a/remote/server.go b/remote/server.go index 45e1c76..5c02ba1 100644 --- a/remote/server.go +++ b/remote/server.go @@ -9,9 +9,9 @@ import ( stdgrpc "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" - agateGrpc "unprism.ru/KRBL/agate/grpc" - "unprism.ru/KRBL/agate/interfaces" - "unprism.ru/KRBL/agate/store" + agateGrpc "gitea.unprism.ru/KRBL/Agate/grpc" + "gitea.unprism.ru/KRBL/Agate/interfaces" + "gitea.unprism.ru/KRBL/Agate/store" ) // Server implements the gRPC server for snapshots diff --git a/snapshot.go b/snapshot.go index 760e94f..86e5bfb 100644 --- a/snapshot.go +++ b/snapshot.go @@ -2,8 +2,8 @@ package agate import ( "context" + "gitea.unprism.ru/KRBL/Agate/store" "io" - "unprism.ru/KRBL/agate/store" ) // SnapshotManager is an interface that defines operations for managing and interacting with snapshots. diff --git a/store/filesystem/filesystem.go b/store/filesystem/filesystem.go index c75a709..ae805f4 100644 --- a/store/filesystem/filesystem.go +++ b/store/filesystem/filesystem.go @@ -3,11 +3,11 @@ package filesystem import ( "context" "fmt" + "gitea.unprism.ru/KRBL/Agate" + "gitea.unprism.ru/KRBL/Agate/store" "io" "os" "path/filepath" - "unprism.ru/KRBL/agate" - "unprism.ru/KRBL/agate/store" ) const blobExtension = ".zip" diff --git a/store/sqlite/sqlite.go b/store/sqlite/sqlite.go index 1bc67e6..67fe200 100644 --- a/store/sqlite/sqlite.go +++ b/store/sqlite/sqlite.go @@ -6,12 +6,12 @@ import ( "encoding/json" "errors" "fmt" + "gitea.unprism.ru/KRBL/Agate" + "gitea.unprism.ru/KRBL/Agate/store" _ "github.com/mattn/go-sqlite3" "os" "path/filepath" "time" - "unprism.ru/KRBL/agate" - "unprism.ru/KRBL/agate/store" ) const ( diff --git a/stores/stores.go b/stores/stores.go index 17b42ca..752e466 100644 --- a/stores/stores.go +++ b/stores/stores.go @@ -4,9 +4,9 @@ import ( "fmt" "path/filepath" - "unprism.ru/KRBL/agate/store" - "unprism.ru/KRBL/agate/store/filesystem" - "unprism.ru/KRBL/agate/store/sqlite" + "gitea.unprism.ru/KRBL/Agate/store" + "gitea.unprism.ru/KRBL/Agate/store/filesystem" + "gitea.unprism.ru/KRBL/Agate/store/sqlite" ) // NewDefaultMetadataStore creates a new SQLite-based metadata store. @@ -39,4 +39,4 @@ func InitDefaultStores(baseDir string) (store.MetadataStore, store.BlobStore, er } return metadataStore, blobStore, nil -} \ No newline at end of file +}