Documentation
¶
Index ¶
- func Open(connStr string) (*sql.DB, error)
- func OpenTestDB(t *testing.T) *sql.DB
- func TerminateTestContainer()
- type AuthMethodRepo
- type DeliveryRepo
- func (r *DeliveryRepo) DeleteByFulfillment(ctx context.Context, fID domain.FulfillmentID) error
- func (r *DeliveryRepo) Get(ctx context.Context, id domain.DeliveryID) (domain.Delivery, error)
- func (r *DeliveryRepo) GetByFulfillmentTarget(ctx context.Context, fID domain.FulfillmentID, tgtID domain.TargetID) (domain.Delivery, error)
- func (r *DeliveryRepo) ListActive(ctx context.Context, targetIDs []domain.TargetID) ([]domain.Delivery, error)
- func (r *DeliveryRepo) ListByFulfillment(ctx context.Context, fID domain.FulfillmentID) ([]domain.Delivery, error)
- func (r *DeliveryRepo) Put(ctx context.Context, d domain.Delivery) error
- type DeploymentRepo
- func (r *DeploymentRepo) Create(ctx context.Context, d domain.Deployment) error
- func (r *DeploymentRepo) Delete(ctx context.Context, id domain.DeploymentID) error
- func (r *DeploymentRepo) Get(ctx context.Context, id domain.DeploymentID) (domain.Deployment, error)
- func (r *DeploymentRepo) GetView(ctx context.Context, id domain.DeploymentID) (domain.DeploymentView, error)
- func (r *DeploymentRepo) ListView(ctx context.Context) ([]domain.DeploymentView, error)
- type FulfillmentRepo
- func (r *FulfillmentRepo) Create(ctx context.Context, f *domain.Fulfillment) error
- func (r *FulfillmentRepo) Delete(ctx context.Context, id domain.FulfillmentID) error
- func (r *FulfillmentRepo) Get(ctx context.Context, id domain.FulfillmentID) (*domain.Fulfillment, error)
- func (r *FulfillmentRepo) Update(ctx context.Context, f *domain.Fulfillment) error
- type InventoryRepo
- func (r *InventoryRepo) Create(ctx context.Context, item domain.InventoryItem) error
- func (r *InventoryRepo) CreateOrUpdate(ctx context.Context, item domain.InventoryItem) error
- func (r *InventoryRepo) Delete(ctx context.Context, id domain.InventoryItemID) error
- func (r *InventoryRepo) Get(ctx context.Context, id domain.InventoryItemID) (domain.InventoryItem, error)
- func (r *InventoryRepo) List(ctx context.Context) ([]domain.InventoryItem, error)
- func (r *InventoryRepo) ListByType(ctx context.Context, t domain.InventoryType) ([]domain.InventoryItem, error)
- func (r *InventoryRepo) Update(ctx context.Context, item domain.InventoryItem) error
- type ManagedResourceRepo
- func (r *ManagedResourceRepo) CreateInstance(ctx context.Context, mr *domain.ManagedResource) error
- func (r *ManagedResourceRepo) CreateType(ctx context.Context, def domain.ManagedResourceTypeDef) error
- func (r *ManagedResourceRepo) DeleteInstance(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) error
- func (r *ManagedResourceRepo) DeleteIntents(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) error
- func (r *ManagedResourceRepo) DeleteType(ctx context.Context, rt domain.ResourceType) error
- func (r *ManagedResourceRepo) GetInstance(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) (*domain.ManagedResource, error)
- func (r *ManagedResourceRepo) GetIntent(ctx context.Context, rt domain.ResourceType, name domain.ResourceName, ...) (domain.ResourceIntent, error)
- func (r *ManagedResourceRepo) GetType(ctx context.Context, rt domain.ResourceType) (domain.ManagedResourceTypeDef, error)
- func (r *ManagedResourceRepo) GetView(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) (domain.ManagedResourceView, error)
- func (r *ManagedResourceRepo) ListTypes(ctx context.Context) ([]domain.ManagedResourceTypeDef, error)
- func (r *ManagedResourceRepo) ListViewsByType(ctx context.Context, rt domain.ResourceType) ([]domain.ManagedResourceView, error)
- type ResourceIdentityRepo
- func (r *ResourceIdentityRepo) Create(ctx context.Context, pr *domain.PlatformResource) error
- func (r *ResourceIdentityRepo) Get(ctx context.Context, uid domain.PlatformResourceUID) (*domain.PlatformResource, error)
- func (r *ResourceIdentityRepo) GetByName(ctx context.Context, name domain.RelativeResourceName) (*domain.PlatformResource, error)
- func (r *ResourceIdentityRepo) GetRepresentation(ctx context.Context, name domain.FullResourceName) (domain.ResourceRepresentation, error)
- func (r *ResourceIdentityRepo) ListByCollection(ctx context.Context, collection domain.CollectionID) ([]*domain.PlatformResource, error)
- func (r *ResourceIdentityRepo) ResolveAlias(ctx context.Context, alias domain.Alias) (domain.PlatformResourceUID, error)
- func (r *ResourceIdentityRepo) Update(ctx context.Context, pr *domain.PlatformResource) error
- type SignerEnrollmentRepo
- func (r *SignerEnrollmentRepo) Create(ctx context.Context, e domain.SignerEnrollment) error
- func (r *SignerEnrollmentRepo) Get(ctx context.Context, id domain.SignerEnrollmentID) (domain.SignerEnrollment, error)
- func (r *SignerEnrollmentRepo) ListBySubject(ctx context.Context, identity domain.FederatedIdentity) ([]domain.SignerEnrollment, error)
- type Store
- type TargetRepo
- func (r *TargetRepo) Create(ctx context.Context, t domain.TargetInfo) error
- func (r *TargetRepo) CreateOrUpdate(ctx context.Context, t domain.TargetInfo) error
- func (r *TargetRepo) Delete(ctx context.Context, id domain.TargetID) error
- func (r *TargetRepo) Get(ctx context.Context, id domain.TargetID) (domain.TargetInfo, error)
- func (r *TargetRepo) List(ctx context.Context) ([]domain.TargetInfo, error)
- type VaultStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TerminateTestContainer ¶
func TerminateTestContainer()
Types ¶
type AuthMethodRepo ¶
AuthMethodRepo implements domain.AuthMethodRepository backed by Postgres. Unlike other repos in this package, it operates on *sql.DB directly because auth method operations do not participate in cross-repo transactions.
func (*AuthMethodRepo) Get ¶
func (r *AuthMethodRepo) Get(ctx context.Context, id domain.AuthMethodID) (domain.AuthMethod, error)
func (*AuthMethodRepo) List ¶
func (r *AuthMethodRepo) List(ctx context.Context) ([]domain.AuthMethod, error)
func (*AuthMethodRepo) Save ¶
func (r *AuthMethodRepo) Save(ctx context.Context, method domain.AuthMethod) error
type DeliveryRepo ¶
DeliveryRepo implements domain.DeliveryRepository backed by Postgres.
func (*DeliveryRepo) DeleteByFulfillment ¶
func (r *DeliveryRepo) DeleteByFulfillment(ctx context.Context, fID domain.FulfillmentID) error
func (*DeliveryRepo) Get ¶
func (r *DeliveryRepo) Get(ctx context.Context, id domain.DeliveryID) (domain.Delivery, error)
func (*DeliveryRepo) GetByFulfillmentTarget ¶
func (r *DeliveryRepo) GetByFulfillmentTarget(ctx context.Context, fID domain.FulfillmentID, tgtID domain.TargetID) (domain.Delivery, error)
func (*DeliveryRepo) ListActive ¶
func (*DeliveryRepo) ListByFulfillment ¶
func (r *DeliveryRepo) ListByFulfillment(ctx context.Context, fID domain.FulfillmentID) ([]domain.Delivery, error)
type DeploymentRepo ¶
DeploymentRepo implements domain.DeploymentRepository backed by Postgres.
func (*DeploymentRepo) Create ¶
func (r *DeploymentRepo) Create(ctx context.Context, d domain.Deployment) error
func (*DeploymentRepo) Delete ¶
func (r *DeploymentRepo) Delete(ctx context.Context, id domain.DeploymentID) error
func (*DeploymentRepo) Get ¶
func (r *DeploymentRepo) Get(ctx context.Context, id domain.DeploymentID) (domain.Deployment, error)
func (*DeploymentRepo) GetView ¶
func (r *DeploymentRepo) GetView(ctx context.Context, id domain.DeploymentID) (domain.DeploymentView, error)
func (*DeploymentRepo) ListView ¶
func (r *DeploymentRepo) ListView(ctx context.Context) ([]domain.DeploymentView, error)
type FulfillmentRepo ¶
FulfillmentRepo implements domain.FulfillmentRepository backed by Postgres.
func (*FulfillmentRepo) Create ¶
func (r *FulfillmentRepo) Create(ctx context.Context, f *domain.Fulfillment) error
func (*FulfillmentRepo) Delete ¶
func (r *FulfillmentRepo) Delete(ctx context.Context, id domain.FulfillmentID) error
func (*FulfillmentRepo) Get ¶
func (r *FulfillmentRepo) Get(ctx context.Context, id domain.FulfillmentID) (*domain.Fulfillment, error)
func (*FulfillmentRepo) Update ¶
func (r *FulfillmentRepo) Update(ctx context.Context, f *domain.Fulfillment) error
type InventoryRepo ¶
InventoryRepo implements domain.InventoryRepository backed by Postgres.
func (*InventoryRepo) Create ¶
func (r *InventoryRepo) Create(ctx context.Context, item domain.InventoryItem) error
func (*InventoryRepo) CreateOrUpdate ¶
func (r *InventoryRepo) CreateOrUpdate(ctx context.Context, item domain.InventoryItem) error
func (*InventoryRepo) Delete ¶
func (r *InventoryRepo) Delete(ctx context.Context, id domain.InventoryItemID) error
func (*InventoryRepo) Get ¶
func (r *InventoryRepo) Get(ctx context.Context, id domain.InventoryItemID) (domain.InventoryItem, error)
func (*InventoryRepo) List ¶
func (r *InventoryRepo) List(ctx context.Context) ([]domain.InventoryItem, error)
func (*InventoryRepo) ListByType ¶
func (r *InventoryRepo) ListByType(ctx context.Context, t domain.InventoryType) ([]domain.InventoryItem, error)
func (*InventoryRepo) Update ¶
func (r *InventoryRepo) Update(ctx context.Context, item domain.InventoryItem) error
type ManagedResourceRepo ¶
type ManagedResourceRepo struct {
DB interface {
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}
}
ManagedResourceRepo implements domain.ManagedResourceRepository for Postgres.
func (*ManagedResourceRepo) CreateInstance ¶
func (r *ManagedResourceRepo) CreateInstance(ctx context.Context, mr *domain.ManagedResource) error
func (*ManagedResourceRepo) CreateType ¶
func (r *ManagedResourceRepo) CreateType(ctx context.Context, def domain.ManagedResourceTypeDef) error
func (*ManagedResourceRepo) DeleteInstance ¶
func (r *ManagedResourceRepo) DeleteInstance(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) error
func (*ManagedResourceRepo) DeleteIntents ¶
func (r *ManagedResourceRepo) DeleteIntents(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) error
func (*ManagedResourceRepo) DeleteType ¶
func (r *ManagedResourceRepo) DeleteType(ctx context.Context, rt domain.ResourceType) error
func (*ManagedResourceRepo) GetInstance ¶
func (r *ManagedResourceRepo) GetInstance(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) (*domain.ManagedResource, error)
func (*ManagedResourceRepo) GetIntent ¶
func (r *ManagedResourceRepo) GetIntent(ctx context.Context, rt domain.ResourceType, name domain.ResourceName, version domain.IntentVersion) (domain.ResourceIntent, error)
func (*ManagedResourceRepo) GetType ¶
func (r *ManagedResourceRepo) GetType(ctx context.Context, rt domain.ResourceType) (domain.ManagedResourceTypeDef, error)
func (*ManagedResourceRepo) GetView ¶
func (r *ManagedResourceRepo) GetView(ctx context.Context, rt domain.ResourceType, name domain.ResourceName) (domain.ManagedResourceView, error)
func (*ManagedResourceRepo) ListTypes ¶
func (r *ManagedResourceRepo) ListTypes(ctx context.Context) ([]domain.ManagedResourceTypeDef, error)
func (*ManagedResourceRepo) ListViewsByType ¶
func (r *ManagedResourceRepo) ListViewsByType(ctx context.Context, rt domain.ResourceType) ([]domain.ManagedResourceView, error)
type ResourceIdentityRepo ¶
ResourceIdentityRepo implements domain.ResourceIdentityRepository backed by Postgres.
func (*ResourceIdentityRepo) Create ¶
func (r *ResourceIdentityRepo) Create(ctx context.Context, pr *domain.PlatformResource) error
func (*ResourceIdentityRepo) Get ¶
func (r *ResourceIdentityRepo) Get(ctx context.Context, uid domain.PlatformResourceUID) (*domain.PlatformResource, error)
func (*ResourceIdentityRepo) GetByName ¶
func (r *ResourceIdentityRepo) GetByName(ctx context.Context, name domain.RelativeResourceName) (*domain.PlatformResource, error)
func (*ResourceIdentityRepo) GetRepresentation ¶
func (r *ResourceIdentityRepo) GetRepresentation(ctx context.Context, name domain.FullResourceName) (domain.ResourceRepresentation, error)
func (*ResourceIdentityRepo) ListByCollection ¶
func (r *ResourceIdentityRepo) ListByCollection(ctx context.Context, collection domain.CollectionID) ([]*domain.PlatformResource, error)
func (*ResourceIdentityRepo) ResolveAlias ¶
func (r *ResourceIdentityRepo) ResolveAlias(ctx context.Context, alias domain.Alias) (domain.PlatformResourceUID, error)
func (*ResourceIdentityRepo) Update ¶
func (r *ResourceIdentityRepo) Update(ctx context.Context, pr *domain.PlatformResource) error
type SignerEnrollmentRepo ¶
SignerEnrollmentRepo implements domain.SignerEnrollmentRepository backed by Postgres.
func (*SignerEnrollmentRepo) Create ¶
func (r *SignerEnrollmentRepo) Create(ctx context.Context, e domain.SignerEnrollment) error
func (*SignerEnrollmentRepo) Get ¶
func (r *SignerEnrollmentRepo) Get(ctx context.Context, id domain.SignerEnrollmentID) (domain.SignerEnrollment, error)
func (*SignerEnrollmentRepo) ListBySubject ¶
func (r *SignerEnrollmentRepo) ListBySubject(ctx context.Context, identity domain.FederatedIdentity) ([]domain.SignerEnrollment, error)
type Store ¶
Store implements domain.Store backed by Postgres.
type TargetRepo ¶
TargetRepo implements domain.TargetRepository backed by Postgres.
func (*TargetRepo) Create ¶
func (r *TargetRepo) Create(ctx context.Context, t domain.TargetInfo) error
func (*TargetRepo) CreateOrUpdate ¶
func (r *TargetRepo) CreateOrUpdate(ctx context.Context, t domain.TargetInfo) error
func (*TargetRepo) Get ¶
func (r *TargetRepo) Get(ctx context.Context, id domain.TargetID) (domain.TargetInfo, error)
func (*TargetRepo) List ¶
func (r *TargetRepo) List(ctx context.Context) ([]domain.TargetInfo, error)
type VaultStore ¶
VaultStore implements domain.Vault backed by Postgres. It operates on *sql.DB directly (not within the transactional Store) because vault operations are independent of domain entity transactions.