gnoi

package
v0.0.0-...-ad9c0bf Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetCertificatesTests = []struct {
	Desc        string
	ExpCertID   string
	ExpCertPath string
}{{
	Desc:        "get certificates",
	ExpCertID:   "c5e5a1cb-8e1f-43c1-be4a-ab8e513fc667",
	ExpCertPath: "certs/target.crt",
}}
View Source
var RebootTests = []struct {
	Desc    string
	Message string
}{{
	Desc:    "reboot system",
	Message: "Testing OVS Reboot Functionality",
}}
View Source
var RotateCertificatesTests = []struct {
	Desc   string
	CertID string
}{{
	Desc:   "rotate certificates",
	CertID: "d7f58600-4b8e-4260-be3d-ff1641e1c8e9",
}}

Functions

func PEMtox509

func PEMtox509(bytes []byte) (*x509.Certificate, error)

PEMtox509 decodes a PEM block into a x509.Certificate.

Types

type Client

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

func NewClient

func NewClient(targetAddress, targetName, encodingName string, caEntity *entity.Entity) *Client

NewClient returns an instance of Client struct.

func (*Client) GetCertificates

func (c *Client) GetCertificates(ctx context.Context) (map[string]*x509.Certificate, error)

GetCertificates gets a map of certificates in the target, certID to certificate

func (*Client) Reboot

func (c *Client) Reboot(ctx context.Context, rebootMessage string) (*pbs.RebootResponse, error)

func (*Client) RotateCertificates

func (c *Client) RotateCertificates(ctx context.Context, certID string) error

RotateCertificates rotates a certificate.

Jump to

Keyboard shortcuts

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