Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"io/ioutil"
"time"

"github.com/replicatedcom/support-bundle/bundle"
"github.com/replicatedcom/support-bundle/plugins/core"
"github.com/replicatedcom/support-bundle/plugins/docker"
"github.com/replicatedcom/support-bundle/spec"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/bundle"
"github.com/replicatedcom/support-bundle/pkg/plugins/core"
"github.com/replicatedcom/support-bundle/pkg/plugins/docker"
"github.com/replicatedcom/support-bundle/pkg/spec"
"github.com/replicatedcom/support-bundle/pkg/types"

"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
Expand Down
4 changes: 2 additions & 2 deletions bundle/default.go → pkg/bundle/default.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package bundle

import (
"github.com/replicatedcom/support-bundle/spec"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/spec"
"github.com/replicatedcom/support-bundle/pkg/types"
)

var unconditionalYaml = `
Expand Down
2 changes: 1 addition & 1 deletion bundle/exec.go → pkg/bundle/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bundle
import (
"context"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func Exec(ctx context.Context, rootDir string, tasks []types.Task) []*types.Result {
Expand Down
2 changes: 1 addition & 1 deletion bundle/exec_test.go → pkg/bundle/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/pkg/errors"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion bundle/generate.go → pkg/bundle/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/pkg/errors"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"

"github.com/divolgin/archiver/compressor"
jww "github.com/spf13/jwalterweatherman"
Expand Down
2 changes: 1 addition & 1 deletion bundle/generate_test.go → pkg/bundle/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/pkg/errors"
"github.com/stretchr/testify/require"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// TestGenerate runs stub tasks to ensure results are being parsed and packed properly
Expand Down
2 changes: 1 addition & 1 deletion bundle/planner.go → pkg/bundle/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bundle
import (
"strings"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

type Planner struct {
Expand Down
2 changes: 1 addition & 1 deletion plans/byte-source.go → pkg/plans/byte-source.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// ByteSource is a Task that gets its data source as a []byte.
Expand Down
2 changes: 1 addition & 1 deletion plans/prepared.go → pkg/plans/prepared.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"path/filepath"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// Prepared is a Task that returns preconfigured Results.
Expand Down
2 changes: 1 addition & 1 deletion plans/stream-source.go → pkg/plans/stream-source.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// StreamSource is a Task that gets its data as an io.Reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// StructuredSource is a Task that gets its data as a structured object ready to
Expand Down
2 changes: 1 addition & 1 deletion plans/util.go → pkg/plans/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package plans
import (
"io"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
jww "github.com/spf13/jwalterweatherman"
)

Expand Down
2 changes: 1 addition & 1 deletion plans/write.go → pkg/plans/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

yaml "gopkg.in/yaml.v2"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func write(rootDir string, path string, data []byte, result *types.Result) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/core/core.go → pkg/plugins/core/core.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package core

import (
"github.com/replicatedcom/support-bundle/plugins/core/planners"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/planners"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func New() types.Plugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package planners

import (
"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/plugins/core/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func Hostname(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"
"strings"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/plugins/core/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
"github.com/replicatedcom/support-bundle/pkg/types"

jww "github.com/spf13/jwalterweatherman"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/plugins/core/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func ReadCommand(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/plugins/core/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func ReadFile(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"
"strings"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/plugins/core/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
"github.com/replicatedcom/support-bundle/pkg/types"

jww "github.com/spf13/jwalterweatherman"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"os/exec"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func ReadCommand(command string, args ...string) types.BytesProducer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"io/ioutil"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func ReadFile(src string) types.BytesProducer {
Expand Down
6 changes: 3 additions & 3 deletions plugins/docker/docker.go → pkg/plugins/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package docker

import (
"github.com/docker/docker/client"
"github.com/replicatedcom/support-bundle/plugins/docker/planners"
"github.com/replicatedcom/support-bundle/plugins/docker/producers"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plugins/docker/planners"
"github.com/replicatedcom/support-bundle/pkg/plugins/docker/producers"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func New() (types.Plugin, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"path/filepath"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
)

// path returns "" if dir is empty, otherwise returns the joined pathnme
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package planners

import (
"github.com/replicatedcom/support-bundle/plugins/docker/producers"
"github.com/replicatedcom/support-bundle/pkg/plugins/docker/producers"
)

type Docker struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package planners
import (
"errors"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) ExecCommand(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) Inspect(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) Logs(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/replicatedcom/support-bundle/plans"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/plans"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) ReadFile(spec types.Spec) []types.Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

// ExecCommand returns stdout and stderr results.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package producers
import (
"context"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) Inspect(containerID string) types.StructuredProducer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"

dockertypes "github.com/docker/docker/api/types"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) Logs(containerID string) types.StreamProducer {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"io"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func (d *Docker) ReadFile(containerID string, path string) types.StreamProducer {
Expand Down
2 changes: 1 addition & 1 deletion spec/parse.go → pkg/spec/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package spec

import (
"github.com/pkg/errors"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
yaml "gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion spec/parse_test.go → pkg/spec/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package spec
import (
"testing"

"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/types"
"github.com/stretchr/testify/require"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions tests/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import (
"testing"
"time"

"github.com/replicatedcom/support-bundle/plans"
coreplanners "github.com/replicatedcom/support-bundle/plugins/core/planners"
coreproducers "github.com/replicatedcom/support-bundle/plugins/core/producers"
dockerplanners "github.com/replicatedcom/support-bundle/plugins/docker/planners"
dockerproducers "github.com/replicatedcom/support-bundle/plugins/docker/producers"
"github.com/replicatedcom/support-bundle/pkg/plans"
coreplanners "github.com/replicatedcom/support-bundle/pkg/plugins/core/planners"
coreproducers "github.com/replicatedcom/support-bundle/pkg/plugins/core/producers"
dockerplanners "github.com/replicatedcom/support-bundle/pkg/plugins/docker/planners"
dockerproducers "github.com/replicatedcom/support-bundle/pkg/plugins/docker/producers"

"github.com/divolgin/archiver/extractor"
"github.com/stretchr/testify/require"

"github.com/replicatedcom/support-bundle/bundle"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/bundle"
"github.com/replicatedcom/support-bundle/pkg/types"

docker "github.com/docker/docker/client"
)
Expand Down
10 changes: 5 additions & 5 deletions try/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"log"
"time"

"github.com/replicatedcom/support-bundle/bundle"
"github.com/replicatedcom/support-bundle/plugins/core"
"github.com/replicatedcom/support-bundle/plugins/docker"
"github.com/replicatedcom/support-bundle/spec"
"github.com/replicatedcom/support-bundle/types"
"github.com/replicatedcom/support-bundle/pkg/bundle"
"github.com/replicatedcom/support-bundle/pkg/plugins/core"
"github.com/replicatedcom/support-bundle/pkg/plugins/docker"
"github.com/replicatedcom/support-bundle/pkg/spec"
"github.com/replicatedcom/support-bundle/pkg/types"
)

func main() {
Expand Down