Files
kopia/internal/passwordpersist/passwordpersist_none.go
Jarek Kowalski cbc66f936d chore(ci): upgraded linter to 1.53.3 (#3079)
* chore(ci): upgraded linter to 1.53.3

This flagged a bunch of unused parameters, so the PR is larger than
usual, but 99% mechanical.

* separate lint CI task

* run Lint in separate CI
2023-06-18 13:26:01 -07:00

27 lines
585 B
Go

package passwordpersist
import "context"
// None is a strategy that does not persist the password at all.
func None() Strategy {
return noneStrategy{}
}
type noneStrategy struct{}
//nolint:revive
func (noneStrategy) GetPassword(ctx context.Context, configFile string) (string, error) {
return "", ErrPasswordNotFound
}
//nolint:revive
func (noneStrategy) PersistPassword(ctx context.Context, configFile, password string) error {
// silently succeed
return nil
}
//nolint:revive
func (noneStrategy) DeletePassword(ctx context.Context, configFile string) error {
return nil
}