Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Add(ctx context.Context, ak *hub.APIKey) (*hub.APIKey, error)
- func (m *Manager) Check(ctx context.Context, apiKeyID, apiKeySecret string) (*hub.CheckAPIKeyOutput, error)
- func (m *Manager) Delete(ctx context.Context, apiKeyID string) error
- func (m *Manager) GetJSON(ctx context.Context, apiKeyID string) ([]byte, error)
- func (m *Manager) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *Manager) Update(ctx context.Context, ak *hub.APIKey) error
- type ManagerMock
- func (m *ManagerMock) Add(ctx context.Context, ak *hub.APIKey) (*hub.APIKey, error)
- func (m *ManagerMock) Check(ctx context.Context, apiKeyID, apiKeySecret string) (*hub.CheckAPIKeyOutput, error)
- func (m *ManagerMock) Delete(ctx context.Context, apiKeyID string) error
- func (m *ManagerMock) GetJSON(ctx context.Context, apiKeyID string) ([]byte, error)
- func (m *ManagerMock) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *ManagerMock) Update(ctx context.Context, ak *hub.APIKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides an API to manage api keys.
func (*Manager) Check ¶
func (m *Manager) Check(ctx context.Context, apiKeyID, apiKeySecret string) (*hub.CheckAPIKeyOutput, error)
Check checks if the api key provided is valid.
func (*Manager) GetOwnedByUserJSON ¶
func (m *Manager) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
GetOwnedByUserJSON returns the api keys belonging to the requesting user as a json array.
type ManagerMock ¶
ManagerMock is a mock implementation of the APIKeyManager interface.
func (*ManagerMock) Check ¶
func (m *ManagerMock) Check(ctx context.Context, apiKeyID, apiKeySecret string) (*hub.CheckAPIKeyOutput, error)
Check implements the UserManager interface.
func (*ManagerMock) Delete ¶
func (m *ManagerMock) Delete(ctx context.Context, apiKeyID string) error
Delete implements the APIKeyManager interface.
func (*ManagerMock) GetOwnedByUserJSON ¶
func (m *ManagerMock) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
GetOwnedByUserJSON implements the APIKeyManager interface.
Click to show internal directories.
Click to hide internal directories.