Documentation ¶
Index ¶
- type FileStorage
- func (s *FileStorage) RetrieveAssignerProfile(_ context.Context, name string) (string, time.Time, error)
- func (s *FileStorage) RetrieveAuthTokens(_ context.Context, name string) (*client.OAuth1Tokens, error)
- func (s *FileStorage) RetrieveConfig(_ context.Context, name string) (*client.Config, error)
- func (s *FileStorage) RetrieveCursor(_ context.Context, name string) (string, error)
- func (s *FileStorage) RetrieveTokenPKI(_ context.Context, name string) ([]byte, []byte, error)
- func (s *FileStorage) StoreAssignerProfile(_ context.Context, name string, profileUUID string) error
- func (s *FileStorage) StoreAuthTokens(_ context.Context, name string, tokens *client.OAuth1Tokens) error
- func (s *FileStorage) StoreConfig(_ context.Context, name string, config *client.Config) error
- func (s *FileStorage) StoreCursor(_ context.Context, name, cursor string) error
- func (s *FileStorage) StoreTokenPKI(_ context.Context, name string, pemCert []byte, pemKey []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
FileStorage implements filesystem-based storage for DEP services.
func (*FileStorage) RetrieveAssignerProfile ¶
func (s *FileStorage) RetrieveAssignerProfile(_ context.Context, name string) (string, time.Time, error)
RetrieveAssignerProfile reads the assigner profile UUID and its configured timestamp from disk for name DEP name.
Returns an empty profile if it does not exist.
func (*FileStorage) RetrieveAuthTokens ¶
func (s *FileStorage) RetrieveAuthTokens(_ context.Context, name string) (*client.OAuth1Tokens, error)
RetrieveAuthTokens reads the JSON DEP OAuth tokens from disk for name DEP name.
func (*FileStorage) RetrieveConfig ¶
RetrieveConfig reads the JSON DEP config of a DEP name.
Returns (nil, nil) if the DEP name does not exist, or if the config for the DEP name does not exist.
func (*FileStorage) RetrieveCursor ¶
RetrieveCursor reads the reads the DEP fetch and sync cursor from disk for name DEP name. We return an empty cursor if the cursor does not exist on disk.
func (*FileStorage) RetrieveTokenPKI ¶
RetrieveTokenPKI reads and returns the PEM bytes for the DEP token exchange certificate and private key from disk using name DEP name.
func (*FileStorage) StoreAssignerProfile ¶
func (s *FileStorage) StoreAssignerProfile(_ context.Context, name string, profileUUID string) error
StoreAssignerProfile saves the assigner profile UUID to disk for name DEP name.
func (*FileStorage) StoreAuthTokens ¶
func (s *FileStorage) StoreAuthTokens(_ context.Context, name string, tokens *client.OAuth1Tokens) error
StoreAuthTokens saves the DEP OAuth tokens to disk as JSON for name DEP name.
func (*FileStorage) StoreConfig ¶
StoreConfig saves the DEP config to disk as JSON for name DEP name.
func (*FileStorage) StoreCursor ¶
func (s *FileStorage) StoreCursor(_ context.Context, name, cursor string) error
StoreCursor saves the DEP fetch and sync cursor to disk for name DEP name.
func (*FileStorage) StoreTokenPKI ¶
func (s *FileStorage) StoreTokenPKI(_ context.Context, name string, pemCert []byte, pemKey []byte) error
StoreTokenPKI stores the PEM bytes in pemCert and pemKey to disk for name DEP name.