Skip to content

andymeierdev/onepassword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codefresh build status Go Report Card

1Password Client

Thin wrapper around the 1Password CLI for use in Golang.

This is a stub and should not be used in production.

Hopefully 1Password creates their own client library. See discussion.

Usage

First install the 1Password CLI.

Import the package, create a client, and retrieve an item.

import (
    "os"

    op "github.com/ameier38/onepassword"
)

func main() {
    password := os.GetEnv("OP_PASSWORD")
    secretKey := os.GetEnv("OP_SECRET_KEY")
    client := op.NewClient("op", "subdomain", "test@subdomain.com", password, secretKey)
    item := client.GetItem(VaultName("test-vault"), ItemName("test-item"))
}

Resources

About

Thin wrapper around the 1Password CLI for use in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages