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.
Click to show internal directories.
Click to hide internal directories.