certificates

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCertificates

type TestCertificates struct {
	CACertificate       string
	InstanceCertificate string
	InstanceKey         string

	PathToCACertificate       string
	PathToInstanceCertificate string
	PathToInstanceKey         string
	// contains filtered or unexported fields
}

func Generate

func Generate(instanceID, orgID, spaceID, appID, ipAddress string) (*TestCertificates, error)

Generate is a convenience method for testing. It creates a group of test certificates with the client certificate reflecting the given values. Close() should be called when done to immediately delete the three temporary files it has created.

Usage:

testCerts, err := certificates.Generate(...)

if err != nil {
		...
}
defer func(){
		if err := testCerts.Close(); err != nil {
			...
		}
}()

func (*TestCertificates) Close

func (e *TestCertificates) Close() error

Jump to

Keyboard shortcuts

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