alloydbapi

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an API client to the AlloyDB Rest API

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient initializes a Client.

func (*Client) ConnectionInfo added in v0.2.0

func (c *Client) ConnectionInfo(ctx context.Context, project, region, cluster, instance string) (ConnectionInfoResponse, error)

ConnectionInfo retrieves connection info for the provided instance.

func (*Client) GenerateClientCert

func (c *Client) GenerateClientCert(ctx context.Context, project, region, cluster string, csr []byte) (GenerateClientCertificateResponse, error)

GenerateClientCert creates a client certificate using the provided CSR.

type ConnectionInfoResponse added in v0.2.0

type ConnectionInfoResponse struct {
	ServerResponse googleapi.ServerResponse
	IPAddress      string `json:"ipAddress"`
	InstanceUID    string `json:"instanceUid"`
}

ConnectionInfoResponse is the response from the connection info endpoint.

type GenerateClientCertificateRequest

type GenerateClientCertificateRequest struct {
	PemCSR              string `json:"pemCsr"`
	CertificateDuration string `json:"certDuration"`
}

GenerateClientCertificateRequest is the request to generate a client certificate.

type GenerateClientCertificateResponse

type GenerateClientCertificateResponse struct {
	ServerResponse      googleapi.ServerResponse
	PemCertificate      string   `json:"pemCertificate"`
	PemCertificateChain []string `json:"pemCertificateChain"`
}

GenerateClientCertificateResponse is the response from the certificate endpoint.

Jump to

Keyboard shortcuts

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