Skip to content

ports ​

go
import "github.com/prescriptoo/prescriptoo-api/services/authorization/internal/ports"

Package ports defines authorization persistence boundaries.

Index ​

type Repository ​

Repository supplies consistent snapshots and serializes mutations within a scope, committing only when the callback succeeds. Callbacks must not retain state.

go
type Repository interface {
    Read(context.Context, p.Scope, func(*domain.State) error) error
    Write(context.Context, p.Scope, func(*domain.State, sub.SubscriptionService) error) error
}

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.