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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .cloudbuild/scripts/cmd/integration-tests/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import (
"flag"
"path/filepath"

"github.com/gravitational/trace"

"github.com/gravitational/teleport/.cloudbuild/scripts/internal/artifacts"
"github.com/gravitational/teleport/.cloudbuild/scripts/internal/customflag"
"github.com/gravitational/trace"
)

type commandlineArgs struct {
Expand Down
3 changes: 2 additions & 1 deletion .cloudbuild/scripts/internal/git/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"os"
"os/exec"

"github.com/gravitational/teleport/.cloudbuild/scripts/internal/github"
"github.com/gravitational/trace"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"

"github.com/gravitational/teleport/.cloudbuild/scripts/internal/github"
)

// Config represents a git repository that has been configured to use a
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,18 @@ lint-go: GO_LINT_FLAGS ?=
lint-go:
golangci-lint run -c .golangci.yml --build-tags='$(LIBFIDO2_TEST_TAG) $(TOUCHID_TAG)' $(GO_LINT_FLAGS)

.PHONY: fix-imports
fix-imports:
make -C build.assets/ fix-imports

.PHONY: fix-imports/host
fix-imports/host:
@if ! type gci >/dev/null 2>&1; then\
echo 'gci is not installed or is missing from PATH, consider installing it ("go install github.com/daixiang0/gci@latest") or use "make -C build.assets/ fix-imports"';\
exit 1;\
fi
gci write -s 'standard,default,prefix(github.com/gravitational/teleport)' --skip-generated .

.PHONY: lint-build-tooling
lint-build-tooling: GO_LINT_FLAGS ?=
lint-build-tooling:
Expand Down
6 changes: 3 additions & 3 deletions api/breaker/breaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"sync"
"time"

"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/utils"

"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
"github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/utils"
)

// Metrics tallies success and failure counts
Expand Down
6 changes: 3 additions & 3 deletions api/client/auditstreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"context"
"sync"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types/events"

"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"
"google.golang.org/grpc"
ggzip "google.golang.org/grpc/encoding/gzip"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types/events"
)

// createOrResumeAuditStream creates or resumes audit stream described in the request.
Expand Down
20 changes: 10 additions & 10 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ import (
"sync/atomic"
"time"

"github.com/gravitational/teleport/api/breaker"
"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/constants"
"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/metadata"
"github.com/gravitational/teleport/api/observability/tracing"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/events"
"github.com/gravitational/teleport/api/utils"

"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"
"github.com/jonboulle/clockwork"
Expand All @@ -49,6 +39,16 @@ import (
ggzip "google.golang.org/grpc/encoding/gzip"
"google.golang.org/grpc/keepalive"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/gravitational/teleport/api/breaker"
"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/constants"
"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/metadata"
"github.com/gravitational/teleport/api/observability/tracing"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/events"
"github.com/gravitational/teleport/api/utils"
)

func init() {
Expand Down
8 changes: 4 additions & 4 deletions api/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ import (
"testing"
"time"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/types"

"github.com/google/go-cmp/cmp"
"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"
Expand All @@ -38,6 +34,10 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/types"
)

// mockServer mocks an Auth Server.
Expand Down
5 changes: 2 additions & 3 deletions api/client/contextdialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ import (
"net"
"time"

"github.com/gravitational/trace"
oteltrace "go.opentelemetry.io/otel/trace"
"golang.org/x/crypto/ssh"

"github.com/gravitational/teleport/api/client/proxy"
"github.com/gravitational/teleport/api/client/webclient"
"github.com/gravitational/teleport/api/constants"
"github.com/gravitational/teleport/api/observability/tracing"
tracessh "github.com/gravitational/teleport/api/observability/tracing/ssh"
"github.com/gravitational/teleport/api/utils/sshutils"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"
)

// ContextDialer represents network dialer interface that uses context
Expand Down
8 changes: 4 additions & 4 deletions api/client/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
"crypto/x509"
"os"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"
"golang.org/x/net/http2"

"github.com/gravitational/teleport/api/constants"
"github.com/gravitational/teleport/api/identityfile"
"github.com/gravitational/teleport/api/profile"
"github.com/gravitational/teleport/api/utils"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"
"golang.org/x/net/http2"
)

// Credentials are used to authenticate the API auth client. Some Credentials
Expand Down
5 changes: 2 additions & 3 deletions api/client/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/ssh"

"github.com/gravitational/teleport/api/identityfile"
"github.com/gravitational/teleport/api/profile"
"github.com/gravitational/teleport/api/utils/keys"
"github.com/gravitational/teleport/api/utils/sshutils"

"github.com/stretchr/testify/require"
"golang.org/x/crypto/ssh"
)

func TestLoadTLS(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion api/client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
package client

import (
"github.com/gravitational/trace"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/trace"
)

// EventToGRPC converts types.Event to proto.Event
Expand Down
3 changes: 2 additions & 1 deletion api/client/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"io"
"sync"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"

"github.com/gravitational/teleport/api/client/proto"
)

// DownstreamInventoryControlStream is the client/agent side of a bidirectional stream established
Expand Down
3 changes: 2 additions & 1 deletion api/client/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"testing"
"time"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/trace"
"github.com/stretchr/testify/require"

"github.com/gravitational/teleport/api/client/proto"
)

// TestInventoryControlStreamPipe is a sanity-check to make sure that the in-memory
Expand Down
3 changes: 2 additions & 1 deletion api/client/joinservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ package client
import (
"context"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/trace"

"github.com/gravitational/teleport/api/client/proto"
)

// JoinServiceClient is a client for the JoinService, which runs on both the
Expand Down
6 changes: 3 additions & 3 deletions api/client/keepaliver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"context"
"sync"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types"

"github.com/gravitational/trace/trail"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types"
)

// NewKeepAliver returns a new instance of keep aliver.
Expand Down
4 changes: 2 additions & 2 deletions api/client/proto/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ package proto
import (
"time"

"github.com/gravitational/trace"

apidefaults "github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/teleport/api/types"

"github.com/gravitational/trace"
)

// Duration is a wrapper around duration
Expand Down
5 changes: 2 additions & 3 deletions api/client/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ package client
import (
"context"

"github.com/gravitational/teleport/api/types"

"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"

"google.golang.org/protobuf/types/known/emptypb"

"github.com/gravitational/teleport/api/types"
)

// GetWebSession returns the web session for the specified request.
Expand Down
6 changes: 3 additions & 3 deletions api/client/streamwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"context"
"sync"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types"

"github.com/gravitational/trace"
"github.com/gravitational/trace/trail"

"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/types"
)

// NewWatcher returns a new streamWatcher
Expand Down
6 changes: 3 additions & 3 deletions api/identityfile/identityfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"os"
"strings"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"

"github.com/gravitational/teleport/api/utils/keypaths"
"github.com/gravitational/teleport/api/utils/keys"
"github.com/gravitational/teleport/api/utils/sshutils"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion api/identityfile/identityfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"path/filepath"
"testing"

"github.com/gravitational/teleport/api/identityfile"
"github.com/stretchr/testify/require"

"github.com/gravitational/teleport/api/identityfile"
)

// TestIdentityFileBasics verifies basic profile operations such as
Expand Down
3 changes: 2 additions & 1 deletion api/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package metadata
import (
"context"

"github.com/gravitational/teleport/api"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"

"github.com/gravitational/teleport/api"
)

const (
Expand Down
7 changes: 3 additions & 4 deletions api/observability/tracing/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ import (
"net"
"time"

"github.com/gravitational/trace"
log "github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/propagation"
semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
oteltrace "go.opentelemetry.io/otel/trace"
"golang.org/x/crypto/ssh"

"github.com/gravitational/teleport/api/observability/tracing"
"github.com/gravitational/teleport/api/utils/sshutils"

"github.com/gravitational/trace"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions api/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import (
"path/filepath"
"strings"

"github.com/gravitational/teleport/api/utils/keypaths"
"github.com/gravitational/teleport/api/utils/keys"
"github.com/gravitational/teleport/api/utils/sshutils"

"github.com/gravitational/trace"
"golang.org/x/crypto/ssh"
"gopkg.in/yaml.v2"

"github.com/gravitational/teleport/api/utils/keypaths"
"github.com/gravitational/teleport/api/utils/keys"
"github.com/gravitational/teleport/api/utils/sshutils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions api/profile/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"path/filepath"
"testing"

"github.com/gravitational/teleport/api/profile"
"github.com/gravitational/trace"

"github.com/stretchr/testify/require"

"github.com/gravitational/teleport/api/profile"
)

// TestProfileBasics verifies basic profile operations such as
Expand Down
4 changes: 2 additions & 2 deletions api/types/access_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"sort"
"time"

"github.com/gravitational/teleport/api/utils"

"github.com/gravitational/trace"

"github.com/gravitational/teleport/api/utils"
)

// AccessRequest is a request for temporarily granted roles
Expand Down
Loading