feat: rename to shortify

This commit is contained in:
Steven
2023-03-16 08:25:58 +08:00
parent 143bdb7596
commit d08a738a57
43 changed files with 114 additions and 116 deletions

View File

@ -12,8 +12,8 @@ import (
"sort"
"time"
"github.com/boojack/corgi/server/profile"
"github.com/boojack/corgi/server/version"
"github.com/boojack/shortify/server/profile"
"github.com/boojack/shortify/server/version"
)
//go:embed migration
@ -87,7 +87,7 @@ func (db *DB) Open(ctx context.Context) (err error) {
if err != nil {
return fmt.Errorf("failed to read raw database file, err: %w", err)
}
backupDBFilePath := fmt.Sprintf("%s/corgi_%s_%d_backup.db", db.profile.Data, db.profile.Version, time.Now().Unix())
backupDBFilePath := fmt.Sprintf("%s/shortify_%s_%d_backup.db", db.profile.Data, db.profile.Version, time.Now().Unix())
if err := os.WriteFile(backupDBFilePath, rawBytes, 0644); err != nil {
return fmt.Errorf("failed to write raw database file, err: %w", err)
}

View File

@ -9,7 +9,7 @@ INSERT INTO
VALUES
(
101,
'frank@iamcorgi.com',
'frank@shortify.demo',
'Frank',
-- raw password: secret
'$2a$14$ajq8Q7fbtFRQvXpdCq7Jcuy.Rx1h/L4J60Otx.gyNLbAYctGMJ9tK',
@ -27,7 +27,7 @@ INSERT INTO
VALUES
(
102,
'bob@iamcorgi.com',
'bob@shortify.demo',
'Bob',
-- raw password: secret
'$2a$14$ajq8Q7fbtFRQvXpdCq7Jcuy.Rx1h/L4J60Otx.gyNLbAYctGMJ9tK',

View File

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
"github.com/boojack/corgi/api"
"github.com/boojack/corgi/common"
"github.com/boojack/shortify/api"
"github.com/boojack/shortify/common"
)
// shortcutRaw is the store model for an Shortcut.

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"sync"
"github.com/boojack/corgi/server/profile"
"github.com/boojack/shortify/server/profile"
)
// Store provides database access to all raw objects.

View File

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
"github.com/boojack/corgi/api"
"github.com/boojack/corgi/common"
"github.com/boojack/shortify/api"
"github.com/boojack/shortify/common"
)
// userRaw is the store model for an User.

View File

@ -5,7 +5,7 @@ import (
"database/sql"
"strings"
"github.com/boojack/corgi/api"
"github.com/boojack/shortify/api"
)
type userSettingRaw struct {

View File

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
"github.com/boojack/corgi/api"
"github.com/boojack/corgi/common"
"github.com/boojack/shortify/api"
"github.com/boojack/shortify/common"
)
// workspaceRaw is the store model for Workspace.

View File

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
"github.com/boojack/corgi/api"
"github.com/boojack/corgi/common"
"github.com/boojack/shortify/api"
"github.com/boojack/shortify/common"
)
// workspaceUserRaw is the store model for WorkspaceUser.