onepassword

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSignedIn = errors.New("you're not signed into your 1password account")

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(l log.Logger, cfg Config, client *OnePassword) *Command

func (*Command) Complete

func (c *Command) Complete(ctx context.Context, r *readline.Readline, d prompt.Document) []prompt.Suggest

func (*Command) Description

func (c *Command) Description() string

func (*Command) Execute

func (c *Command) Execute(ctx context.Context, r *readline.Readline) error

func (*Command) Help

func (c *Command) Help() string

func (*Command) Name

func (c *Command) Name() string

type Config

type Config struct {
	Account       string `json:"account" yaml:"account"`
	TokenFilename string `json:"tokenFilename" yaml:"tokenFilename"`
}

type OnePassword

type OnePassword struct {
	// contains filtered or unexported fields
}

func New

func New(l log.Logger, cache cache.Cache, opts ...Option) (*OnePassword, error)

func (*OnePassword) Get

func (op *OnePassword) Get(ctx context.Context, account, vaultUUID, itemUUID, field string) (string, error)

func (*OnePassword) GetOnetimePassword

func (op *OnePassword) GetOnetimePassword(ctx context.Context, account, uuid string) (string, error)

func (*OnePassword) Render

func (op *OnePassword) Render(ctx context.Context, source string) ([]byte, error)

func (*OnePassword) RenderFile

func (op *OnePassword) RenderFile(ctx context.Context, source string) ([]byte, error)

func (*OnePassword) RenderFileTo

func (op *OnePassword) RenderFileTo(ctx context.Context, source, target string) error

func (*OnePassword) Session

func (op *OnePassword) Session(account string) (bool, error)

func (*OnePassword) SignIn

func (op *OnePassword) SignIn(ctx context.Context, account string) error

type Option

type Option func(*OnePassword) error

func WithTokenFilename

func WithTokenFilename(v string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL