Documentation
¶
Overview ¶
Package skillpg stores Skills and their versions in PostgreSQL. Version archives are sealed with the credential key and bound to their tenant, Skill, version ID and number.
Index ¶
- type Store
- func (s *Store) CreateSkill(ctx context.Context, in skills.NewSkill) (skills.Skill, error)
- func (s *Store) CreateVersion(ctx context.Context, in skills.NewVersion) (skills.Version, error)
- func (s *Store) DefaultVersionContent(ctx context.Context, tenantID string, skillID uuid.UUID) (skills.Content, error)
- func (s *Store) DeleteSkill(ctx context.Context, tenantID string, skillID uuid.UUID) error
- func (s *Store) SetDefaultVersion(ctx context.Context, tenantID string, skillID uuid.UUID, version int64) (skills.Skill, error)
- func (s *Store) Skill(ctx context.Context, tenantID string, id uuid.UUID) (skills.Skill, error)
- func (s *Store) Skills(ctx context.Context, tenantID string, page skills.SkillPageQuery) (skills.Page, error)
- func (s *Store) Version(ctx context.Context, tenantID string, skillID uuid.UUID, version int64) (skills.Version, error)
- func (s *Store) VersionByID(ctx context.Context, tenantID string, id uuid.UUID) (skills.Version, error)
- func (s *Store) VersionContent(ctx context.Context, tenantID string, skillID uuid.UUID, version int64) (skills.Content, error)
- func (s *Store) Versions(ctx context.Context, tenantID string, skillID uuid.UUID, ...) (skills.VersionPage, error)
- func (s *Store) WithVersionDeletion(ctx context.Context, tenantID string, skillID uuid.UUID, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the Skills storage and Reader.
func New ¶
func New(pool *pgunit.Pool, cipher *credentialcrypto.Cipher) *Store
New builds the Skill store. Without a cipher, uploads and content reads fail with credentialcrypto.ErrUnavailable and metadata reads still work.