projectpg

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package projectpg stores Projects and their API keys in PostgreSQL. It implements projects.Storage and projects.Reader.

Index

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
}

func New

func New(pool *pgunit.Pool) *Store

func (*Store) APIKeyDigestExists

func (s *Store) APIKeyDigestExists(ctx context.Context, digest [sha256.Size]byte) (bool, error)

func (*Store) ArchiveProject

func (s *Store) ArchiveProject(ctx context.Context, id string) (projects.Project, error)

func (*Store) CreateProject

func (s *Store) CreateProject(ctx context.Context, project projects.NewProject) (projects.Project, error)

func (*Store) GetProject

func (s *Store) GetProject(ctx context.Context, id string) (projects.Binding, error)

func (*Store) ListAPIKeys

func (s *Store) ListAPIKeys(ctx context.Context, projectID string, query projects.ListQuery) (projects.KeyPage, error)

func (*Store) ListProjects

func (s *Store) ListProjects(ctx context.Context, query projects.ListQuery) (projects.Page, error)

func (*Store) RenameProject

func (s *Store) RenameProject(ctx context.Context, id, name string) (projects.Project, error)

func (*Store) ResolveAPIKey

func (s *Store) ResolveAPIKey(ctx context.Context, digest [sha256.Size]byte) (projects.KeyBinding, error)

func (*Store) RevokeAPIKey

func (s *Store) RevokeAPIKey(ctx context.Context, projectID, keyID string) error

func (*Store) WithKeyIssuance

func (s *Store) WithKeyIssuance(ctx context.Context, projectID string, issue func(projects.KeyIssuanceTx) error) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL