MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / CreateAPIKey

Method CreateAPIKey

apikey.go:22–24  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

20// - *model.APIKey: The created API key
21// - error: An error if the operation fails
22func (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//

Callers 1

TestCreateAPIKey_MockFunction · 0.95

Calls 1

CreateAPIKeyMethod · 0.65

Tested by 1

TestCreateAPIKey_MockFunction · 0.76