-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstore.go
More file actions
25 lines (20 loc) · 778 Bytes
/
store.go
File metadata and controls
25 lines (20 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package store
import (
"errors"
"github.com/DevLabFoundry/configmanager/v2/internal/config"
)
const implementationNetworkErr string = "implementation %s error: %v for token: %s"
var (
ErrRetrieveFailed = errors.New("failed to retrieve config item")
ErrClientInitialization = errors.New("failed to initialize the client")
ErrEmptyResponse = errors.New("value retrieved but empty for token")
ErrServiceCallFailed = errors.New("failed to complete the service call")
)
// Strategy iface that all store implementations
// must conform to, in order to be be used by the retrieval implementation
//
// Defined on the package for easier re-use across the program
type Strategy interface {
Token() (s string, e error)
SetToken(s *config.ParsedTokenConfig)
}