Documentation
¶
Index ¶
- type MemoryTokenStorage
- func (m *MemoryTokenStorage) Delete(_ context.Context, owner *api.SPIAccessToken) error
- func (m *MemoryTokenStorage) Get(_ context.Context, owner *api.SPIAccessToken) (*api.Token, error)
- func (m *MemoryTokenStorage) Initialize(_ context.Context) error
- func (m *MemoryTokenStorage) Store(_ context.Context, owner *api.SPIAccessToken, token *api.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryTokenStorage ¶
type MemoryTokenStorage struct {
// Tokens is the map of stored Tokens. The keys are object keys of the SPIAccessToken objects.
Tokens map[client.ObjectKey]api.Token
// ErrorOnInitialize if not nil, the error is thrown when the Initialize method is called.
ErrorOnInitialize error
// ErrorOnStore if not nil, the error is thrown when the Store method is called.
ErrorOnStore error
// ErrorOnGet if not nil, the error is thrown when the Get method is called.
ErrorOnGet error
// ErrorOnDelete if not nil, the error is thrown when the Delete method is called.
ErrorOnDelete error
// contains filtered or unexported fields
}
MemoryTokenStorage is an in-memory implementation of the TokenStorage interface intended to be used in tests.
func (*MemoryTokenStorage) Delete ¶
func (m *MemoryTokenStorage) Delete(_ context.Context, owner *api.SPIAccessToken) error
func (*MemoryTokenStorage) Get ¶
func (m *MemoryTokenStorage) Get(_ context.Context, owner *api.SPIAccessToken) (*api.Token, error)
func (*MemoryTokenStorage) Initialize ¶
func (m *MemoryTokenStorage) Initialize(_ context.Context) error
func (*MemoryTokenStorage) Store ¶
func (m *MemoryTokenStorage) Store(_ context.Context, owner *api.SPIAccessToken, token *api.Token) error
Click to show internal directories.
Click to hide internal directories.