Versions in this module Expand all Collapse all v0 v0.7.1 Jul 25, 2023 v0.7.0 Jul 20, 2023 Changes in this version + func FromModelToResource(r *Resource) (*resource.Resource, error) + type Backup struct + Config map[string]string + CreatedAt time.Time + Description string + ID uuid.UUID + NamespaceName string + ProjectName string + ResourceNames pq.StringArray + Store string + UpdatedAt time.Time + func NewBackup(b *resource.Backup) Backup + func (b Backup) ToResourceBackup() (*resource.Backup, error) + type BackupRepository struct + func NewBackupRepository(pool *pgxpool.Pool) *BackupRepository + func (repo BackupRepository) Create(ctx context.Context, resourceBackup *resource.Backup) error + func (repo BackupRepository) GetAll(ctx context.Context, tnnt tenant.Tenant, store resource.Store) ([]*resource.Backup, error) + func (repo BackupRepository) GetByID(ctx context.Context, id resource.BackupID) (*resource.Backup, error) + type Repository struct + func NewRepository(pool *pgxpool.Pool) *Repository + func (r Repository) ChangeNamespace(ctx context.Context, res *resource.Resource, newTenant tenant.Tenant) error + func (r Repository) Create(ctx context.Context, resourceModel *resource.Resource) error + func (r Repository) GetResources(ctx context.Context, tnnt tenant.Tenant, store resource.Store, names []string) ([]*resource.Resource, error) + func (r Repository) ReadAll(ctx context.Context, tnnt tenant.Tenant, store resource.Store) ([]*resource.Resource, error) + func (r Repository) ReadByFullName(ctx context.Context, tnnt tenant.Tenant, store resource.Store, fullName string) (*resource.Resource, error) + func (r Repository) Update(ctx context.Context, resourceModel *resource.Resource) error + func (r Repository) UpdateStatus(ctx context.Context, resources ...*resource.Resource) error + type Resource struct + CreatedAt time.Time + FullName string + ID uuid.UUID + Kind string + Metadata json.RawMessage + NamespaceName string + ProjectName string + Spec map[string]any + Status string + Store string + URN string + UpdatedAt time.Time + func FromResourceToModel(r *resource.Resource) *Resource