Skip to content

Commit

Permalink
feat: rename to yatm
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelncui committed Sep 26, 2023
1 parent efb352b commit 508d4bf
Show file tree
Hide file tree
Showing 50 changed files with 72 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# tapemanager
# YATM aka Yet Another Tape Manager

## Install
6 changes: 3 additions & 3 deletions apis/api.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions apis/converts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion apis/device_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/file_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/file_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions apis/file_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/file_list_parents.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/file_mkdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions apis/job_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/job_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/job_display.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package apis
import (
"context"

"github.com/samuelncui/tapemanager/entity"
"github.com/samuelncui/yatm/entity"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion apis/job_get_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/job_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/job_next.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/library_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/source_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apis/tape_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions apis/tape_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions cmd/tape-httpd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/tape-httpd/tape-writer.service
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion entity/copy_status.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion entity/file.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion entity/job.proto
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion entity/job_archive.proto
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion entity/job_restore.proto
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion entity/library_entity_type.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion entity/position.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion entity/service.proto
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion entity/source.proto
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion entity/tape.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/samuelncui/tapemanager/entity"
"github.com/samuelncui/yatm/entity"
"gorm.io/gorm"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/job_archive_display.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions executor/job_archive_exe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/job_archive_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion executor/job_archive_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion executor/job_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os/exec"
"time"

"github.com/samuelncui/tapemanager/library"
"github.com/samuelncui/yatm/library"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/job_restore_display.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 508d4bf

Please sign in to comment.