Create a ticket
Sign in Sign up
Locker support Locker support
Results

No results found.

Home Locker Secrets Manager Developer tools Secrets - SDK SDK Standard
Vietnamese English
SDK Standard
 

1. Package name

The package name of the SDK is locker

Example:

import locker
const locker = require('locker')

2. Entities name

The entity's names are singular nouns.

  • Secret
  • Environment
  • AccessKey
  • APIBase

3. Usages

3.1. Set locker config

Set base API, access key for the locker

Example:

import locker

locker.base_api = "https://secrets-core.locker.io"
locker.access_key = "your_access_key"

3.2. CRUD Methods

The CRUD methods of the object are:

- list() / list_environments()
- get() / get_environment()
- create() / create_environment()
- modify() / modify_environment()

3.3. CRUD Secret

The Secret items are identified by key name

# List secrets object
secrets = locker.list()

# Get secret value by key name
secret_value = locker.get("YOUR_API_KEY")


# Create new secret object
secret = locker.create(key="YOUR_NEW_SECRET_KEY", value="YOUR_NEW_SECRET_VALUE")

# Update secret object
secret = locker.modify(key="YOUR_NEW_SECRET_KEY", value="UPDATED_SECRET_VALUE")

3.4. CRUD Environment

The Environment items are identified by environment name

Was this page helpful?
No
Yes
Join Our Community