cert-manager: github.com/jetstack/cert-manager/pkg/acme/client Index | Files | Directories

package client

import "github.com/jetstack/cert-manager/pkg/acme/client"

Index

Package Files

fake.go http.go interfaces.go

func NewInstrumentedClient Uses

func NewInstrumentedClient(metrics *metrics.Metrics, client *http.Client) *http.Client

NewInstrumentedClient takes a *http.Client and returns a *http.Client that has its RoundTripper wrapped with instrumentation.

type FakeACME Uses

type FakeACME struct {
    FakeAuthorizeOrder          func(ctx context.Context, id []acme.AuthzID, opt ...acme.OrderOption) (*acme.Order, error)
    FakeGetOrder                func(ctx context.Context, url string) (*acme.Order, error)
    FakeFetchCert               func(ctx context.Context, url string, bundle bool) ([][]byte, error)
    FakeWaitOrder               func(ctx context.Context, url string) (*acme.Order, error)
    FakeCreateOrderCert         func(ctx context.Context, finalizeURL string, csr []byte, bundle bool) (der [][]byte, certURL string, err error)
    FakeAccept                  func(ctx context.Context, chal *acme.Challenge) (*acme.Challenge, error)
    FakeGetChallenge            func(ctx context.Context, url string) (*acme.Challenge, error)
    FakeGetAuthorization        func(ctx context.Context, url string) (*acme.Authorization, error)
    FakeWaitAuthorization       func(ctx context.Context, url string) (*acme.Authorization, error)
    FakeRegister                func(ctx context.Context, a *acme.Account, prompt func(tosURL string) bool) (*acme.Account, error)
    FakeGetReg                  func(ctx context.Context, url string) (*acme.Account, error)
    FakeHTTP01ChallengeResponse func(token string) (string, error)
    FakeDNS01ChallengeRecord    func(token string) (string, error)
    FakeDiscover                func(ctx context.Context) (acme.Directory, error)
    FakeUpdateReg               func(ctx context.Context, a *acme.Account) (*acme.Account, error)
}

FakeACME is a convenience structure to create a stub ACME implementation

func (*FakeACME) Accept Uses

func (f *FakeACME) Accept(ctx context.Context, chal *acme.Challenge) (*acme.Challenge, error)

func (*FakeACME) AuthorizeOrder Uses

func (f *FakeACME) AuthorizeOrder(ctx context.Context, id []acme.AuthzID, opt ...acme.OrderOption) (*acme.Order, error)

func (*FakeACME) CreateOrderCert Uses

func (f *FakeACME) CreateOrderCert(ctx context.Context, finalizeURL string, csr []byte, bundle bool) (der [][]byte, certURL string, err error)

func (*FakeACME) DNS01ChallengeRecord Uses

func (f *FakeACME) DNS01ChallengeRecord(token string) (string, error)

func (*FakeACME) Discover Uses

func (f *FakeACME) Discover(ctx context.Context) (acme.Directory, error)

func (*FakeACME) FetchCert Uses

func (f *FakeACME) FetchCert(ctx context.Context, url string, bundle bool) ([][]byte, error)

func (*FakeACME) GetAuthorization Uses

func (f *FakeACME) GetAuthorization(ctx context.Context, url string) (*acme.Authorization, error)

func (*FakeACME) GetChallenge Uses

func (f *FakeACME) GetChallenge(ctx context.Context, url string) (*acme.Challenge, error)

func (*FakeACME) GetOrder Uses

func (f *FakeACME) GetOrder(ctx context.Context, url string) (*acme.Order, error)

func (*FakeACME) GetReg Uses

func (f *FakeACME) GetReg(ctx context.Context, url string) (*acme.Account, error)

func (*FakeACME) HTTP01ChallengeResponse Uses

func (f *FakeACME) HTTP01ChallengeResponse(token string) (string, error)

func (*FakeACME) Register Uses

func (f *FakeACME) Register(ctx context.Context, a *acme.Account, prompt func(tosURL string) bool) (*acme.Account, error)

func (*FakeACME) UpdateReg Uses

func (f *FakeACME) UpdateReg(ctx context.Context, a *acme.Account) (*acme.Account, error)

func (*FakeACME) WaitAuthorization Uses

func (f *FakeACME) WaitAuthorization(ctx context.Context, url string) (*acme.Authorization, error)

func (*FakeACME) WaitOrder Uses

func (f *FakeACME) WaitOrder(ctx context.Context, url string) (*acme.Order, error)

type Interface Uses

type Interface interface {
    AuthorizeOrder(ctx context.Context, id []acme.AuthzID, opt ...acme.OrderOption) (*acme.Order, error)
    GetOrder(ctx context.Context, url string) (*acme.Order, error)
    FetchCert(ctx context.Context, url string, bundle bool) ([][]byte, error)
    WaitOrder(ctx context.Context, url string) (*acme.Order, error)
    CreateOrderCert(ctx context.Context, finalizeURL string, csr []byte, bundle bool) (der [][]byte, certURL string, err error)
    Accept(ctx context.Context, chal *acme.Challenge) (*acme.Challenge, error)
    GetChallenge(ctx context.Context, url string) (*acme.Challenge, error)
    GetAuthorization(ctx context.Context, url string) (*acme.Authorization, error)
    WaitAuthorization(ctx context.Context, url string) (*acme.Authorization, error)
    Register(ctx context.Context, a *acme.Account, prompt func(tosURL string) bool) (*acme.Account, error)
    GetReg(ctx context.Context, url string) (*acme.Account, error)
    HTTP01ChallengeResponse(token string) (string, error)
    DNS01ChallengeRecord(token string) (string, error)
    Discover(ctx context.Context) (acme.Directory, error)
    UpdateReg(ctx context.Context, a *acme.Account) (*acme.Account, error)
}

type Transport Uses

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

Transport is a http.RoundTripper that collects Prometheus metrics of every request it processes. It allows to be configured with callbacks that process request path and query into a suitable label value.

func (*Transport) RoundTrip Uses

func (it *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper. It forwards the request to the wrapped RoundTripper and measures the time it took in Prometheus summary.

Directories

PathSynopsis
middleware

Package client imports 7 packages (graph) and is imported by 17 packages. Updated 2020-06-06. Refresh now. Tools for package owners.