Documentation ¶
Index ¶
- func CreatePEM(pemFile string, writer security.PEMWriter) error
- func LoadIdentityFromFiles(id string, keyFile string, crtFile string, csrFile string) (*security.Identity, error)
- func StoreIdentityInFiles(i *security.Identity, keyFile string, crtFile string, csrFile string) error
- type DirectorEvent
- type State
- func (s *State) AddIdentityToPending(identity *security.Identity) error
- func (s *State) DirectorHeartbeat(id string, interval uint64)
- func (s *State) DiscoverDirectors(localId string, events chan *DirectorEvent)
- func (s *State) GetPendingIdentities() ([]string, error)
- func (s *State) LoadAuthority() (*security.Authority, error)
- func (s *State) LoadIdentity(id string) (*security.Identity, error)
- func (s *State) RemoveIdentity(identity *security.Identity) error
- func (s *State) RemoveIdentityFromPending(identity *security.Identity) error
- func (s *State) StoreAuthority(authority *security.Authority) error
- func (s *State) StoreAuthoritySerial(authority *security.Authority) error
- func (s *State) StoreIdentity(identity *security.Identity) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePEM ¶
CreatePEM takes a file name and a pem writer, creates a file and writes the pem bytes out
func LoadIdentityFromFiles ¶
func LoadIdentityFromFiles(id string, keyFile string, crtFile string, csrFile string) (*security.Identity, error)
LoadIdentityFiles takes the id of an identity and the full path names of the key, certificate & request files and will create a new identity and try to load the specified files.
Types ¶
type DirectorEvent ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) AddIdentityToPending ¶
AddIdentityToPending adds the provided identity to the pending list
func (*State) DirectorHeartbeat ¶
DirectorHeartbeat is a simple function that sets a key with our ID every heartbeatInterval
func (*State) DiscoverDirectors ¶
func (s *State) DiscoverDirectors(localId string, events chan *DirectorEvent)
DiscoverDirectors
func (*State) GetPendingIdentities ¶
GetPendingIdentities returns a string slice with all of the pending ids
func (*State) LoadAuthority ¶
LoadAuthority fetches the authority information
func (*State) LoadIdentity ¶
LoadIdentity loads the identity with the id specified
func (*State) RemoveIdentity ¶
Remove an identity from the state
func (*State) RemoveIdentityFromPending ¶
RemoveIdentityFromPending removes the provided identity from the pending list