connectorservice

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIUrls

type APIUrls struct {
	InfoURL         string `json:"infoUrl"`
	CertificatesURL string `json:"certificatesUrl"`
}

type CertificateCredentials

type CertificateCredentials struct {
	ClientKey  *rsa.PrivateKey
	ClientCert *x509.Certificate
	CACerts    []*x509.Certificate
}

type CertificateInfo

type CertificateInfo struct {
	Subject      string `json:"subject"`
	Extensions   string `json:"extensions"`
	KeyAlgorithm string `json:"key-algorithm"`
}

type CertificateRequest

type CertificateRequest struct {
	CSR string `json:"csr"`
}

type CertificatesResponse

type CertificatesResponse struct {
	CRTChain  string `json:"crt"`
	ClientCRT string `json:"clientCrt"`
	CaCRT     string `json:"caCrt"`
}

type ClientIdentity

type ClientIdentity struct {
	Application string
	Tenant      string
	Group       string
}

type ErrorResponse

type ErrorResponse struct {
	Code  int    `json:"code"`
	Error string `json:"error"`
}

type EstablishedConnection

type EstablishedConnection struct {
	Certificates      certificates.Certificates
	ManagementInfoURL string
}

type EstablishedConnectionClient

type EstablishedConnectionClient interface {
	GetManagementInfo(managementInfoURL string) (ManagementInfo, error)
	RenewCertificate(renewalURL string) (certificates.Certificates, error)
}

func NewEstablishedConnectionClient

func NewEstablishedConnectionClient(config *tls.Config, csrProvider certificates.CSRProvider, subject pkix.Name) EstablishedConnectionClient

type EstablishedConnectionClientProvider

type EstablishedConnectionClientProvider interface {
	CreateClient(credentials CertificateCredentials) EstablishedConnectionClient
}

func NewEstablishedConnectionClientProvider

func NewEstablishedConnectionClientProvider(csrProvider certificates.CSRProvider) EstablishedConnectionClientProvider

type InfoResponse

type InfoResponse struct {
	CsrURL          string          `json:"csrUrl"`
	Api             APIUrls         `json:"api"`
	CertificateInfo CertificateInfo `json:"certificate"`
}

type InitialConnectionClient

type InitialConnectionClient interface {
	Establish(csrInfoURL string) (EstablishedConnection, error)
}

func NewInitialConnectionClient

func NewInitialConnectionClient(csrProvider certificates.CSRProvider) InitialConnectionClient

type ManagementInfo

type ManagementInfo struct {
	ClientIdentity ClientIdentity `json:"clientIdentity"`
	ManagementURLs ManagementURLs `json:"urls"`
}

type ManagementURLs

type ManagementURLs struct {
	EventsURL     string `json:"eventsUrl"`
	MetadataURL   string `json:"metadataUrl"`
	RenewalURL    string `json:"renewCertUrl"`
	RevocationURL string `json:"revocationCertUrl"`
}

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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