onepassword

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: ISC Imports: 10 Imported by: 0

Documentation

Overview

Package onepassword provides functions to utilize the 1password cli tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() (string, error)

GetVersion returns the installed 1password cli version.

Types

type Client

type Client struct {
	Account string
	Vault   string
	// contains filtered or unexported fields
}

Client defines a 1password client.

func (*Client) DeleteCredentials

func (c *Client) DeleteCredentials(_, host string, archive bool) error

DeleteCredentials deletes credentials from 1password.

func (*Client) GetCredentials

func (c *Client) GetCredentials(host, path string) (*Credentials, error)

GetCredentials loads credentials from 1password.

func (*Client) Login

func (c *Client) Login(timeout uint) error

Login to 1password.

func (*Client) StoreCredentials

func (c *Client) StoreCredentials(protocol, host, path, username, password string) error

StoreCredentials saves new credentials to 1password.

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Credentials defines git credentials.

Jump to

Keyboard shortcuts

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