Updated package name
This commit is contained in:
parent
13744f0500
commit
9d04f43104
2
Makefile
2
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 \
|
||||
|
4
api.go
4
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.
|
||||
|
@ -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() {
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module unprism.ru/KRBL/agate
|
||||
module gitea.unprism.ru/KRBL/Agate
|
||||
|
||||
go 1.24.0
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user