refactor: rewrite imports to include the /v2 suffix for version 2

pull/17607/head
Jonathan A. Sternberg 2020-04-03 12:39:20 -05:00
parent 96321ff8bd
commit 0ae8bebd75
No known key found for this signature in database
GPG Key ID: 4A0C1200CB8B9D2E
957 changed files with 2352 additions and 2363 deletions

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
// AuthAgent provides a means to authenticate users with resource and their associate actions. It // AuthAgent provides a means to authenticate users with resource and their associate actions. It

View File

@ -4,10 +4,10 @@ import (
"context" "context"
"testing" "testing"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
icontext "github.com/influxdata/influxdb/context" icontext "github.com/influxdata/influxdb/v2/context"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.AuthorizationService = (*AuthorizationService)(nil) var _ influxdb.AuthorizationService = (*AuthorizationService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var authorizationCmpOptions = cmp.Options{ var authorizationCmpOptions = cmp.Options{

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
icontext "github.com/influxdata/influxdb/context" icontext "github.com/influxdata/influxdb/v2/context"
) )
func isAllowedAll(a influxdb.Authorizer, permissions []influxdb.Permission) error { func isAllowedAll(a influxdb.Authorizer, permissions []influxdb.Permission) error {

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
// AuthorizeFindAuthorizations takes the given items and returns only the ones that the user is authorized to read. // AuthorizeFindAuthorizations takes the given items and returns only the ones that the user is authorized to read.

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"io" "io"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/kit/tracing" "github.com/influxdata/influxdb/v2/kit/tracing"
) )
var _ influxdb.BackupService = (*BackupService)(nil) var _ influxdb.BackupService = (*BackupService)(nil)

View File

@ -2,8 +2,8 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/kit/tracing" "github.com/influxdata/influxdb/v2/kit/tracing"
) )
var _ influxdb.BucketService = (*BucketService)(nil) var _ influxdb.BucketService = (*BucketService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var bucketCmpOptions = cmp.Options{ var bucketCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.CheckService = (*CheckService)(nil) var _ influxdb.CheckService = (*CheckService)(nil)

View File

@ -6,14 +6,13 @@ import (
"sort" "sort"
"testing" "testing"
"github.com/influxdata/influxdb/notification/check"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" "github.com/influxdata/influxdb/v2/notification/check"
influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var checkCmpOptions = cmp.Options{ var checkCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.DashboardService = (*DashboardService)(nil) var _ influxdb.DashboardService = (*DashboardService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var dashboardCmpOptions = cmp.Options{ var dashboardCmpOptions = cmp.Options{

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.DocumentService = (*DocumentService)(nil) var _ influxdb.DocumentService = (*DocumentService)(nil)

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"errors" "errors"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.LabelService = (*LabelService)(nil) var _ influxdb.LabelService = (*LabelService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
const ( const (

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.NotificationEndpointService = (*NotificationEndpointService)(nil) var _ influxdb.NotificationEndpointService = (*NotificationEndpointService)(nil)

View File

@ -7,12 +7,12 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
"github.com/influxdata/influxdb/notification/endpoint" "github.com/influxdata/influxdb/v2/notification/endpoint"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var notificationEndpointCmpOptions = cmp.Options{ var notificationEndpointCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.NotificationRuleStore = (*NotificationRuleStore)(nil) var _ influxdb.NotificationRuleStore = (*NotificationRuleStore)(nil)

View File

@ -6,14 +6,13 @@ import (
"sort" "sort"
"testing" "testing"
"github.com/influxdata/influxdb/notification/rule"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" "github.com/influxdata/influxdb/v2/notification/rule"
influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var notificationRuleCmpOptions = cmp.Options{ var notificationRuleCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.OrganizationService = (*OrgService)(nil) var _ influxdb.OrganizationService = (*OrgService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var orgCmpOptions = cmp.Options{ var orgCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
// PasswordService is a new authorization middleware for a password service. // PasswordService is a new authorization middleware for a password service.

View File

@ -4,10 +4,10 @@ import (
"context" "context"
"testing" "testing"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
icontext "github.com/influxdata/influxdb/context" icontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.ScraperTargetStoreService = (*ScraperTargetStoreService)(nil) var _ influxdb.ScraperTargetStoreService = (*ScraperTargetStoreService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var scraperCmpOptions = cmp.Options{ var scraperCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.SecretService = (*SecretService)(nil) var _ influxdb.SecretService = (*SecretService)(nil)

View File

@ -6,11 +6,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var secretCmpOptions = cmp.Options{ var secretCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.SourceService = (*SourceService)(nil) var _ influxdb.SourceService = (*SourceService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var sourceCmpOptions = cmp.Options{ var sourceCmpOptions = cmp.Options{

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/kit/tracing" "github.com/influxdata/influxdb/v2/kit/tracing"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -5,14 +5,14 @@ import (
"testing" "testing"
"time" "time"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
pctx "github.com/influxdata/influxdb/context" pctx "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/http" "github.com/influxdata/influxdb/v2/http"
"github.com/influxdata/influxdb/inmem" "github.com/influxdata/influxdb/v2/inmem"
"github.com/influxdata/influxdb/kv" "github.com/influxdata/influxdb/v2/kv"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
_ "github.com/influxdata/influxdb/query/builtin" _ "github.com/influxdata/influxdb/v2/query/builtin"
"github.com/pkg/errors" "github.com/pkg/errors"
"go.uber.org/zap/zaptest" "go.uber.org/zap/zaptest"
) )

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.TelegrafConfigStore = (*TelegrafConfigService)(nil) var _ influxdb.TelegrafConfigStore = (*TelegrafConfigService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var telegrafCmpOptions = cmp.Options{ var telegrafCmpOptions = cmp.Options{

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
type OrganizationService interface { type OrganizationService interface {

View File

@ -5,11 +5,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
type OrgService struct { type OrgService struct {

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.UserService = (*UserService)(nil) var _ influxdb.UserService = (*UserService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var userCmpOptions = cmp.Options{ var userCmpOptions = cmp.Options{

View File

@ -1,6 +1,6 @@
package authorizer_test package authorizer_test
import "github.com/influxdata/influxdb" import "github.com/influxdata/influxdb/v2"
// Authorizer is mock authorizer that can be used in testing. // Authorizer is mock authorizer that can be used in testing.
type Authorizer struct { type Authorizer struct {

View File

@ -3,7 +3,7 @@ package authorizer
import ( import (
"context" "context"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
) )
var _ influxdb.VariableService = (*VariableService)(nil) var _ influxdb.VariableService = (*VariableService)(nil)

View File

@ -7,11 +7,11 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb" "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/authorizer" "github.com/influxdata/influxdb/v2/authorizer"
influxdbcontext "github.com/influxdata/influxdb/context" influxdbcontext "github.com/influxdata/influxdb/v2/context"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
var variableCmpOptions = cmp.Options{ var variableCmpOptions = cmp.Options{

View File

@ -3,8 +3,8 @@ package influxdb_test
import ( import (
"testing" "testing"
platform "github.com/influxdata/influxdb" platform "github.com/influxdata/influxdb/v2"
influxdbtesting "github.com/influxdata/influxdb/testing" influxdbtesting "github.com/influxdata/influxdb/v2/testing"
) )
func TestAuthorizer_PermissionAllowed(t *testing.T) { func TestAuthorizer_PermissionAllowed(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
"time" "time"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
platform "github.com/influxdata/influxdb" platform "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/rand" "github.com/influxdata/influxdb/v2/rand"
"github.com/influxdata/influxdb/snowflake" "github.com/influxdata/influxdb/v2/snowflake"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -8,7 +8,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/influxdata/influxdb/bolt" "github.com/influxdata/influxdb/v2/bolt"
"go.uber.org/zap/zaptest" "go.uber.org/zap/zaptest"
) )

View File

@ -6,7 +6,7 @@ import (
"math/rand" "math/rand"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
platform "github.com/influxdata/influxdb" platform "github.com/influxdata/influxdb/v2"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"testing" "testing"
platform "github.com/influxdata/influxdb" platform "github.com/influxdata/influxdb/v2"
"github.com/influxdata/influxdb/mock" "github.com/influxdata/influxdb/v2/mock"
) )
func TestID(t *testing.T) { func TestID(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"time" "time"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/kit/tracing" "github.com/influxdata/influxdb/v2/kit/tracing"
"github.com/influxdata/influxdb/kv" "github.com/influxdata/influxdb/v2/kv"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"testing" "testing"
"github.com/influxdata/influxdb/kv" "github.com/influxdata/influxdb/v2/kv"
platformtesting "github.com/influxdata/influxdb/testing" platformtesting "github.com/influxdata/influxdb/v2/testing"
) )
func initKVStore(f platformtesting.KVStoreFields, t *testing.T) (kv.Store, func()) { func initKVStore(f platformtesting.KVStoreFields, t *testing.T) (kv.Store, func()) {

View File

@ -3,8 +3,8 @@ package bolt_test
import ( import (
"testing" "testing"
"github.com/influxdata/influxdb/kit/prom" "github.com/influxdata/influxdb/v2/kit/prom"
"github.com/influxdata/influxdb/kit/prom/promtest" "github.com/influxdata/influxdb/v2/kit/prom/promtest"
"go.uber.org/zap/zaptest" "go.uber.org/zap/zaptest"
) )

View File

@ -6,7 +6,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/kapacitor/pipeline" "github.com/influxdata/kapacitor/pipeline"
"github.com/influxdata/kapacitor/pipeline/tick" "github.com/influxdata/kapacitor/pipeline/tick"
) )

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestAlertServices(t *testing.T) { func TestAlertServices(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/kapacitor/pipeline" "github.com/influxdata/kapacitor/pipeline"
"github.com/influxdata/kapacitor/tick" "github.com/influxdata/kapacitor/tick"
"github.com/influxdata/kapacitor/tick/ast" "github.com/influxdata/kapacitor/tick/ast"

View File

@ -5,7 +5,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestReverse(t *testing.T) { func TestReverse(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/id" "github.com/influxdata/influxdb/v2/chronograf/id"
client "github.com/influxdata/kapacitor/client/v1" client "github.com/influxdata/kapacitor/client/v1"
) )

View File

@ -8,7 +8,7 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
client "github.com/influxdata/kapacitor/client/v1" client "github.com/influxdata/kapacitor/client/v1"
) )

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
// Data returns the tickscript data section for querying // Data returns the tickscript data section for querying

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
var config = `{ var config = `{

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
// HTTPEndpoint is the default location of the tickscript output // HTTPEndpoint is the default location of the tickscript output

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
// InfluxOut creates a kapacitor influxDBOut node to write alert data to Database, RP, Measurement. // InfluxOut creates a kapacitor influxDBOut node to write alert data to Database, RP, Measurement.

View File

@ -1,7 +1,7 @@
package kapacitor package kapacitor
import "testing" import "testing"
import "github.com/influxdata/influxdb/chronograf" import "github.com/influxdata/influxdb/v2/chronograf"
func TestInfluxOut(t *testing.T) { func TestInfluxOut(t *testing.T) {
tests := []struct { tests := []struct {

View File

@ -3,8 +3,8 @@ package kapacitor_test
import ( import (
"testing" "testing"
"github.com/influxdata/influxdb/chronograf/kapacitor" "github.com/influxdata/influxdb/v2/chronograf/kapacitor"
"github.com/influxdata/influxdb/chronograf/mocks" "github.com/influxdata/influxdb/v2/chronograf/mocks"
client "github.com/influxdata/kapacitor/client/v1" client "github.com/influxdata/kapacitor/client/v1"
) )

View File

@ -3,8 +3,8 @@ package kapacitor_test
import ( import (
"testing" "testing"
"github.com/influxdata/influxdb/chronograf/kapacitor" "github.com/influxdata/influxdb/v2/chronograf/kapacitor"
"github.com/influxdata/influxdb/chronograf/mocks" "github.com/influxdata/influxdb/v2/chronograf/mocks"
client "github.com/influxdata/kapacitor/client/v1" client "github.com/influxdata/kapacitor/client/v1"
) )

View File

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/kapacitor/pipeline" "github.com/influxdata/kapacitor/pipeline"
totick "github.com/influxdata/kapacitor/pipeline/tick" totick "github.com/influxdata/kapacitor/pipeline/tick"
) )

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
var _ chronograf.Ticker = &Alert{} var _ chronograf.Ticker = &Alert{}

View File

@ -5,7 +5,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/sergi/go-diff/diffmatchpatch" "github.com/sergi/go-diff/diffmatchpatch"
) )

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
const ( const (

View File

@ -3,7 +3,7 @@ package kapacitor
import ( import (
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestTrigger(t *testing.T) { func TestTrigger(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/kapacitor/pipeline" "github.com/influxdata/kapacitor/pipeline"
"github.com/influxdata/kapacitor/tick" "github.com/influxdata/kapacitor/tick"
"github.com/influxdata/kapacitor/tick/ast" "github.com/influxdata/kapacitor/tick/ast"

View File

@ -1,7 +1,7 @@
package kapacitor package kapacitor
import "testing" import "testing"
import "github.com/influxdata/influxdb/chronograf" import "github.com/influxdata/influxdb/v2/chronograf"
func TestValidateAlert(t *testing.T) { func TestValidateAlert(t *testing.T) {
tests := []struct { tests := []struct {

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
var ( var (

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestVarsCritStringEqual(t *testing.T) { func TestVarsCritStringEqual(t *testing.T) {

View File

@ -7,9 +7,9 @@ import (
"os" "os"
"time" "time"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt" "github.com/influxdata/influxdb/v2/chronograf/bolt"
"github.com/influxdata/influxdb/chronograf/mocks" "github.com/influxdata/influxdb/v2/chronograf/mocks"
) )
// TestNow is a set time for testing. // TestNow is a set time for testing.

View File

@ -4,8 +4,8 @@ import (
"context" "context"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure BuildStore struct implements chronograf.BuildStore interface // Ensure BuildStore struct implements chronograf.BuildStore interface

View File

@ -9,8 +9,8 @@ import (
"time" "time"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/id" "github.com/influxdata/influxdb/v2/chronograf/id"
) )
// Client is a client for the boltDB data store. // Client is a client for the boltDB data store.

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure ConfigStore implements chronograf.ConfigStore. // Ensure ConfigStore implements chronograf.ConfigStore.

View File

@ -5,7 +5,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestConfig_Get(t *testing.T) { func TestConfig_Get(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"strconv" "strconv"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure DashboardsStore implements chronograf.DashboardsStore. // Ensure DashboardsStore implements chronograf.DashboardsStore.

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/proto"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
//go:generate protoc --plugin ../../../scripts/protoc-gen-gogo --gogo_out=. internal.proto //go:generate protoc --plugin ../../../scripts/protoc-gen-gogo --gogo_out=. internal.proto

View File

@ -5,8 +5,8 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
func TestMarshalSource(t *testing.T) { func TestMarshalSource(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"context" "context"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure LayoutsStore implements chronograf.LayoutsStore. // Ensure LayoutsStore implements chronograf.LayoutsStore.

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure MappingsStore implements chronograf.MappingsStore. // Ensure MappingsStore implements chronograf.MappingsStore.

View File

@ -6,7 +6,7 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
var mappingCmpOptions = cmp.Options{ var mappingCmpOptions = cmp.Options{

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure OrganizationConfigStore implements chronograf.OrganizationConfigStore. // Ensure OrganizationConfigStore implements chronograf.OrganizationConfigStore.

View File

@ -5,7 +5,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
func TestOrganizationConfig_FindOrCreate(t *testing.T) { func TestOrganizationConfig_FindOrCreate(t *testing.T) {

View File

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
"github.com/influxdata/influxdb/chronograf/organizations" "github.com/influxdata/influxdb/v2/chronograf/organizations"
) )
// Ensure OrganizationsStore implements chronograf.OrganizationsStore. // Ensure OrganizationsStore implements chronograf.OrganizationsStore.

View File

@ -6,9 +6,9 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt" "github.com/influxdata/influxdb/v2/chronograf/bolt"
"github.com/influxdata/influxdb/chronograf/roles" "github.com/influxdata/influxdb/v2/chronograf/roles"
) )
var orgCmpOptions = cmp.Options{ var orgCmpOptions = cmp.Options{

View File

@ -4,8 +4,8 @@ import (
"context" "context"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure ServersStore implements chronograf.ServersStore. // Ensure ServersStore implements chronograf.ServersStore.

View File

@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
// Ensure an ServerStore can store, retrieve, update, and delete servers. // Ensure an ServerStore can store, retrieve, update, and delete servers.

View File

@ -5,9 +5,9 @@ import (
"math" "math"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
"github.com/influxdata/influxdb/chronograf/roles" "github.com/influxdata/influxdb/v2/chronograf/roles"
) )
// Ensure SourcesStore implements chronograf.SourcesStore. // Ensure SourcesStore implements chronograf.SourcesStore.

View File

@ -5,8 +5,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt" "github.com/influxdata/influxdb/v2/chronograf/bolt"
) )
// Ensure an SourceStore can store, retrieve, update, and delete sources. // Ensure an SourceStore can store, retrieve, update, and delete sources.

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
bolt "github.com/coreos/bbolt" bolt "github.com/coreos/bbolt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt/internal" "github.com/influxdata/influxdb/v2/chronograf/bolt/internal"
) )
// Ensure UsersStore implements chronograf.UsersStore. // Ensure UsersStore implements chronograf.UsersStore.

View File

@ -6,7 +6,7 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
// IgnoreFields is used because ID is created by BoltDB and cannot be predicted reliably // IgnoreFields is used because ID is created by BoltDB and cannot be predicted reliably

View File

@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
//go:generate env GO111MODULE=on go run github.com/kevinburke/go-bindata/go-bindata -o bin_gen.go -tags assets -ignore README|apps|.sh|go -pkg canned . //go:generate env GO111MODULE=on go run github.com/kevinburke/go-bindata/go-bindata -o bin_gen.go -tags assets -ignore README|apps|.sh|go -pkg canned .

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"strings" "strings"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
) )
type AddCommand struct { type AddCommand struct {

View File

@ -8,9 +8,9 @@ import (
"strings" "strings"
"text/tabwriter" "text/tabwriter"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/bolt" "github.com/influxdata/influxdb/v2/chronograf/bolt"
"github.com/influxdata/influxdb/chronograf/mocks" "github.com/influxdata/influxdb/v2/chronograf/mocks"
) )
func NewBoltClient(path string) (*bolt.Client, error) { func NewBoltClient(path string) (*bolt.Client, error) {

View File

@ -5,8 +5,8 @@ import (
"log" "log"
"os" "os"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/server" "github.com/influxdata/influxdb/v2/chronograf/server"
flags "github.com/jessevdk/go-flags" flags "github.com/jessevdk/go-flags"
) )

View File

@ -7,8 +7,8 @@ import (
"context" "context"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/influx" "github.com/influxdata/influxdb/v2/chronograf/influx"
) )
var _ chronograf.TimeSeries = &Client{} var _ chronograf.TimeSeries = &Client{}

View File

@ -7,9 +7,9 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/enterprise" "github.com/influxdata/influxdb/v2/chronograf/enterprise"
"github.com/influxdata/influxdb/chronograf/influx" "github.com/influxdata/influxdb/v2/chronograf/influx"
) )
func Test_Enterprise_FetchesDataNodes(t *testing.T) { func Test_Enterprise_FetchesDataNodes(t *testing.T) {

View File

@ -13,8 +13,8 @@ import (
"net/url" "net/url"
"time" "time"
"github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/chronograf/influx" "github.com/influxdata/influxdb/v2/chronograf/influx"
) )
// Shared transports for all clients to prevent leaking connections // Shared transports for all clients to prevent leaking connections

View File

@ -13,7 +13,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/influxdata/influxdb/chronograf/influx" "github.com/influxdata/influxdb/v2/chronograf/influx"
) )
func TestMetaClient_ShowCluster(t *testing.T) { func TestMetaClient_ShowCluster(t *testing.T) {

Some files were not shown because too many files have changed in this diff Show More