# Passkey
Go based client for retrieving secrets from password safe

## Usage
You can initialize a passkey client manually using one of the following methods:

```go
// New initializes a new Passkey object using the given username and password
func New(user string, passwd string, staging bool) (*Client, error)

// NewFromFile initializes the passwordsafe client by using the credentials
// json file at the location passed. If no location is given it will default 
// to: "/srv/config/credentials.json"
func NewFromFile(user string, file string, staging bool) (*Client, error)

// NewFromEnvironment : Initializes a new client using the 'user' and 'pass'
// environment variables
func NewFromEnvironment(staging bool) (*Client, error)
```

Or you can have it try the above methods on its own:
```go
// APIInit : Will try to initialize the client using environment variables,
// docker secret, and plain credentials.json file in that order
func APIInit(staging bool) (*Client, error)
```

Access credentials in your code
```
t, err := torq.NewClient(pk.Service.SSO.Credential.Username, pk.Service.SSO.Credential.Password)
```
