Skip to content

Commit 70df5ca

Browse files
committed
secretsource: move all external developers relevant parts in one file
1 parent 3557d41 commit 70df5ca

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

secretsource/extension.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ import (
1414
// the secret.
1515
type Constructor func(Params) (Source, error)
1616

17+
// Source is the interface a secret source needs to implement
18+
type Source interface {
19+
// Human readable description to be printed on the cli
20+
Description() string
21+
// Get retrives the value for a given key and returns it.
22+
// Logging the value before it is returned is going to lead to it being leaked.
23+
// The error might lead to an exception visible to users.
24+
Get(key string) (value string, err error)
25+
}
26+
1727
// Params contains all possible constructor parameters an output may need.
1828
type Params struct {
1929
ConfigArgument string // the string on the cli

secretsource/interface.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)