client

package
v0.0.0-...-a91455d Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIdentity

func NewIdentity(client *Client, name string, cred *credential.Credential) credential.Identity

NewIdentity is the constructor for identity

func NormalizeURL

func NormalizeURL(addr string) (*url.URL, error)

NormalizeURL normalizes a URL (from cfssl)

Types

type Client

type Client struct {
	// The client's home directory
	HomeDir string
	// The client's configuration
	Config *config.ClientConfig
	// contains filtered or unexported fields
}

Client is the rksync-ca client object

func (*Client) Enroll

func (c *Client) Enroll(req *api.EnrollmentRequest, saveOnDisk bool) (*api.EnrollmentResponse, error)

Enroll enrolls a new identity

func (*Client) GenCSR

func (c *Client) GenCSR(req *api.CSRInfo, id string) ([]byte, cccsp.Key, error)

GenCSR generates a CSR (Certificate Signing Request)

func (*Client) GetCSP

func (c *Client) GetCSP() cccsp.CCCSP

GetCSP returns BCCSP instance associated with this client

func (*Client) Init

func (c *Client) Init() error

Init initialize the client

func (*Client) NewX509Identity

func (c *Client) NewX509Identity(name string, cred *credential.Credential) credential.Identity

NewX509Identity creates a new identity

func (*Client) Register

func (c *Client) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error)

Register registers a new identity

func (*Client) SendReq

func (c *Client) SendReq(req *http.Request, result interface{}) (err error)

SendReq sends a request to the rksync-ca server and fills in the result

Jump to

Keyboard shortcuts

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