keystore

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitModels

func InitModels()

InitModels initialize models in mongo, if required.

Types

type KeyData

type KeyData struct {
	TimeStamp db.DateTime `json:"timestamp"`
	Comment   string      `json:"comment"`
	Algorithm string      `json:"algorithm"`
}

type KeyStoreKey

type KeyStoreKey struct {
	Key      string  `json:"key"`
	Globalid string  `json:"globalid"`
	Username string  `json:"username"`
	Label    string  `json:"label"`
	KeyData  KeyData `json:"keydata"`
}

func (*KeyStoreKey) Validate

func (key *KeyStoreKey) Validate() bool

type Manager

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

Manager is used to store users

func NewManager

func NewManager(r *http.Request) *Manager

NewManager creates and initializes a new Manager

func (*Manager) Create

func (m *Manager) Create(key *KeyStoreKey) error

Create a new KeyStore key entry.

func (*Manager) GetKeyStoreKey

func (m *Manager) GetKeyStoreKey(username string, globalid string, label string) (*KeyStoreKey, error)

func (*Manager) ListKeyStoreKeys

func (m *Manager) ListKeyStoreKeys(username string, globalid string) ([]KeyStoreKey, error)

Jump to

Keyboard shortcuts

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