CreateAPIKey creates a new API key for the specified owner Parameters: - ctx: The context for the operation - name: Name of the API key - ownerID: ID of the key owner - scopes: List of permission scopes - expiresAt: Expiration time for the key Returns: - *model.APIKey: The created API key - error:
(ctx context.Context, name, ownerID string, scopes []string, expiresAt time.Time)
| 20 | // - *model.APIKey: The created API key |
| 21 | // - error: An error if the operation fails |
| 22 | func (l *LedgerForge) CreateAPIKey(ctx context.Context, name, ownerID string, scopes []string, expiresAt time.Time) (*model.APIKey, error) { |
| 23 | return l.datasource.CreateAPIKey(ctx, name, ownerID, scopes, expiresAt) |
| 24 | } |
| 25 | |
| 26 | // ListAPIKeys retrieves all API keys for a specific owner |
| 27 | // |