storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: MIT Imports: 5 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 interface {
	GetID() string
	SaveCA(ca *types.CAEntity) error
	SaveClient(client *types.Entity) error
	SaveServer(server *types.Entity) error
	LoadCA(id string) (*types.CAEntity, error)
	LoadClient(clientID string) (*types.Entity, error)
	LoadServer(serverID string) (*types.Entity, error)
}

Storage Interface

type StorageImpl

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

StorageImpl is an implementation of the Storage interface

func New

func New(uri string, token ...string) (*StorageImpl, error)

New returnes a new pki storage using github.com/trusch/storage

func (*StorageImpl) GetID

func (s *StorageImpl) GetID() string

GetID returns a new uuid

func (*StorageImpl) LoadCA

func (s *StorageImpl) LoadCA(id string) (*types.CAEntity, error)

LoadCA loads a CA from backend

func (*StorageImpl) LoadClient

func (s *StorageImpl) LoadClient(clientID string) (*types.Entity, error)

LoadClient loads a Client from backend

func (*StorageImpl) LoadServer

func (s *StorageImpl) LoadServer(serverID string) (*types.Entity, error)

LoadServer loads a Server from backend

func (*StorageImpl) SaveCA

func (s *StorageImpl) SaveCA(ca *types.CAEntity) error

SaveCA saves a CA to backend

func (*StorageImpl) SaveClient

func (s *StorageImpl) SaveClient(client *types.Entity) error

SaveClient saves a client to backend

func (*StorageImpl) SaveServer

func (s *StorageImpl) SaveServer(server *types.Entity) error

SaveServer saves a Server to backend

Jump to

Keyboard shortcuts

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