Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVEREST-107 | WIP #896

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

EVEREST-107 | WIP #896

wants to merge 2 commits into from

Conversation

mayankshah1607
Copy link
Member

No description provided.


import (
"net/http"
"reflect"

"github.com/AlekSi/pointer"
"github.com/labstack/echo/v4"
. "github.com/percona/everest/api"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/percona/everest) (gci)


import (
. "github.com/percona/everest/api"
"net/http"
"slices"
"strings"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not gofumpt-ed (gofumpt)

@@ -26,6 +26,7 @@ import (
"github.com/cenkalti/backoff/v4"
goversion "github.com/hashicorp/go-version"
"github.com/labstack/echo/v4"
. "github.com/percona/everest/api"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not goimports-ed with -local github.com/percona/everest (goimports)

@@ -14,7 +14,7 @@
// limitations under the License.

// Package api ...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package-comments: package comment should be of the form "Package server ..." (revive)

@@ -14,7 +14,7 @@
// limitations under the License.

// Package api ...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package-comments: package comment should be of the form "Package server ..." (revive)

@@ -28,6 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

everestv1alpha1 "github.com/percona/everest-operator/api/v1alpha1"
. "github.com/percona/everest/api"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
dot-imports: should not use dot imports (revive)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not goimports-ed with -local github.com/percona/everest (goimports)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not goimports-ed with -local github.com/percona/everest (goimports)

"errors"
"fmt"

"github.com/casbin/casbin/v2"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/percona/everest) (gci)

"github.com/percona/everest/api"
"github.com/percona/everest/internal/server/handlers"
"github.com/percona/everest/pkg/kubernetes"
"go.uber.org/zap"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/percona/everest) (gci)

@@ -0,0 +1,82 @@
package handlers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package-comments: should have a package comment (revive)

@@ -0,0 +1,27 @@
package rbac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package-comments: should have a package comment (revive)

"github.com/percona/everest/api"
)

func (h *rbacHandler) ListDatabaseEngines(ctx context.Context, user, namespace string) (*api.DatabaseEngineList, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)

}

func (h *rbacHandler) ListDatabaseClusters(ctx context.Context, user, namespace string) (*api.DatabaseClusterList, error) {
return nil, nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
return both the nil error and invalid value: use a sentinel error instead (nilnil)

}

func (h *rbacHandler) GetDatabaseCluster(ctx context.Context, user, namespace, name string) (*api.DatabaseCluster, error) {
return nil, nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
return both the nil error and invalid value: use a sentinel error instead (nilnil)

@@ -0,0 +1,39 @@
package rbac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
ST1000: at least one file in a package should have a package comment (stylecheck)

@@ -0,0 +1,23 @@
package rbac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
ST1000: at least one file in a package should have a package comment (stylecheck)

@@ -0,0 +1,27 @@
package rbac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
ST1000: at least one file in a package should have a package comment (stylecheck)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant