acc

package module
v0.0.0-...-7b83d46 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 8 Imported by: 1

README

acc

ACME Autocert Cache

Go Report Card CircleCI

Documentation

Overview

Package acc implements github.com/golang/crypto/acme/autocert.Cache Copyright 2017 Reed O'Brien

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

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

S3 implements autocert.Cache using an S3 bucket for persistence. The bucket must already exist.

func MustS3

func MustS3(s3 S3API, bucket, prefix string) *S3

MustS3 constructs a new S3 cache implementation.

func (S3) Delete

func (s S3) Delete(ctx context.Context, name string) error

Delete removes the object at the specified key.

func (S3) Get

func (s S3) Get(ctx context.Context, name string) ([]byte, error)

Get reads certificate data from the specified key.

func (S3) Put

func (s S3) Put(ctx context.Context, name string, data []byte) error

Put writes the certificate data to the specified key.

type S3API

type S3API interface {
	GetObjectWithContext(aws.Context, *s3.GetObjectInput, ...request.Option) (*s3.GetObjectOutput, error)
	PutObjectWithContext(aws.Context, *s3.PutObjectInput, ...request.Option) (*s3.PutObjectOutput, error)
	DeleteObjectWithContext(aws.Context, *s3.DeleteObjectInput, ...request.Option) (*s3.DeleteObjectOutput, error)
}

S3API implements the bits of aws-sdk-go `s3iface.S3API` that are needed to implmement `autocert.Cache`.

Jump to

Keyboard shortcuts

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