Skip to content

Commit

Permalink
Merge pull request #218 from FleekHQ/develop
Browse files Browse the repository at this point in the history
Release to master
  • Loading branch information
jsonsivar authored Oct 23, 2020
2 parents b2f00da + d3a5e44 commit d0233c3
Show file tree
Hide file tree
Showing 38 changed files with 1,885 additions and 1,983 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
echo "::set-output name=TXL_HUB_GATEWAY_URL::TXL_HUB_GATEWAY_URL_${STAGE}"
echo "::set-output name=TXL_USER_KEY::TXL_USER_KEY_${STAGE}"
echo "::set-output name=TXL_USER_SECRET::TXL_USER_SECRET_${STAGE}"
echo "::set-output name=SPACE_STORAGE_SITE_URL::SPACE_STORAGE_SITE_URL_${STAGE}"
- name: Release via goreleaser
uses: goreleaser/goreleaser-action@master
with:
Expand All @@ -64,3 +65,4 @@ jobs:
TXL_HUB_GATEWAY_URL: ${{ secrets[steps.secretnames.outputs.TXL_HUB_GATEWAY_URL] }}
TXL_USER_KEY: ${{ secrets[steps.secretnames.outputs.TXL_USER_KEY] }}
TXL_USER_SECRET: ${{ secrets[steps.secretnames.outputs.TXL_USER_SECRET] }}
SPACE_STORAGE_SITE_URL: ${{ secrets[steps.secretnames.outputs.SPACE_STORAGE_SITE_URL] }}
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ builds:
- -X main.textilehubgatewayurl={{ .Env.TXL_HUB_GATEWAY_URL }}
- -X main.textileuserkey={{ .Env.TXL_USER_KEY }}
- -X main.textileusersecret={{ .Env.TXL_USER_SECRET }}
- -X main.spacestoragesiteurl={{ .Env.SPACE_STORAGE_SITE_URL }}
main: ./cmd/space-daemon/main.go
binary: space
goos:
Expand All @@ -48,6 +49,7 @@ builds:
- -X main.textilehubgatewayurl={{ .Env.TXL_HUB_GATEWAY_URL }}
- -X main.textileuserkey={{ .Env.TXL_USER_KEY }}
- -X main.textileusersecret={{ .Env.TXL_USER_SECRET }}
- -X main.spacestoragesiteurl={{ .Env.SPACE_STORAGE_SITE_URL }}
main: ./cmd/space-daemon/main.go
binary: space
goos:
Expand All @@ -73,6 +75,7 @@ builds:
- -X main.textilehubgatewayurl={{ .Env.TXL_HUB_GATEWAY_URL }}
- -X main.textileuserkey={{ .Env.TXL_USER_KEY }}
- -X main.textileusersecret={{ .Env.TXL_USER_SECRET }}
- -X main.spacestoragesiteurl={{ .Env.SPACE_STORAGE_SITE_URL }}
main: ./cmd/space-daemon/main.go
binary: space
goos:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:
-X 'main.mongousr=${MONGO_USR}' \
-X 'main.mongopw=${MONGO_PW}' \
-X 'main.spaceapi=${SERVICES_API_URL}' \
-X 'main.spacestoragesiteurl=${SPACE_STORAGE_SITE_URL}' \
-X 'main.vaultapi=${VAULT_API_URL}' \
-X 'main.vaultsaltsecret=${VAULT_SALT_SECRET}' \
-X 'main.spacehubauth=${SERVICES_HUB_AUTH_URL}' \
Expand Down
2 changes: 2 additions & 0 deletions cmd/space-daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var (
mongohost string
mongorepset string
spaceapi string
spacestoragesiteurl string
vaultapi string
vaultsaltsecret string
spacehubauth string
Expand Down Expand Up @@ -63,6 +64,7 @@ func main() {
Mongohost: mongohost,
Mongorepset: mongorepset,
ServicesAPIURL: spaceapi,
SpaceStorageSiteUrl: spacestoragesiteurl,
VaultAPIURL: vaultapi,
VaultSaltSecret: vaultsaltsecret,
ServicesHubAuthURL: spacehubauth,
Expand Down
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const (
SpaceServerPort = "space/rpcPort"
SpaceProxyServerPort = "space/rpcProxyPort"
SpaceRestProxyServerPort = "space/restProxyPort"
SpaceStorageSiteUrl = "space/storageSiteUrl"
SpaceStorePath = "space/storePath"
TextileHubTarget = "space/textileHubTarget"
TextileHubMa = "space/textileHubMa"
Expand Down Expand Up @@ -50,6 +51,7 @@ type Flags struct {
Mongorepset string
DevMode bool
ServicesAPIURL string
SpaceStorageSiteUrl string
VaultAPIURL string
VaultSaltSecret string
ServicesHubAuthURL string
Expand Down
4 changes: 4 additions & 0 deletions config/map_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func NewMap(envVal env.SpaceEnv, flags *Flags) Config {
configStr[SpaceVaultAPIURL] = os.Getenv(env.VaultAPIURL)
configStr[SpaceVaultSaltSecret] = os.Getenv(env.VaultSaltSecret)
configStr[SpaceServicesHubAuthURL] = os.Getenv(env.ServicesHubAuthURL)
configStr[SpaceStorageSiteUrl] = os.Getenv(env.SpaceStorageSiteUrl)
configStr[TextileHubTarget] = os.Getenv(env.TextileHubTarget)
configStr[TextileHubMa] = os.Getenv(env.TextileHubMa)
configStr[TextileThreadsTarget] = os.Getenv(env.TextileThreadsTarget)
Expand All @@ -58,6 +59,9 @@ func NewMap(envVal env.SpaceEnv, flags *Flags) Config {
configStr[SpaceVaultAPIURL] = flags.VaultAPIURL
configStr[SpaceVaultSaltSecret] = flags.VaultSaltSecret
configStr[SpaceServicesHubAuthURL] = flags.ServicesHubAuthURL
if flags.SpaceStorageSiteUrl != "" {
configStr[SpaceStorageSiteUrl] = flags.SpaceStorageSiteUrl
}
configStr[TextileHubTarget] = flags.TextileHubTarget
configStr[TextileHubMa] = flags.TextileHubMa
configStr[TextileThreadsTarget] = flags.TextileThreadsTarget
Expand Down
1 change: 1 addition & 0 deletions core/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const (
VaultAPIURL = "VAULT_API_URL"
VaultSaltSecret = "VAULT_SALT_SECRET"
ServicesHubAuthURL = "SERVICES_HUB_AUTH_URL"
SpaceStorageSiteUrl = "SPACE_STORAGE_SITE_URL"
TextileHubTarget = "TXL_HUB_TARGET"
TextileHubMa = "TXL_HUB_MA"
TextileThreadsTarget = "TXL_THREADS_TARGET"
Expand Down
3 changes: 3 additions & 0 deletions core/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const (
FileBackupInProgress FileEventType = "FileBackupInProgress"
FileBackupReady FileEventType = "FileBackupReady"

FileRestored FileEventType = "FileRestored"
FileRestoring FileEventType = "FileRestoring"

FolderAdded FileEventType = "FolderAdded"
FolderDeleted FileEventType = "FolderDeleted"
// NOTE: not sure if this needs to be specific to rename or copy
Expand Down
20 changes: 11 additions & 9 deletions core/space/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type ThreadInfo struct {

type FileInfo struct {
DirEntry
IpfsHash string
BackedUp bool
LocallyAvailable bool
BackupInProgress bool
IpfsHash string
BackedUp bool
LocallyAvailable bool
BackupInProgress bool
RestoreInProgress bool
}

type OpenFileInfo struct {
Expand Down Expand Up @@ -152,11 +153,12 @@ type APISessionTokens struct {
}

type MirrorFile struct {
Path string
BucketSlug string
Backup bool
Shared bool
BackupInProgress bool
Path string
BucketSlug string
Backup bool
Shared bool
BackupInProgress bool
RestoreInProgress bool
}

type SharedDirEntry struct {
Expand Down
Loading

0 comments on commit d0233c3

Please sign in to comment.