client

package
v0.0.0-...-d0ade2f Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 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 Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the client api.

func NewClient

func NewClient(ctx context.Context, target string, opts ...grpc.DialOption) (*Client, error)

NewClient starts the client.

func (*Client) Close

func (c *Client) Close() error

Close closes the client's grpc connection and cancels any active requests.

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context, identity specters.Identity) (token string, err error)

GetToken gets a token for use with the rest of the API.

func (*Client) Init

func (c *Client) Init(ctx context.Context, pk []byte) (*pb.InitReply, error)

Init creates the master key to unseal Specters

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*pb.StatusReply, error)

Status gets the status of API server

func (*Client) Unseal

func (c *Client) Unseal(ctx context.Context, key []byte) (*pb.UnsealReply, error)

Unseal set a key to unsealing the master key

Jump to

Keyboard shortcuts

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