Documentation
¶
Index ¶
- Constants
- Variables
- func NormalizeName(value string) (string, error)
- func NormalizeScope(value string) (string, error)
- func Resolve(ctx context.Context, name string) (string, error)
- func WithResolver(ctx context.Context, resolver Resolver, scope string) (context.Context, error)
- type EnvironmentResolver
- type FileStore
- func (s *FileStore) DeleteCredential(_ context.Context, scope, name string) error
- func (s *FileStore) ListCredentials(_ context.Context, scope string) ([]Metadata, error)
- func (s *FileStore) PutCredential(ctx context.Context, scope, name, value string) (Metadata, error)
- func (s *FileStore) PutCredentials(_ context.Context, scope string, values map[string]string) ([]Metadata, error)
- func (s *FileStore) ResolveCredential(_ context.Context, scope, name string) (string, error)
- type MemoryStore
- func (s *MemoryStore) DeleteCredential(_ context.Context, scope, name string) error
- func (s *MemoryStore) ListCredentials(_ context.Context, scope string) ([]Metadata, error)
- func (s *MemoryStore) PutCredential(ctx context.Context, scope, name, value string) (Metadata, error)
- func (s *MemoryStore) PutCredentials(_ context.Context, scope string, values map[string]string) ([]Metadata, error)
- func (s *MemoryStore) ResolveCredential(_ context.Context, scope, name string) (string, error)
- type Metadata
- type Resolver
- type Store
Constants ¶
View Source
const ( MaxBatchSize = 64 MaxValueBytes = 64 << 10 )
Variables ¶
View Source
var ErrNotFound = errors.New("credential not found")
Functions ¶
func NormalizeName ¶
func NormalizeScope ¶
Types ¶
type EnvironmentResolver ¶
type EnvironmentResolver struct{}
func (EnvironmentResolver) ResolveCredential ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func OpenFileStore ¶
func (*FileStore) DeleteCredential ¶
func (*FileStore) ListCredentials ¶
func (*FileStore) PutCredential ¶
func (*FileStore) PutCredentials ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) DeleteCredential ¶
func (s *MemoryStore) DeleteCredential(_ context.Context, scope, name string) error
func (*MemoryStore) ListCredentials ¶
func (*MemoryStore) PutCredential ¶
func (*MemoryStore) PutCredentials ¶
func (*MemoryStore) ResolveCredential ¶
type Store ¶
type Store interface {
Resolver
PutCredential(ctx context.Context, scope, name, value string) (Metadata, error)
PutCredentials(ctx context.Context, scope string, values map[string]string) ([]Metadata, error)
DeleteCredential(ctx context.Context, scope, name string) error
ListCredentials(ctx context.Context, scope string) ([]Metadata, error)
}
Click to show internal directories.
Click to hide internal directories.