Showing 17 of 17 total issues
Function main
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
logFormat := os.Getenv("LOG_FORMAT")
switch logFormat {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
Method Wrapper.StoreSecret
has 5 return statements (exceeds 4 allowed). Open
Open
func (w Wrapper) StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error) {
if request.Body.Secret == "" {
return StoreSecret400JSONResponse(ErrorResponse{
Backend: backend,
Detail: "Secret is required",
Method KVStorage.getValue
has 5 return statements (exceeds 4 allowed). Open
Open
func (v KVStorage) getValue(path, key string) ([]byte, error) {
result, err := v.client.Read(path)
if err != nil {
return nil, fmt.Errorf("unable to read key from vault: %w", err)
}
exported method Wrapper.DeleteSecret should have comment or be unexported Open
Open
func (w Wrapper) DeleteSecret(ctx context.Context, request DeleteSecretRequestObject) (DeleteSecretResponseObject, error) {
- Exclude checks
exported method Wrapper.ListKeys should have comment or be unexported Open
Open
func (w Wrapper) ListKeys(ctx context.Context, request ListKeysRequestObject) (ListKeysResponseObject, error) {
- Exclude checks
exported method KVStorage.GetSecret should have comment or be unexported Open
Open
func (v KVStorage) GetSecret(key string) ([]byte, error) {
- Exclude checks
exported method Wrapper.LookupSecret should have comment or be unexported Open
Open
func (w Wrapper) LookupSecret(ctx context.Context, request LookupSecretRequestObject) (LookupSecretResponseObject, error) {
- Exclude checks
exported var ErrKeyAlreadyExists should have comment or be unexported Open
Open
var ErrKeyAlreadyExists = errors.New("key already exists")
- Exclude checks
exported type Wrapper should have comment or be unexported Open
Open
type Wrapper struct {
- Exclude checks
exported type KVStorage should have comment or be unexported Open
Open
type KVStorage struct {
- Exclude checks
exported method Wrapper.StoreSecret should have comment or be unexported Open
Open
func (w Wrapper) StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error) {
- Exclude checks
2: cannot find package "github.com/nuts-foundation/hashicorp-vault-proxy/vault" in any of: Open
Open
"github.com/nuts-foundation/hashicorp-vault-proxy/vault"
- Exclude checks
exported method KVStorage.Ping should have comment or be unexported Open
Open
func (v KVStorage) Ping() error {
- Exclude checks
exported method Wrapper.HealthCheck should have comment or be unexported Open
Open
func (w Wrapper) HealthCheck(ctx context.Context, _ HealthCheckRequestObject) (HealthCheckResponseObject, error) {
- Exclude checks
exported method KVStorage.DeleteSecret should have comment or be unexported Open
Open
func (v KVStorage) DeleteSecret(key string) error {
- Exclude checks
exported function NewWrapper should have comment or be unexported Open
Open
func NewWrapper(vault vault.Storage) Wrapper {
- Exclude checks
exported method KVStorage.StoreSecret should have comment or be unexported Open
Open
func (v KVStorage) StoreSecret(key string, value []byte) error {
- Exclude checks