Documentation
¶
Index ¶
- Constants
- func New(options ...storage.Option) storage.Manager
- func Provider(options ...storage.Option) (storage.Manager, error)
- type CLI
- type CLIOption
- type Storager
- func (s *Storager) Close() error
- func (s *Storager) Create(ctx context.Context, resourceID string, mode os.FileMode, reader io.Reader, ...) error
- func (s *Storager) Delete(ctx context.Context, location string, options ...storage.Option) error
- func (s *Storager) Exists(ctx context.Context, resourceID string, options ...storage.Option) (bool, error)
- func (s *Storager) Get(ctx context.Context, location string, options ...storage.Option) (os.FileInfo, error)
- func (s *Storager) List(ctx context.Context, resourceID string, options ...storage.Option) ([]os.FileInfo, error)
- func (s *Storager) Open(ctx context.Context, resourceID string, options ...storage.Option) (io.ReadCloser, error)
- func (s *Storager) Upload(ctx context.Context, resourceID string, mode os.FileMode, reader io.Reader, ...) error
Constants ¶
View Source
const Scheme = "op"
Scheme represents 1Password secret references read via the op CLI.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIOption ¶
type CLIOption struct {
CLI CLI
}
CLIOption injects a 1Password CLI implementation (primarily for tests).
type Storager ¶
type Storager struct {
// contains filtered or unexported fields
}
Storager reads 1Password secrets for a vault base URL such as op://Private.
func NewStorager ¶
NewStorager creates a new 1Password storager.
func (*Storager) Create ¶
func (s *Storager) Create(ctx context.Context, resourceID string, mode os.FileMode, reader io.Reader, isDir bool, options ...storage.Option) error
Create is not supported.
func (*Storager) Exists ¶
func (s *Storager) Exists(ctx context.Context, resourceID string, options ...storage.Option) (bool, error)
Exists returns true when op read succeeds for the supplied reference.
func (*Storager) Get ¶
func (s *Storager) Get(ctx context.Context, location string, options ...storage.Option) (os.FileInfo, error)
Get returns file info for a readable secret reference.
func (*Storager) List ¶
func (s *Storager) List(ctx context.Context, resourceID string, options ...storage.Option) ([]os.FileInfo, error)
List returns file info for a readable secret reference.
Click to show internal directories.
Click to hide internal directories.