Learn R Programming

etseed (version 0.1.0)

users: etcd authentication - users

Description

etcd authentication - users

Arguments

user
(character) User name to create/delete
password
(character) Password to give the new user
roles
(list/character vector) Roles to give the new user
auth_user, auth_pwd
(character) Username and password for the authenticated user, the root user
...
Further args passed on to GET, PUT, or DELETE

Value

see return for each method

Methods

  • user_list: list users, a list of users
  • user_add: add a user, a list with slots user and roles
  • user_get: get a user by name, a list with slots user and roles (if any exist)
  • user_delete: delete a user by name, returns nothing on success

Examples

Run this code
## Not run: 
# # make a client
# cli <- etcd()
# 
# # Add user
# cli$user_add("jane", "janepwd", "root", "pickbetterpwd")
# 
# # List users
# cli$user_list()
# 
# # Get a single user
# cli$user_get("root")
# cli$user_get("jane")
# 
# # Delete user
# cli$user_delete("jane", "root", "pickbetterpwd")
# ## End(Not run)

Run the code above in your browser using DataLab