storage

package
v0.0.0-...-c03dbfc Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage define all storage action and methods

func NewStorage

func NewStorage() Storage

NewStorage create new Storage Struct

func (*Storage) Close

func (s *Storage) Close()

Close close session with storage

func (*Storage) CreateCert

func (s *Storage) CreateCert(cert *models.Cert) *models.Cert

CreateCert create new certificate

func (*Storage) DeleteCert

func (s *Storage) DeleteCert(id bson.ObjectId) error

DeleteCert delete certificate of database

func (*Storage) FindCert

func (s *Storage) FindCert(id bson.ObjectId) (models.Cert, error)

FindCert find certificate on database

func (*Storage) InsertCert

func (s *Storage) InsertCert(cert *models.Cert) error

InsertCert insert new cert on database

func (*Storage) IsDuplicateKey

func (s *Storage) IsDuplicateKey(err error) bool

IsDuplicateKey test if a key already exist on storage

func (*Storage) IsNotFound

func (s *Storage) IsNotFound(err error) bool

IsNotFound resource not found

Jump to

Keyboard shortcuts

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