freenas

package
v0.0.0-...-1867f9a Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package freenas installs certificates on a FreeNAS 11 server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Installer

type Installer struct {
	// Username contains the username to authenticate with. This is usually `root`.
	Username string

	// Password contains the password to authenticate with.
	Password string

	// Base contains the root of your FreeNAS installation web UI, not including /api/. For example, http://freenas.local
	Base string

	// Client is the http.Client to use for making requests.
	Client http.Client
}

func (*Installer) GetCertificate

func (i *Installer) GetCertificate(ctx context.Context) (*x509.Certificate, error)

GetCertificate retrieves the currently installed certificate from FreeNAS.

func (*Installer) SetCertificate

func (i *Installer) SetCertificate(ctx context.Context, caBundle []*x509.Certificate, cert *x509.Certificate, privKey crypto.PrivateKey) error

SetCertificate applies the provided certificate, private key, and certificate authority bundle to FreeNAS.

Jump to

Keyboard shortcuts

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