-
Notifications
You must be signed in to change notification settings - Fork 53
/
types.go
36 lines (30 loc) · 947 Bytes
/
types.go
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
26
27
28
29
30
31
32
33
34
35
36
package bootstrap
import (
"context"
"errors"
"github.com/rancher/opni/pkg/ident"
"github.com/rancher/opni/pkg/keyring"
"github.com/rancher/opni/pkg/storage"
)
type Bootstrapper interface {
Bootstrap(context.Context, ident.Provider) (keyring.Keyring, error)
}
type Storage interface {
storage.TokenStore
storage.ClusterStore
storage.KeyringStoreBroker
}
type StorageConfig struct {
storage.TokenStore
storage.ClusterStore
storage.KeyringStoreBroker
}
var (
ErrInvalidEndpoint = errors.New("invalid endpoint")
ErrNoRootCA = errors.New("no root CA found in peer certificates")
ErrLeafNotSigned = errors.New("leaf certificate not signed by the root CA")
ErrKeyExpired = errors.New("key expired")
ErrRootCAHashMismatch = errors.New("root CA hash mismatch")
ErrNoValidSignature = errors.New("no valid signature found in response")
ErrNoToken = errors.New("no bootstrap token provided")
)