Skip to content

Commit

Permalink
Merge pull request #7 from turnerlabs/importlibrary
Browse files Browse the repository at this point in the history
Fix issue where Go cStore library is not importable.
  • Loading branch information
kendavis2 authored and kendavis2 committed Mar 10, 2020
2 parents 726848c + f7a2eb1 commit 85dfd63
Show file tree
Hide file tree
Showing 124 changed files with 237 additions and 7,333 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ When the repository has been cloned or the project shared, running `$ cstore pul

Example: `cstore.yml`
```yml
version: v3
version: v4
context: project
files:
- path: service/dev/.env
Expand Down Expand Up @@ -274,7 +274,7 @@ $ cstore pull -t dev -g task-def-secrets --store-command refs # AWS Task Definit
* [S3 Bucket Store Terraform](docs/S3.md)
* [Ghost Files (.cstore)](docs/GHOST.md)
* [Terraform State Files](docs/TERRAFORM.md)
* [Migrate from v1 to v3](docs/MIGRATE.md) (breaking changes)
* [Migrate from v1 to v3+](docs/MIGRATE.md) (breaking changes)
</details>

<details>
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/display"
"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/components/remote"
"github.com/turnerlabs/cstore/components/store"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/display"
"github.com/turnerlabs/cstore/v4/components/path"
"github.com/turnerlabs/cstore/v4/components/remote"
"github.com/turnerlabs/cstore/v4/components/store"
)

var cleanCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"

"github.com/subosito/gotenv"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
)

//"\xE2\x9C\x94" This is a checkmark on mac, but question mark on windows; so,
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cmd
import (
"os"

"github.com/turnerlabs/cstore/components/remote"
"github.com/turnerlabs/cstore/v4/components/remote"

"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/display"
localFile "github.com/turnerlabs/cstore/components/file"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/display"
localFile "github.com/turnerlabs/cstore/v4/components/file"
)

var initCmd = &cobra.Command{
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/display"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/display"
"github.com/turnerlabs/cstore/v4/components/models"
"github.com/turnerlabs/cstore/v4/components/path"
)

// listCmd represents the list command
Expand Down
22 changes: 11 additions & 11 deletions cli/cmd/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ import (
"os"
"time"

"github.com/turnerlabs/cstore/components/convert"
"github.com/turnerlabs/cstore/v4/components/convert"

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/display"
"github.com/turnerlabs/cstore/components/env"
localFile "github.com/turnerlabs/cstore/components/file"
"github.com/turnerlabs/cstore/components/logger"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/components/remote"
"github.com/turnerlabs/cstore/components/token"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/display"
"github.com/turnerlabs/cstore/v4/components/env"
localFile "github.com/turnerlabs/cstore/v4/components/file"
"github.com/turnerlabs/cstore/v4/components/logger"
"github.com/turnerlabs/cstore/v4/components/models"
"github.com/turnerlabs/cstore/v4/components/path"
"github.com/turnerlabs/cstore/v4/components/remote"
"github.com/turnerlabs/cstore/v4/components/token"
)

// pullCmd represents the pull command
Expand Down
16 changes: 8 additions & 8 deletions cli/cmd/purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/display"
"github.com/turnerlabs/cstore/components/logger"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/components/prompt"
"github.com/turnerlabs/cstore/components/remote"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/display"
"github.com/turnerlabs/cstore/v4/components/logger"
"github.com/turnerlabs/cstore/v4/components/models"
"github.com/turnerlabs/cstore/v4/components/path"
"github.com/turnerlabs/cstore/v4/components/prompt"
"github.com/turnerlabs/cstore/v4/components/remote"
)

// purgeCmd represents the purge command
Expand Down
22 changes: 11 additions & 11 deletions cli/cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import (
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/display"
localFile "github.com/turnerlabs/cstore/components/file"
"github.com/turnerlabs/cstore/components/logger"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/components/prompt"
"github.com/turnerlabs/cstore/components/remote"
"github.com/turnerlabs/cstore/components/store"
"github.com/turnerlabs/cstore/components/token"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/display"
localFile "github.com/turnerlabs/cstore/v4/components/file"
"github.com/turnerlabs/cstore/v4/components/logger"
"github.com/turnerlabs/cstore/v4/components/models"
"github.com/turnerlabs/cstore/v4/components/path"
"github.com/turnerlabs/cstore/v4/components/prompt"
"github.com/turnerlabs/cstore/v4/components/remote"
"github.com/turnerlabs/cstore/v4/components/store"
"github.com/turnerlabs/cstore/v4/components/token"
)

var pushCmd = &cobra.Command{
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/mattn/go-colorable"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/store"
"github.com/turnerlabs/cstore/v4/components/store"
)

// storesCmd represents the stores command
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/tests/s3/pull_s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/turnerlabs/cstore/cli/cmd"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/cli/cmd"
"github.com/turnerlabs/cstore/v4/components/cfg"
)

//--------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/tests/s3/push_s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"testing"

"github.com/turnerlabs/cstore/cli/cmd"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/cli/cmd"
"github.com/turnerlabs/cstore/v4/components/cfg"
)

//---------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/tests/s3/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"os"
"testing"

"github.com/turnerlabs/cstore/cli/cmd"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/v4/cli/cmd"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/vault"
"github.com/turnerlabs/cstore/v4/components/vault"
)

// vaultsCmd represents the vaults command
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/components/cfg"
)

// versionCmd represents the version command
Expand Down
2 changes: 1 addition & 1 deletion v4/cli/cmd/version.go → cli/cmd/version.go-e
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/components/cfg"
)

// versionCmd represents the version command
Expand Down
12 changes: 7 additions & 5 deletions cli/main.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package main // github.com/turnerlabs/cstore
package main // github.com/turnerlabs/cstore/v4

import (
"fmt"
"os"

"github.com/turnerlabs/cstore/cli/cmd"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/cli/cmd"
"github.com/turnerlabs/cstore/v4/components/cfg"
)

var version = "v3.0.0-rc"
var version = ""

func main() {
cfg.Version = version
if len(version) > 0 {
cfg.Version = version
}

if err := cmd.RootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
6 changes: 3 additions & 3 deletions components/catalog/create.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package catalog

import (
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/components/prompt"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
"github.com/turnerlabs/cstore/v4/components/prompt"
)

func create(io models.IO) Catalog {
Expand Down
2 changes: 1 addition & 1 deletion components/catalog/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package catalog
import (
"errors"

"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/v4/components/cfg"
yaml "gopkg.in/yaml.v2"
)

Expand Down
4 changes: 2 additions & 2 deletions components/catalog/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/turnerlabs/cstore/components/local"
"github.com/turnerlabs/cstore/components/logger"
"github.com/turnerlabs/cstore/v4/components/local"
"github.com/turnerlabs/cstore/v4/components/logger"
yaml "gopkg.in/yaml.v2"
)

Expand Down
4 changes: 2 additions & 2 deletions components/catalog/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"

uuid "github.com/satori/go.uuid"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
yaml "gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion components/catalog/ghost.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func WriteGhost(path string, g Ghost) error {
comment := `# Ghost replacement files are created in the directories of remotely stored files.
# These files make it possible to run cStore commands from the local directory of remotely
# stored files without being in the same directory as the catalog file. To learn more,
# visit https://github.com/turnerlabs/cstore/blob/master/docs/GHOST.md.
# visit https://github.com/turnerlabs/cstore/v4/blob/master/docs/GHOST.md.
`
d = append([]byte(comment), d...)

Expand Down
2 changes: 1 addition & 1 deletion components/catalog/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"

"github.com/turnerlabs/cstore/components/path"
"github.com/turnerlabs/cstore/v4/components/path"
)

// DefaultFileName ...
Expand Down
6 changes: 3 additions & 3 deletions components/catalog/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func Write(path string, catalog Catalog) error {
return err
}

// Do not upgrade the catalog unless, the catalog version has been changed to v3. This
// Do not upgrade the catalog unless, the catalog version has been changed to v3+. This
// will support backwards compatibility for all existing catalogs.
if catalog.Version == "v2" {
d, err = yaml.Marshal(&catalog)
Expand All @@ -30,8 +30,8 @@ func Write(path string, catalog Catalog) error {
comment := `# This catalog lists files stored remotely based on the files current location.
# To restore the files, run '$ cstore pull' in the same directory as this catalog file.
# If this file is deleted without running a purge command, stored data may be orphaned
# without a way to recover. To get set up, visit https://github.com/turnerlabs/cstore.
# To understand the catalog, visit https://github.com/turnerlabs/cstore/blob/master/docs/CATALOG.md
# without a way to recover. To get set up, visit https://github.com/turnerlabs/cstore/v4.
# To understand the catalog, visit https://github.com/turnerlabs/cstore/v4/blob/master/docs/CATALOG.md
`
d = append([]byte(comment), d...)

Expand Down
4 changes: 2 additions & 2 deletions components/cfg/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cfg

// Version is overridden by the main function unless tests
// which require a default are running.
var Version = "v3.0.0-default"
var Version = "v4.0.0-default"

// SupportedVersions ...
var SupportedVersions = []string{"v2", Version}
var SupportedVersions = []string{"v2", "v3", Version}
6 changes: 3 additions & 3 deletions components/contract/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"time"

"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
)

// IStore is a persistence abstraction facilitating the
Expand Down
6 changes: 3 additions & 3 deletions components/contract/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package contract
import (
"errors"

"github.com/turnerlabs/cstore/components/catalog"
"github.com/turnerlabs/cstore/components/cfg"
"github.com/turnerlabs/cstore/components/models"
"github.com/turnerlabs/cstore/v4/components/catalog"
"github.com/turnerlabs/cstore/v4/components/cfg"
"github.com/turnerlabs/cstore/v4/components/models"
)

// IVault ...
Expand Down
Loading

0 comments on commit 85dfd63

Please sign in to comment.