service

package
v0.0.0-...-0a271de Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service provides the API for working with autocert cache. This service implements autocert.Cache interface.

func NewService

func NewService(st State, logger logger.Logger) *Service

NewService returns a new service reference wrapping the input state.

func (*Service) Delete

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

Delete implements autocert.Cache.Delete.

func (*Service) Get

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

Get implements autocert.Cache.Get.

func (*Service) Put

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

Put implements autocert.Cache.Put.

type State

type State interface {
	// Put implements autocert.Cache.Put.
	Put(ctx context.Context, name string, data []byte) error

	// Get implements autocert.Cache.Get.
	Get(ctx context.Context, name string) ([]byte, error)

	// Delete implements autocert.Cache.Delete.
	Delete(ctx context.Context, name string) error
}

State describes retrieval and persistence methods for storage.

Jump to

Keyboard shortcuts

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