sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationsFS embed.FS

Functions

This section is empty.

Types

type DomainStore

type DomainStore struct {
	// contains filtered or unexported fields
}

DomainStore is a SQLite-backed domain.DomainRepo. Multiple DomainStore instances pointing to the same file share a single *sql.DB.

func NewDomainStore

func NewDomainStore(filePath string) (*DomainStore, error)

NewDomainStore opens (or reuses) the SQLite database at filePath and returns a DomainStore.

func (*DomainStore) Delete

func (s *DomainStore) Delete(ctx context.Context, hostname string) error

Delete implements domain.DomainRepo.

func (*DomainStore) Destruct

func (s *DomainStore) Destruct() error

Destruct implements caddy.Destructor — releases the shared DB connection.

func (*DomainStore) Get

func (s *DomainStore) Get(ctx context.Context, hostname string) (*domain.StoredDomain, error)

Get implements domain.DomainRepo.

func (*DomainStore) Patch

func (s *DomainStore) Patch(ctx context.Context, hostname string, patch domain.DomainPatch) error

Patch implements domain.DomainRepo.

func (*DomainStore) Set

func (s *DomainStore) Set(ctx context.Context, d *domain.Domain) error

Set implements domain.DomainRepo.

func (*DomainStore) UniqueID

func (s *DomainStore) UniqueID() string

UniqueID implements domain.DomainRepo.

type SessionStore

type SessionStore struct {
	// contains filtered or unexported fields
}

SessionStore is a SQLite-backed session.SessionStore. Multiple SessionStore instances pointing to the same file share a single *sql.DB.

func NewSessionStore

func NewSessionStore(filePath string) (*SessionStore, error)

NewSessionStore opens (or reuses) the SQLite database at filePath and returns a SessionStore.

func (*SessionStore) ClearExpired

func (s *SessionStore) ClearExpired() error

ClearExpired implements session.SessionStore.

func (*SessionStore) Destruct

func (s *SessionStore) Destruct() error

Destruct implements caddy.Destructor — releases the shared DB connection.

func (*SessionStore) GetSession

func (s *SessionStore) GetSession(sessionID string) (*pkgsession.Session, error)

GetSession implements session.SessionStore.

func (*SessionStore) RedeemToken

func (s *SessionStore) RedeemToken(signingKey []byte, token string) (*pkgsession.Session, error)

RedeemToken implements session.SessionStore.

func (*SessionStore) StoreSession

func (s *SessionStore) StoreSession(session *pkgsession.Session) error

StoreSession implements session.SessionStore.

Jump to

Keyboard shortcuts

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