Documentation ¶
Index ¶
- func GenerateKeyPair() (privateKey []byte, publicKey []byte, err error)
- func GenerateKeyPairUsingSeed(seed string) (privateKey []byte, publicKey []byte, err error)
- func GetPublicKey(privateKey []byte) []byte
- type PkidClient
- func (pc *PkidClient) Delete(project string, key string) error
- func (pc *PkidClient) DeleteProject(project string) error
- func (pc *PkidClient) Get(project string, key string) (string, error)
- func (pc *PkidClient) List(project string) ([]string, error)
- func (pc *PkidClient) Set(project string, key string, value string, willEncrypt bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
GenerateKeyPair generates a private key and public key for the client
func GenerateKeyPairUsingSeed ¶
GenerateKeyPairUsingSeed generates a private key and public key for the client using TF login seed
func GetPublicKey ¶
GetPublicKey gets a public key from private key for the client
Types ¶
type PkidClient ¶
type PkidClient struct {
// contains filtered or unexported fields
}
PkidClient a struct for client requirements
func NewPkidClient ¶
func NewPkidClient(privateKey []byte, publicKey []byte, url string, timeout time.Duration) PkidClient
NewPkidClient creates a new instance from the pkid client
func NewPkidClientWithHTTPClient ¶
func NewPkidClientWithHTTPClient(privateKey []byte, publicKey []byte, url string, client *http.Client) PkidClient
NewPkidClientWithHTTPClient for testing with given client
func (*PkidClient) Delete ¶
func (pc *PkidClient) Delete(project string, key string) error
Delete deletes a key with its value inside a project
func (*PkidClient) DeleteProject ¶
func (pc *PkidClient) DeleteProject(project string) error
DeleteProject deletes a key with its value inside a project
func (*PkidClient) Get ¶
func (pc *PkidClient) Get(project string, key string) (string, error)
Get gets a value for a key inside a project
Click to show internal directories.
Click to hide internal directories.