builtin

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigBucket = "mdm.ServerConfig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*bolt.DB
	Publisher pubsub.Publisher
}

DB stores server configuration in BoltDB

func NewDB

func NewDB(db *bolt.DB, pub pubsub.Publisher) (*DB, error)

func (*DB) AddToken

func (db *DB) AddToken(consumerKey string, json []byte) error

func (*DB) DEPKeypair

func (db *DB) DEPKeypair() (key *rsa.PrivateKey, cert *x509.Certificate, err error)

func (*DB) DEPTokens

func (db *DB) DEPTokens() ([]config.DEPToken, error)

func (*DB) PushCertificate

func (db *DB) PushCertificate() (*tls.Certificate, error)

func (*DB) PushTopic

func (db *DB) PushTopic() (string, error)

func (*DB) SavePushCertificate

func (db *DB) SavePushCertificate(cert, key []byte) error

Jump to

Keyboard shortcuts

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