certificateclient

package
v1.111.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package certificateclient contains the client for the certificate endpoint.

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 implements certificatepb.DRPCCertificatesClient.

func New

func New(ctx context.Context, dialer rpc.Dialer, address string) (_ *Client, err error)

New creates a new certificate signing rpc client.

func NewClientFrom

func NewClientFrom(client pb.DRPCCertificatesClient) *Client

NewClientFrom creates a new certificate signing client from an existing cert signing client.

func (*Client) Close

func (client *Client) Close() error

Close closes the client.

func (*Client) Sign

func (client *Client) Sign(ctx context.Context, tokenStr string) (_ [][]byte, err error)

Sign claims an authorization using the token string and returns a signed copy of the client's CA certificate.

type Config

type Config struct {
	Address string `help:"address of the certificate signing rpc service"`
	TLS     tlsopts.Config
}

Config is a config struct for use with a certificate signing service client.

func (Config) Sign

func (config Config) Sign(ctx context.Context, ident *identity.FullIdentity, authToken string) (_ [][]byte, err error)

Sign submits a certificate signing request given the config.

Jump to

Keyboard shortcuts

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