diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e806024..b304d73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,4 +47,4 @@ jobs: files: | LICENSE README.md - tapemanager-linux-amd64-${{ env.RELEASE_VERSION }}.tar.gz + yatm-linux-amd64-${{ env.RELEASE_VERSION }}.tar.gz diff --git a/README.md b/README.md index 97a185c..e6f0014 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# tapemanager +# YATM aka Yet Another Tape Manager + +## Install diff --git a/apis/api.go b/apis/api.go index 96aa402..e1818f5 100644 --- a/apis/api.go +++ b/apis/api.go @@ -1,9 +1,9 @@ package apis import ( - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/executor" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/executor" + "github.com/samuelncui/yatm/library" ) var ( diff --git a/apis/converts.go b/apis/converts.go index ad68750..05c6728 100644 --- a/apis/converts.go +++ b/apis/converts.go @@ -6,9 +6,9 @@ import ( "path/filepath" "time" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/executor" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/executor" + "github.com/samuelncui/yatm/library" ) func convertFiles(files ...*library.File) []*entity.File { diff --git a/apis/device_list.go b/apis/device_list.go index cc51dda..69b9fda 100644 --- a/apis/device_list.go +++ b/apis/device_list.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) DeviceList(ctx context.Context, req *entity.DeviceListRequest) (*entity.DeviceListReply, error) { diff --git a/apis/file_delete.go b/apis/file_delete.go index 5aa223e..86ec50b 100644 --- a/apis/file_delete.go +++ b/apis/file_delete.go @@ -4,7 +4,7 @@ import ( "context" mapset "github.com/deckarep/golang-set/v2" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) FileDelete(ctx context.Context, req *entity.FileDeleteRequest) (*entity.FileDeleteReply, error) { diff --git a/apis/file_edit.go b/apis/file_edit.go index abeffca..8c4b342 100644 --- a/apis/file_edit.go +++ b/apis/file_edit.go @@ -7,7 +7,7 @@ import ( "path" "strings" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) FileEdit(ctx context.Context, req *entity.FileEditRequest) (*entity.FileEditReply, error) { diff --git a/apis/file_get.go b/apis/file_get.go index e97afee..b5e9346 100644 --- a/apis/file_get.go +++ b/apis/file_get.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/library" ) func (api *API) FileGet(ctx context.Context, req *entity.FileGetRequest) (*entity.FileGetReply, error) { diff --git a/apis/file_list_parents.go b/apis/file_list_parents.go index 4a95c92..9610223 100644 --- a/apis/file_list_parents.go +++ b/apis/file_list_parents.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) FileListParents(ctx context.Context, req *entity.FileListParentsRequest) (*entity.FileListParentsReply, error) { diff --git a/apis/file_mkdir.go b/apis/file_mkdir.go index a711c23..8e5f3a3 100644 --- a/apis/file_mkdir.go +++ b/apis/file_mkdir.go @@ -5,7 +5,7 @@ import ( "fmt" "io/fs" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) FileMkdir(ctx context.Context, req *entity.FileMkdirRequest) (*entity.FileMkdirReply, error) { diff --git a/apis/job_create.go b/apis/job_create.go index 08b1d17..7919d7e 100644 --- a/apis/job_create.go +++ b/apis/job_create.go @@ -3,8 +3,8 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/executor" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/executor" ) func (api *API) JobCreate(ctx context.Context, req *entity.JobCreateRequest) (*entity.JobCreateReply, error) { diff --git a/apis/job_delete.go b/apis/job_delete.go index 86bd5c0..3249a59 100644 --- a/apis/job_delete.go +++ b/apis/job_delete.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) JobDelete(ctx context.Context, req *entity.JobDeleteRequest) (*entity.JobDeleteReply, error) { diff --git a/apis/job_display.go b/apis/job_display.go index 9ea79f9..a36b71a 100644 --- a/apis/job_display.go +++ b/apis/job_display.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" "github.com/sirupsen/logrus" ) diff --git a/apis/job_get_log.go b/apis/job_get_log.go index 2b9425b..d2c1f51 100644 --- a/apis/job_get_log.go +++ b/apis/job_get_log.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) JobGetLog(ctx context.Context, req *entity.JobGetLogRequest) (*entity.JobGetLogReply, error) { diff --git a/apis/job_list.go b/apis/job_list.go index 2f4f942..6b92adf 100644 --- a/apis/job_list.go +++ b/apis/job_list.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) JobList(ctx context.Context, req *entity.JobListRequest) (*entity.JobListReply, error) { diff --git a/apis/job_next.go b/apis/job_next.go index f995477..eb0cf79 100644 --- a/apis/job_next.go +++ b/apis/job_next.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) JobNext(ctx context.Context, req *entity.JobNextRequest) (*entity.JobNextReply, error) { diff --git a/apis/library_export.go b/apis/library_export.go index b68d96a..94d10fe 100644 --- a/apis/library_export.go +++ b/apis/library_export.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) LibraryExport(ctx context.Context, req *entity.LibraryExportRequest) (*entity.LibraryExportReply, error) { diff --git a/apis/source_list.go b/apis/source_list.go index 9dec007..1788239 100644 --- a/apis/source_list.go +++ b/apis/source_list.go @@ -8,7 +8,7 @@ import ( "path" "strings" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) SourceList(ctx context.Context, req *entity.SourceListRequest) (*entity.SourceListReply, error) { diff --git a/apis/tape_delete.go b/apis/tape_delete.go index f0d6051..46a5f0d 100644 --- a/apis/tape_delete.go +++ b/apis/tape_delete.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (api *API) TapeDelete(ctx context.Context, req *entity.TapeDeleteRequest) (*entity.TapeDeleteReply, error) { diff --git a/apis/tape_list.go b/apis/tape_list.go index 0860061..9d19be0 100644 --- a/apis/tape_list.go +++ b/apis/tape_list.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/samber/lo" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/library" ) func (api *API) TapeList(ctx context.Context, req *entity.TapeListRequest) (*entity.TapeListReply, error) { diff --git a/build.sh b/build.sh index e9c50b7..fa2e8b0 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ set -ex; CURDIR=$(cd $(dirname $0); pwd); cd ${CURDIR}; -export TARGET_FILE="tapemanager-linux-amd64-${RELEASE_VERSION}.tar.gz" +export TARGET_FILE="yatm-linux-amd64-${RELEASE_VERSION}.tar.gz" rm -rf output; mkdir -p output; diff --git a/cmd/tape-httpd/main.go b/cmd/tape-httpd/main.go index 1bfcc0e..cb5a968 100644 --- a/cmd/tape-httpd/main.go +++ b/cmd/tape-httpd/main.go @@ -15,12 +15,12 @@ import ( "github.com/improbable-eng/grpc-web/go/grpcweb" rotatelogs "github.com/lestrrat-go/file-rotatelogs" "github.com/rifflock/lfshook" - "github.com/samuelncui/tapemanager/apis" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/executor" - "github.com/samuelncui/tapemanager/library" - "github.com/samuelncui/tapemanager/resource" - "github.com/samuelncui/tapemanager/tools" + "github.com/samuelncui/yatm/apis" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/executor" + "github.com/samuelncui/yatm/library" + "github.com/samuelncui/yatm/resource" + "github.com/samuelncui/yatm/tools" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/cmd/tape-httpd/tape-writer.service b/cmd/tape-httpd/tape-writer.service index be6210d..76ed1e5 100644 --- a/cmd/tape-httpd/tape-writer.service +++ b/cmd/tape-httpd/tape-writer.service @@ -1,13 +1,13 @@ [Unit] Description=Tape Writer Service -Documentation=https://github.com/samuelncui/tapemanager/ +Documentation=https://github.com/samuelncui/yatm/ After=network.target [Service] User=root Type=simple -WorkingDirectory=/opt/tapemanager -ExecStart=/opt/tapemanager/httpd +WorkingDirectory=/opt/yatm +ExecStart=/opt/yatm/httpd Restart=always RestartSec=15 StartLimitInterval=0 diff --git a/entity/copy_status.proto b/entity/copy_status.proto index d74cef8..590dd7f 100644 --- a/entity/copy_status.proto +++ b/entity/copy_status.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package copy_status; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; enum CopyStatus { DRAFT = 0; diff --git a/entity/file.proto b/entity/file.proto index 191d9b4..40ac04e 100644 --- a/entity/file.proto +++ b/entity/file.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package file; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; message File { int64 id = 1; diff --git a/entity/job.proto b/entity/job.proto index aa04d05..90aa4d5 100644 --- a/entity/job.proto +++ b/entity/job.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; import "job_archive.proto"; import "job_restore.proto"; diff --git a/entity/job_archive.proto b/entity/job_archive.proto index 59dba16..25d810c 100644 --- a/entity/job_archive.proto +++ b/entity/job_archive.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job_archive; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; import "source.proto"; diff --git a/entity/job_restore.proto b/entity/job_restore.proto index cfe0cd2..73b3cfe 100644 --- a/entity/job_restore.proto +++ b/entity/job_restore.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job_restore; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; import "copy_status.proto"; diff --git a/entity/library_entity_type.proto b/entity/library_entity_type.proto index cd519d7..38140ee 100644 --- a/entity/library_entity_type.proto +++ b/entity/library_entity_type.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package library_entity_type; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; enum LibraryEntityType { NONE = 0; diff --git a/entity/position.proto b/entity/position.proto index 470fa9f..eb13441 100644 --- a/entity/position.proto +++ b/entity/position.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package position; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; message Position { int64 id = 1; diff --git a/entity/service.proto b/entity/service.proto index 11d7138..6459cf5 100644 --- a/entity/service.proto +++ b/entity/service.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package service; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; import "job.proto"; import "file.proto"; diff --git a/entity/source.proto b/entity/source.proto index 56a3c53..ad4b23c 100644 --- a/entity/source.proto +++ b/entity/source.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package source; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; import "copy_status.proto"; diff --git a/entity/tape.proto b/entity/tape.proto index 00790bd..e01a544 100644 --- a/entity/tape.proto +++ b/entity/tape.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package tape; -option go_package = "github.com/samuelncui/tapemanager/entity"; +option go_package = "github.com/samuelncui/yatm/entity"; message Tape { int64 id = 1; diff --git a/executor/executor.go b/executor/executor.go index 8182831..eeca0bb 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -7,8 +7,8 @@ import ( "sync" mapset "github.com/deckarep/golang-set/v2" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/library" "gorm.io/gorm" ) diff --git a/executor/job.go b/executor/job.go index 2c9c9c9..19923ee 100644 --- a/executor/job.go +++ b/executor/job.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" "gorm.io/gorm" ) diff --git a/executor/job_archive_display.go b/executor/job_archive_display.go index 71ade86..a5c8fbb 100644 --- a/executor/job_archive_display.go +++ b/executor/job_archive_display.go @@ -4,7 +4,7 @@ import ( "context" "sync/atomic" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (e *Executor) getArchiveDisplay(ctx context.Context, job *Job) (*entity.JobArchiveDisplay, error) { diff --git a/executor/job_archive_exe.go b/executor/job_archive_exe.go index a801511..449a19e 100644 --- a/executor/job_archive_exe.go +++ b/executor/job_archive_exe.go @@ -16,9 +16,9 @@ import ( mapset "github.com/deckarep/golang-set/v2" "github.com/samber/lo" "github.com/samuelncui/acp" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/library" - "github.com/samuelncui/tapemanager/tools" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/library" + "github.com/samuelncui/yatm/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_archive_param.go b/executor/job_archive_param.go index 67c01e2..2dc920b 100644 --- a/executor/job_archive_param.go +++ b/executor/job_archive_param.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/samuelncui/acp" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (e *Executor) createArchive(ctx context.Context, job *Job, param *entity.JobArchiveParam) error { diff --git a/executor/job_archive_start.go b/executor/job_archive_start.go index 11b6764..7492d1d 100644 --- a/executor/job_archive_start.go +++ b/executor/job_archive_start.go @@ -3,7 +3,7 @@ package executor import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (e *Executor) startArchive(ctx context.Context, job *Job) error { diff --git a/executor/job_restore.go b/executor/job_restore.go index e86a00b..d756ed9 100644 --- a/executor/job_restore.go +++ b/executor/job_restore.go @@ -7,7 +7,7 @@ import ( "os/exec" "time" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/library" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_display.go b/executor/job_restore_display.go index d1a3ef7..01214f9 100644 --- a/executor/job_restore_display.go +++ b/executor/job_restore_display.go @@ -4,7 +4,7 @@ import ( "context" "sync/atomic" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (e *Executor) getRestoreDisplay(ctx context.Context, job *Job) (*entity.JobRestoreDisplay, error) { diff --git a/executor/job_restore_exe.go b/executor/job_restore_exe.go index 44c919c..16ce380 100644 --- a/executor/job_restore_exe.go +++ b/executor/job_restore_exe.go @@ -18,8 +18,8 @@ import ( jsoniter "github.com/json-iterator/go" "github.com/samber/lo" "github.com/samuelncui/acp" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/tools" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_param.go b/executor/job_restore_param.go index 7dfd0c9..697f7f4 100644 --- a/executor/job_restore_param.go +++ b/executor/job_restore_param.go @@ -9,9 +9,9 @@ import ( mapset "github.com/deckarep/golang-set/v2" "github.com/samber/lo" - "github.com/samuelncui/tapemanager/entity" - "github.com/samuelncui/tapemanager/library" - "github.com/samuelncui/tapemanager/tools" + "github.com/samuelncui/yatm/entity" + "github.com/samuelncui/yatm/library" + "github.com/samuelncui/yatm/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_start.go b/executor/job_restore_start.go index 65e196a..4e3de1b 100644 --- a/executor/job_restore_start.go +++ b/executor/job_restore_start.go @@ -3,7 +3,7 @@ package executor import ( "context" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) func (e *Executor) startRestore(ctx context.Context, job *Job) error { diff --git a/external/external.go b/external/external.go index 02fbeb4..bcb6ff6 100644 --- a/external/external.go +++ b/external/external.go @@ -1,6 +1,6 @@ package external -import "github.com/samuelncui/tapemanager/library" +import "github.com/samuelncui/yatm/library" type External struct { lib *library.Library diff --git a/external/from_json.go b/external/from_json.go index f3f118b..9067d20 100644 --- a/external/from_json.go +++ b/external/from_json.go @@ -9,7 +9,7 @@ import ( "path" "github.com/samuelncui/acp" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/library" ) func (e *External) ImportACPReport(ctx context.Context, barname, name, encryption string, reader io.Reader) error { diff --git a/go.mod b/go.mod index 1965d05..c61dcac 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/samuelncui/tapemanager +module github.com/samuelncui/yatm go 1.20 diff --git a/library/library.go b/library/library.go index 5fb8e65..539d889 100644 --- a/library/library.go +++ b/library/library.go @@ -7,7 +7,7 @@ import ( "github.com/modern-go/reflect2" "github.com/samber/lo" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" "gorm.io/gorm" ) diff --git a/library/tape.go b/library/tape.go index 8893b15..d98a939 100644 --- a/library/tape.go +++ b/library/tape.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/samuelncui/tapemanager/entity" + "github.com/samuelncui/yatm/entity" ) var ( diff --git a/tapechanger/changer.go b/tapechanger/changer.go index dc2b8f7..a428424 100644 --- a/tapechanger/changer.go +++ b/tapechanger/changer.go @@ -3,7 +3,7 @@ package tapechanger import ( "context" - "github.com/samuelncui/tapemanager/library" + "github.com/samuelncui/yatm/library" ) var (