certificate

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCertNotFound means the cert id was not found in the repo
	ErrCertNotFound = errors.New("cert not found")

	// ErrCertExists is returned if a create is called on an existing cert
	ErrCertExists = errors.New("cert with that id exists")
)

Functions

This section is empty.

Types

type Repository

type Repository interface {
	AllCerts() ([]*model.Certificate, error)
	Cert(id string) (*model.Certificate, error)
	SaveCert(c *model.Certificate) error
	DeleteCert(id string) error
	DeleteAllCerts() error
}

Repository provides an interface for persisting certificates.

type Service

type Service interface {
	AllCerts() ([]*model.Certificate, error)
	Cert(id string) (*model.Certificate, error)
	SaveCert(c *model.Certificate) error
	DeleteCert(id string) error
	DeleteAllCerts() error
}

Service provides an interface for all business operations on the Cert model.

Jump to

Keyboard shortcuts

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