client

package
v0.0.0-...-0b87ad2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair() (privateKey []byte, publicKey []byte, err error)

GenerateKeyPair generates a private key and public key for the client

func GenerateKeyPairUsingSeed

func GenerateKeyPairUsingSeed(seed string) (privateKey []byte, publicKey []byte, err error)

GenerateKeyPairUsingSeed generates a private key and public key for the client using TF login seed

func GetPublicKey

func GetPublicKey(privateKey []byte) []byte

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

func (*PkidClient) List

func (pc *PkidClient) List(project string) ([]string, error)

List lists all keys for a project

func (*PkidClient) Set

func (pc *PkidClient) Set(project string, key string, value string, willEncrypt bool) (err error)

Set sets a new value for a key inside a project

Jump to

Keyboard shortcuts

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