Documentation ¶
Index ¶
- Variables
- func LoadEnvelopeFromFile(filename string) (*jess.Envelope, error)
- func LoadSignetFromFile(filename string) (*jess.Signet, error)
- func NamePlaysNiceWithFS(s string) (ok bool)
- func WriteEnvelopeToFile(envelope *jess.Envelope, filename string) error
- func WriteSignetToFile(signet *jess.Signet, filename string) error
- type DirTrustStore
- func (dts *DirTrustStore) AllEnvelopes() ([]*jess.Envelope, error)
- func (dts *DirTrustStore) DeleteEnvelope(name string) error
- func (dts *DirTrustStore) DeleteSignet(id string, recipient bool) error
- func (dts *DirTrustStore) GetEnvelope(name string) (*jess.Envelope, error)
- func (dts *DirTrustStore) GetSignet(id string, recipient bool) (*jess.Signet, error)
- func (dts *DirTrustStore) SelectSignets(filter uint8, schemes ...string) ([]*jess.Signet, error)
- func (dts *DirTrustStore) StoreEnvelope(envelope *jess.Envelope) error
- func (dts *DirTrustStore) StoreSignet(signet *jess.Signet) error
- type ExtendedTrustStore
- type KeyringTrustStore
- func (krts *KeyringTrustStore) AllEnvelopes() ([]*jess.Envelope, error)
- func (krts *KeyringTrustStore) DeleteEnvelope(name string) error
- func (krts *KeyringTrustStore) DeleteSignet(id string, recipient bool) error
- func (krts *KeyringTrustStore) GetEnvelope(name string) (*jess.Envelope, error)
- func (krts *KeyringTrustStore) GetSignet(id string, recipient bool) (*jess.Signet, error)
- func (krts *KeyringTrustStore) SelectSignets(filter uint8, schemes ...string) ([]*jess.Signet, error)
- func (krts *KeyringTrustStore) StoreEnvelope(envelope *jess.Envelope) error
- func (krts *KeyringTrustStore) StoreSignet(signet *jess.Signet) error
Constants ¶
This section is empty.
Variables ¶
var ErrNotSupportedByTrustStore = errors.New("action not supported by trust store")
ErrNotSupportedByTrustStore is returned by trust stores if they do not support certain actions.
Functions ¶
func LoadEnvelopeFromFile ¶
LoadEnvelopeFromFile loads an envelope from the given filepath.
func LoadSignetFromFile ¶
LoadSignetFromFile loads a signet from the given filepath.
func NamePlaysNiceWithFS ¶
NamePlaysNiceWithFS checks if the given string plays nice with filesystems.
func WriteEnvelopeToFile ¶
WriteEnvelopeToFile serializes the envelope and writes it to the given file.
Types ¶
type DirTrustStore ¶
type DirTrustStore struct {
// contains filtered or unexported fields
}
DirTrustStore is a simple trust store using a filesystem directory as the storage backend.
func NewDirTrustStore ¶
func NewDirTrustStore(storageDir string) (*DirTrustStore, error)
NewDirTrustStore returns a new trust store using a filesystem directory as the storage backend.
func (*DirTrustStore) AllEnvelopes ¶
func (dts *DirTrustStore) AllEnvelopes() ([]*jess.Envelope, error)
AllEnvelopes returns all envelopes.
func (*DirTrustStore) DeleteEnvelope ¶
func (dts *DirTrustStore) DeleteEnvelope(name string) error
DeleteEnvelope deletes the Envelope with the given name.
func (*DirTrustStore) DeleteSignet ¶
func (dts *DirTrustStore) DeleteSignet(id string, recipient bool) error
DeleteSignet deletes the Signet or Recipient with the given ID.
func (*DirTrustStore) GetEnvelope ¶
func (dts *DirTrustStore) GetEnvelope(name string) (*jess.Envelope, error)
GetEnvelope returns the Envelope with the given name.
func (*DirTrustStore) SelectSignets ¶
SelectSignets returns a selection of the signets in the trust store. Results are filtered by tool/algorithm and whether it you're looking for a signet (private key) or a recipient (public key).
func (*DirTrustStore) StoreEnvelope ¶
func (dts *DirTrustStore) StoreEnvelope(envelope *jess.Envelope) error
StoreEnvelope stores an Envelope.
func (*DirTrustStore) StoreSignet ¶
func (dts *DirTrustStore) StoreSignet(signet *jess.Signet) error
StoreSignet stores a Signet in the TrustStore.
type ExtendedTrustStore ¶
type ExtendedTrustStore interface { jess.TrustStore // StoreSignet stores a Signet. StoreSignet(signet *jess.Signet) error // DeleteSignet deletes the Signet or Recipient with the given ID. DeleteSignet(id string, recipient bool) error // SelectSignets returns a selection of the signets in the trust store. Results are filtered by tool/algorithm and whether it you're looking for a signet (private key) or a recipient (public key). SelectSignets(filter uint8, schemes ...string) ([]*jess.Signet, error) // GetEnvelope returns the Envelope with the given name. GetEnvelope(name string) (*jess.Envelope, error) // StoreEnvelope stores an Envelope. StoreEnvelope(envelope *jess.Envelope) error // DeleteEnvelope deletes the Envelope with the given name. DeleteEnvelope(name string) error // AllEnvelopes returns all envelopes. AllEnvelopes() ([]*jess.Envelope, error) }
ExtendedTrustStore holds a set of trusted Signets, Recipients and Envelopes.
type KeyringTrustStore ¶ added in v0.3.0
type KeyringTrustStore struct {
// contains filtered or unexported fields
}
KeyringTrustStore is a trust store that uses the system keyring. It does not support listing entries, so it cannot be easily managed.
func NewKeyringTrustStore ¶ added in v0.3.0
func NewKeyringTrustStore(serviceName string) (*KeyringTrustStore, error)
NewKeyringTrustStore returns a new keyring trust store with the given service name. The effect of the service name depends on the operating system. Read more at https://pkg.go.dev/github.com/zalando/go-keyring
func (*KeyringTrustStore) AllEnvelopes ¶ added in v0.3.0
func (krts *KeyringTrustStore) AllEnvelopes() ([]*jess.Envelope, error)
AllEnvelopes returns all envelopes.
func (*KeyringTrustStore) DeleteEnvelope ¶ added in v0.3.0
func (krts *KeyringTrustStore) DeleteEnvelope(name string) error
DeleteEnvelope deletes the Envelope with the given name.
func (*KeyringTrustStore) DeleteSignet ¶ added in v0.3.0
func (krts *KeyringTrustStore) DeleteSignet(id string, recipient bool) error
DeleteSignet deletes the Signet or Recipient with the given ID.
func (*KeyringTrustStore) GetEnvelope ¶ added in v0.3.0
func (krts *KeyringTrustStore) GetEnvelope(name string) (*jess.Envelope, error)
GetEnvelope returns the Envelope with the given name.
func (*KeyringTrustStore) GetSignet ¶ added in v0.3.0
GetSignet returns the Signet with the given ID.
func (*KeyringTrustStore) SelectSignets ¶ added in v0.3.0
func (krts *KeyringTrustStore) SelectSignets(filter uint8, schemes ...string) ([]*jess.Signet, error)
SelectSignets returns a selection of the signets in the trust store. Results are filtered by tool/algorithm and whether it you're looking for a signet (private key) or a recipient (public key).
func (*KeyringTrustStore) StoreEnvelope ¶ added in v0.3.0
func (krts *KeyringTrustStore) StoreEnvelope(envelope *jess.Envelope) error
StoreEnvelope stores an Envelope.
func (*KeyringTrustStore) StoreSignet ¶ added in v0.3.0
func (krts *KeyringTrustStore) StoreSignet(signet *jess.Signet) error
StoreSignet stores a Signet.