mirror of
https://github.com/kopia/kopia.git
synced 2026-05-16 18:54:38 -04:00
* 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
27 lines
585 B
Go
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
|
|
}
|