- Add ListPipelines/GetPipeline to CIProvider port with Woodpecker adapter
- Add DNS alias endpoints: GET/POST/DELETE /projects/{id}/domains
- Implement worker executor daemon, build executor, and git operations
- Add build service, worker service, and build audit tracking
- Add worker registry with PostgreSQL adapter and migration
- Add multi-provider code agent interface (Claude Code + OpenCode)
- Add create-and-build combo endpoint
- Update landing-page cookbook to reflect all gaps closed
- Fix tech debt: unified validation, auth scopes, error wrapping, slog patterns
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
40 lines
1.4 KiB
Go
40 lines
1.4 KiB
Go
// Package port defines interfaces (ports) for external dependencies.
|
|
package port
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/orchard9/rdev/internal/domain"
|
|
)
|
|
|
|
// CredentialStore manages secure storage and retrieval of credentials.
|
|
// Credentials are encrypted at rest in the database.
|
|
type CredentialStore interface {
|
|
// Get retrieves a credential by key. Returns empty string if not found.
|
|
Get(ctx context.Context, key string) (string, error)
|
|
|
|
// GetRequired retrieves a credential by key.
|
|
// Returns domain.ErrCredentialNotFound if the key does not exist.
|
|
GetRequired(ctx context.Context, key string) (string, error)
|
|
|
|
// Set stores or updates a credential.
|
|
Set(ctx context.Context, cred domain.Credential) error
|
|
|
|
// Delete removes a credential by key.
|
|
// Returns domain.ErrCredentialNotFound if the key does not exist.
|
|
Delete(ctx context.Context, key string) error
|
|
|
|
// List returns all credentials (with values masked).
|
|
List(ctx context.Context) ([]domain.Credential, error)
|
|
|
|
// ListByCategory returns credentials in a category (with values masked).
|
|
ListByCategory(ctx context.Context, category string) ([]domain.Credential, error)
|
|
|
|
// GetMultiple retrieves multiple credentials by keys.
|
|
// Returns a map of key -> value. Missing keys are omitted.
|
|
GetMultiple(ctx context.Context, keys []string) (map[string]string, error)
|
|
|
|
// SetMultiple stores multiple credentials in a single transaction.
|
|
SetMultiple(ctx context.Context, creds []domain.Credential) error
|
|
}
|