Skip to content

Commit

Permalink
change package name to make linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Silvio Moioli <[email protected]>
  • Loading branch information
moio committed May 31, 2024
1 parent c52da27 commit f7d3fd8
Show file tree
Hide file tree
Showing 22 changed files with 48 additions and 45 deletions.
14 changes: 7 additions & 7 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/rancher/steve/pkg/server/handler"
"github.com/rancher/steve/pkg/server/router"
metricsStore "github.com/rancher/steve/pkg/stores/metrics"
"github.com/rancher/steve/pkg/stores/partition_alpha"
"github.com/rancher/steve/pkg/stores/proxy_alpha"
"github.com/rancher/steve/pkg/stores/partitionalpha"
"github.com/rancher/steve/pkg/stores/proxyalpha"
"github.com/rancher/steve/pkg/summarycache"
"k8s.io/client-go/rest"
)
Expand Down Expand Up @@ -250,15 +250,15 @@ func setupAlpha(ctx context.Context, server *Server) error {
return err
}

s, err := proxy_alpha.NewProxyStore(cols, cf, summaryCache, nil)
s, err := proxyalpha.NewProxyStore(cols, cf, summaryCache, nil)
if err != nil {
panic(err)
}

errStore := proxy_alpha.NewErrorStore(
proxy_alpha.NewUnformatterStore(
proxy_alpha.NewWatchRefresh(
partition_alpha.NewStore(
errStore := proxyalpha.NewErrorStore(
proxyalpha.NewUnformatterStore(
proxyalpha.NewWatchRefresh(
partitionalpha.NewStore(
s,
asl,
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package listprocessor_alpha contains methods for filtering, sorting, and paginating lists of objects.
package listprocessor_alpha
package listprocessor

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package listprocessor_alpha
package listprocessor

import (
"context"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package partition_alpha
package partitionalpha

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package partition_alpha
package partitionalpha

import (
"github.com/golang/mock/gomock"
"testing"

"github.com/golang/mock/gomock"

"github.com/rancher/apiserver/pkg/types"
"github.com/rancher/lasso/pkg/cache/sql/partition"
"github.com/rancher/steve/pkg/accesscontrol"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package partition_alpha implements a store with parallel partitioning of data
// so that segmented data can be concurrently collected and returned as a single data set.
package partition_alpha
package partitionalpha

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package partition_alpha
package partitionalpha

import (
"context"
"crypto/sha256"
"encoding/base64"
"fmt"
"github.com/golang/mock/gomock"
"github.com/rancher/wrangler/v2/pkg/schemas"
"github.com/stretchr/testify/assert"
"net/http"
"net/url"
"strconv"
"testing"

"github.com/golang/mock/gomock"
"github.com/rancher/wrangler/v2/pkg/schemas"
"github.com/stretchr/testify/assert"

"github.com/rancher/apiserver/pkg/types"
"github.com/rancher/lasso/pkg/cache/sql/partition"
"github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/steve/pkg/stores/proxy_alpha"
"github.com/rancher/steve/pkg/stores/proxyalpha"
"github.com/rancher/wrangler/v2/pkg/generic"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -136,7 +137,7 @@ func TestList(t *testing.T) {
}

type mockPartitioner struct {
store proxy_alpha.Store
store proxyalpha.Store
partitions map[string][]partition.Partition
}

Expand All @@ -149,7 +150,7 @@ func (m mockPartitioner) All(apiOp *types.APIRequest, schema *types.APISchema, v
return m.partitions[user.GetName()], nil
}

func (m mockPartitioner) Store() proxy_alpha.Store {
func (m mockPartitioner) Store() proxyalpha.Store {
return m.store
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy_alpha
package proxyalpha

import (
"github.com/rancher/apiserver/pkg/apierror"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package proxy implements the proxy store, which is responsible for interfacing directly with Kubernetes.
package proxy_alpha
package proxyalpha

import (
"context"
Expand All @@ -22,8 +22,8 @@ import (
"github.com/rancher/steve/pkg/attributes"
"github.com/rancher/steve/pkg/resources/common"
metricsStore "github.com/rancher/steve/pkg/stores/metrics"
"github.com/rancher/steve/pkg/stores/partition_alpha/listprocessor_alpha"
"github.com/rancher/steve/pkg/stores/proxy_alpha/tablelistconvert"
"github.com/rancher/steve/pkg/stores/partitionalpha/listprocessor"
"github.com/rancher/steve/pkg/stores/proxyalpha/tablelistconvert"
"github.com/rancher/wrangler/v2/pkg/data"
"github.com/rancher/wrangler/v2/pkg/schemas"
"github.com/rancher/wrangler/v2/pkg/schemas/validation"
Expand Down Expand Up @@ -600,7 +600,7 @@ func (s *Store) Delete(apiOp *types.APIRequest, schema *types.APISchema, id stri

// ListByPartitions returns an unstructured list of resources belonging to any of the specified partitions
func (s *Store) ListByPartitions(apiOp *types.APIRequest, schema *types.APISchema, partitions []partition.Partition) ([]unstructured.Unstructured, string, error) {
opts, err := listprocessor_alpha.ParseQuery(apiOp, s.namespaceCache)
opts, err := listprocessor.ParseQuery(apiOp, s.namespaceCache)
if err != nil {
return nil, "", err
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
package proxy_alpha
package proxyalpha

import (
"context"
"fmt"
"net/http"
"net/url"
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/rancher/lasso/pkg/cache/sql/informer"
"github.com/rancher/lasso/pkg/cache/sql/informer/factory"
"github.com/rancher/lasso/pkg/cache/sql/partition"
"github.com/rancher/steve/pkg/attributes"
"github.com/rancher/steve/pkg/resources/common"
"github.com/rancher/steve/pkg/stores/partition_alpha/listprocessor_alpha"
"github.com/rancher/steve/pkg/stores/proxy_alpha/tablelistconvert"
"github.com/rancher/steve/pkg/stores/partitionalpha/listprocessor"
"github.com/rancher/steve/pkg/stores/proxyalpha/tablelistconvert"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"net/http"
"net/url"
"testing"
"time"

"github.com/pkg/errors"
"github.com/rancher/apiserver/pkg/types"
Expand Down Expand Up @@ -224,7 +225,7 @@ func TestListByPartitions(t *testing.T) {
// ListByPartitions copies point so we need some original record of items to ensure as asserting listToReturn's
// items is equal to the list returned by ListByParititons doesn't ensure no mutation happened
copy(listToReturn.Items, expectedItems)
opts, err := listprocessor_alpha.ParseQuery(req, nil)
opts, err := listprocessor.ParseQuery(req, nil)
assert.Nil(t, err)
cg.EXPECT().TableAdminClient(req, schema, "", &WarningBuffer{}).Return(ri, nil)
// This tests that fields are being extracted from schema columns and the type specific fields map
Expand Down Expand Up @@ -292,7 +293,7 @@ func TestListByPartitions(t *testing.T) {
copy(listToReturn.Items, expectedItems)

nsi.EXPECT().ListByOptions(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, "", fmt.Errorf("error")).Times(2)
_, err := listprocessor_alpha.ParseQuery(req, nsi)
_, err := listprocessor.ParseQuery(req, nsi)
assert.NotNil(t, err)

_, _, err = s.ListByPartitions(req, schema, partitions)
Expand Down Expand Up @@ -354,7 +355,7 @@ func TestListByPartitions(t *testing.T) {
// ListByPartitions copies point so we need some original record of items to ensure as asserting listToReturn's
// items is equal to the list returned by ListByParititons doesn't ensure no mutation happened
copy(listToReturn.Items, expectedItems)
_, err := listprocessor_alpha.ParseQuery(req, nil)
_, err := listprocessor.ParseQuery(req, nil)
assert.Nil(t, err)
cg.EXPECT().TableAdminClient(req, schema, "", &WarningBuffer{}).Return(nil, fmt.Errorf("error"))

Expand Down Expand Up @@ -417,7 +418,7 @@ func TestListByPartitions(t *testing.T) {
// ListByPartitions copies point so we need some original record of items to ensure as asserting listToReturn's
// items is equal to the list returned by ListByParititons doesn't ensure no mutation happened
copy(listToReturn.Items, expectedItems)
_, err := listprocessor_alpha.ParseQuery(req, nil)
_, err := listprocessor.ParseQuery(req, nil)
assert.Nil(t, err)
cg.EXPECT().TableAdminClient(req, schema, "", &WarningBuffer{}).Return(ri, nil)
// This tests that fields are being extracted from schema columns and the type specific fields map
Expand Down Expand Up @@ -489,7 +490,7 @@ func TestListByPartitions(t *testing.T) {
// ListByPartitions copies point so we need some original record of items to ensure as asserting listToReturn's
// items is equal to the list returned by ListByParititons doesn't ensure no mutation happened
copy(listToReturn.Items, expectedItems)
opts, err := listprocessor_alpha.ParseQuery(req, nil)
opts, err := listprocessor.ParseQuery(req, nil)
assert.Nil(t, err)
cg.EXPECT().TableAdminClient(req, schema, "", &WarningBuffer{}).Return(ri, nil)
// This tests that fields are being extracted from schema columns and the type specific fields map
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy_alpha
package proxyalpha

import (
"github.com/rancher/apiserver/pkg/types"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy_alpha
package proxyalpha

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy_alpha
package proxyalpha

import (
"context"
Expand Down

0 comments on commit f7d3fd8

Please sign in to comment.