db

package
v0.0.0-...-e76495e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertHandler

type CertHandler struct {
	DB *MonDB
}

func (*CertHandler) HandleEvents

func (s *CertHandler) HandleEvents(ch chan models.MonEvent)

type CertInfo

type CertInfo struct {
	Id                    bson.ObjectId `json:"id,omitempty" bson:"_id"`
	Index                 int64
	CommonName            string    `bson:"CommonName"`
	Issuer                string    `bson:"Issuer"`
	Serial                string    `bson:"Serial"`
	NotBefore             time.Time `bson:"NotBefore"`
	NotAfter              time.Time `bson:"NotAfter"`
	KeyUsage              int       `bson:"KeyUsage"`
	PublicKeyAlgorithm    int       `bson:"PublicKeyAlgorithm"`
	SignatureAlgorithm    int       `bson:"SignatureAlgorithm"`
	DNSNames              []string  `bson:"DNSNames"`
	EmailAddresses        []string  `bson:"EmailAddresses"`
	OCSPServer            []string  `bson:"OCSPServer"`
	IssuingCertificateURL []string  `bson:"IssuingCertificateURL"`
	PEMCert               string    `bson:"pem"`
	Precert               bool      `bson:"precert"`
	Created               time.Time `bson:"created"`
	SHA256Sum             string    `bson:"sha256_sum"`
}

type MonDB

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

func Init

func Init(uri string) (*MonDB, error)

func (*MonDB) LoadState

func (m *MonDB) LoadState() (int64, error)

func (*MonDB) SaveState

func (m *MonDB) SaveState(StartIndex int64) error

func (*MonDB) StoreCertDetails

func (m *MonDB) StoreCertDetails(cert *CertInfo) error

type MonDBState

type MonDBState struct {
	Id         bson.ObjectId `json:"id,omitempty" bson:"_id"`
	StartIndex int64         `bson:"start_index"`
	Created    time.Time     `bson:"created"`
	Updated    time.Time     `bson:"updated"`
}

Jump to

Keyboard shortcuts

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