mirror of
https://github.com/samuelncui/yatm.git
synced 2025-12-23 06:15:22 +00:00
feat: rename to yatm
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package apis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/samuelncui/tapemanager/entity"
|
||||
"github.com/samuelncui/yatm/entity"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
2
build.sh
2
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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/samuelncui/tapemanager/entity"
|
||||
"github.com/samuelncui/yatm/entity"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/samuelncui/tapemanager/library"
|
||||
"github.com/samuelncui/yatm/library"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
2
external/external.go
vendored
2
external/external.go
vendored
@@ -1,6 +1,6 @@
|
||||
package external
|
||||
|
||||
import "github.com/samuelncui/tapemanager/library"
|
||||
import "github.com/samuelncui/yatm/library"
|
||||
|
||||
type External struct {
|
||||
lib *library.Library
|
||||
|
||||
2
external/from_json.go
vendored
2
external/from_json.go
vendored
@@ -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 {
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/samuelncui/tapemanager
|
||||
module github.com/samuelncui/yatm
|
||||
|
||||
go 1.20
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/samuelncui/tapemanager/entity"
|
||||
"github.com/samuelncui/yatm/entity"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,7 +3,7 @@ package tapechanger
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/samuelncui/tapemanager/library"
|
||||
"github.com/samuelncui/yatm/library"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user