kmsdb

package module
v0.0.0-...-98dbf22 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	// get user name and password by role name
	// argument one: user name
	// argument two: password
	Get(roleName string) (string, string, error)
}

func NewClient

func NewClient(operatorAddr, vaultAddr string) Database

NewClient create new client by address argument vaultAddr should be remote vault server addr which looks like "127.0.0.1:8200" operatorAddr should be remote operator server addr which looks like "127.0.0.1:8080"

type DbRsp

type DbRsp struct {
	Auth interface{} `json:"auth"`
	Data struct {
		Password string `json:"password"`
		Username string `json:"username"`
	} `json:"data"`
	LeaseDuration int64       `json:"lease_duration"`
	LeaseID       string      `json:"lease_id"`
	Renewable     bool        `json:"renewable"`
	RequestID     string      `json:"request_id"`
	Warnings      interface{} `json:"warnings"`
	WrapInfo      interface{} `json:"wrap_info"`
}

type ErrRsp

type ErrRsp struct {
	Errors []string `json:"errors"`
}

func (ErrRsp) Error

func (e ErrRsp) Error() string

Jump to

Keyboard shortcuts

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