Versions in this module Expand all Collapse all v0 v0.8.0 Jun 30, 2023 Changes in this version + var AppealStatusDefaultSort = []string + var ApprovalStatusDefaultSort = []string + var GrantStatusDefaultSort = []string + type ActivityRepository struct + func NewActivityRepository(db *gorm.DB) *ActivityRepository + func (r *ActivityRepository) BulkUpsert(ctx context.Context, activities []*domain.Activity) error + func (r *ActivityRepository) Find(ctx context.Context, filter domain.ListProviderActivitiesFilter) ([]*domain.Activity, error) + func (r *ActivityRepository) GetOne(ctx context.Context, id string) (*domain.Activity, error) + type AppealRepository struct + func NewAppealRepository(db *gorm.DB) *AppealRepository + func (r *AppealRepository) BulkUpsert(ctx context.Context, appeals []*domain.Appeal) error + func (r *AppealRepository) Find(ctx context.Context, filters *domain.ListAppealsFilter) ([]*domain.Appeal, error) + func (r *AppealRepository) GetByID(ctx context.Context, id string) (*domain.Appeal, error) + func (r *AppealRepository) Update(ctx context.Context, a *domain.Appeal) error + type ApprovalRepository struct + func NewApprovalRepository(db *gorm.DB) *ApprovalRepository + func (r *ApprovalRepository) AddApprover(ctx context.Context, approver *domain.Approver) error + func (r *ApprovalRepository) BulkInsert(ctx context.Context, approvals []*domain.Approval) error + func (r *ApprovalRepository) DeleteApprover(ctx context.Context, approvalID, email string) error + func (r *ApprovalRepository) ListApprovals(ctx context.Context, conditions *domain.ListApprovalsFilter) ([]*domain.Approval, error) + type GrantRepository struct + func NewGrantRepository(db *gorm.DB) *GrantRepository + func (r *GrantRepository) BulkInsert(ctx context.Context, grants []*domain.Grant) error + func (r *GrantRepository) BulkUpsert(ctx context.Context, grants []*domain.Grant) error + func (r *GrantRepository) GetByID(ctx context.Context, id string) (*domain.Grant, error) + func (r *GrantRepository) List(ctx context.Context, filter domain.ListGrantsFilter) ([]domain.Grant, error) + func (r *GrantRepository) Update(ctx context.Context, a *domain.Grant) error + type PolicyRepository struct + func NewPolicyRepository(db *gorm.DB) *PolicyRepository + func (r *PolicyRepository) Create(ctx context.Context, p *domain.Policy) error + func (r *PolicyRepository) Find(ctx context.Context) ([]*domain.Policy, error) + func (r *PolicyRepository) GetOne(ctx context.Context, id string, version uint) (*domain.Policy, error) + type ProviderRepository struct + func NewProviderRepository(db *gorm.DB) *ProviderRepository + func (r *ProviderRepository) Create(ctx context.Context, p *domain.Provider) error + func (r *ProviderRepository) Delete(ctx context.Context, id string) error + func (r *ProviderRepository) Find(ctx context.Context) ([]*domain.Provider, error) + func (r *ProviderRepository) GetByID(ctx context.Context, id string) (*domain.Provider, error) + func (r *ProviderRepository) GetOne(ctx context.Context, pType, urn string) (*domain.Provider, error) + func (r *ProviderRepository) GetTypes(ctx context.Context) ([]domain.ProviderType, error) + func (r *ProviderRepository) Update(ctx context.Context, p *domain.Provider) error + type ResourceRepository struct + func NewResourceRepository(db *gorm.DB) *ResourceRepository + func (r *ResourceRepository) BatchDelete(ctx context.Context, ids []string) error + func (r *ResourceRepository) BulkUpsert(ctx context.Context, resources []*domain.Resource) error + func (r *ResourceRepository) Delete(ctx context.Context, id string) error + func (r *ResourceRepository) Find(ctx context.Context, filter domain.ListResourcesFilter) ([]*domain.Resource, error) + func (r *ResourceRepository) GetOne(ctx context.Context, id string) (*domain.Resource, error) + func (r *ResourceRepository) Update(ctx context.Context, res *domain.Resource) error + type Store struct + func NewStore(c *store.Config) (*Store, error) + func (s *Store) DB() *gorm.DB + func (s *Store) Migrate() error