Documentation ¶
Index ¶
- type Storage
- type StorageImpl
- func (s *StorageImpl) GetID() string
- func (s *StorageImpl) LoadCA(id string) (*types.CAEntity, error)
- func (s *StorageImpl) LoadClient(clientID string) (*types.Entity, error)
- func (s *StorageImpl) LoadServer(serverID string) (*types.Entity, error)
- func (s *StorageImpl) SaveCA(ca *types.CAEntity) error
- func (s *StorageImpl) SaveClient(client *types.Entity) error
- func (s *StorageImpl) SaveServer(server *types.Entity) error
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) 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
Click to show internal directories.
Click to hide internal directories.