connector

package
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSubject

func ParseSubject(subject string) pkix.Name

Types

type ApiInfo

type ApiInfo struct {
	*RuntimeURLs
	ManagementInfoURL string `json:"infoUrl"`
	CertificatesUrl   string `json:"certificatesUrl"`
}

type ApplicationClientIdentity

type ApplicationClientIdentity struct {
	Application string `json:"application,omitempty"`
	ClusterClientIdentity
}

type ApplicationConnection

type ApplicationConnection struct {
	Credentials    ApplicationCredentials
	ClientIdentity ApplicationClientIdentity
	ManagementURLs ManagementInfoURLs
}

type ApplicationCredentials

type ApplicationCredentials struct {
	ClientKey    *rsa.PrivateKey
	Certificates []*x509.Certificate
}

func (ApplicationCredentials) NewMTLSClient

func (ac ApplicationCredentials) NewMTLSClient(skipSSLVerify bool) *http.Client

type CSRInfoResponse

type CSRInfoResponse struct {
	CertUrl     string   `json:"csrUrl"`
	Api         ApiInfo  `json:"api"`
	Certificate CertInfo `json:"certificate"`
}

type CertInfo

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

type Client

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

func NewConnectorClient

func NewConnectorClient(skipSSLVerify bool) *Client

func (*Client) EstablishApplicationConnection

func (c *Client) EstablishApplicationConnection(infoURL string) (ApplicationConnection, error)

type ClusterClientIdentity

type ClusterClientIdentity struct {
	Group  string `json:"group"`
	Tenant string `json:"tenant"`
}

type CrtResponse

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

type CsrRequest

type CsrRequest struct {
	Csr string `json:"csr"`
}

type DecodedCrtResponse

type DecodedCrtResponse struct {
	CRTChain  []*x509.Certificate
	ClientCRT *x509.Certificate
	CaCRT     *x509.Certificate
}

type Error

type Error struct {
	StatusCode    int
	ErrorResponse ErrorResponse
}

type ErrorResponse

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

type ManagementInfoResponse

type ManagementInfoResponse struct {
	URLs           ManagementInfoURLs        `json:"urls"`
	ClientIdentity ApplicationClientIdentity `json:"clientIdentity"`
	Certificate    CertInfo                  `json:"certificate"`
}

type ManagementInfoURLs

type ManagementInfoURLs struct {
	*RuntimeURLs
	RenewCertUrl  string `json:"renewCertUrl"`
	RevokeCertURL string `json:"revokeCertUrl"`
}

type RevocationBody

type RevocationBody struct {
	Hash string
}

type RuntimeURLs

type RuntimeURLs struct {
	MetadataUrl string `json:"metadataUrl"`
	EventsUrl   string `json:"eventsUrl"`
}

type TokenResponse

type TokenResponse struct {
	URL   string `json:"url"`
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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