Documentation
¶
Index ¶
- Variables
- type DomainStore
- func (s *DomainStore) Delete(ctx context.Context, hostname string) error
- func (s *DomainStore) Destruct() error
- func (s *DomainStore) Get(ctx context.Context, hostname string) (*domain.StoredDomain, error)
- func (s *DomainStore) Patch(ctx context.Context, hostname string, patch domain.DomainPatch) error
- func (s *DomainStore) Set(ctx context.Context, d *domain.Domain) error
- func (s *DomainStore) UniqueID() string
- type SessionStore
- func (s *SessionStore) ClearExpired() error
- func (s *SessionStore) Destruct() error
- func (s *SessionStore) GetSession(sessionID string) (*pkgsession.Session, error)
- func (s *SessionStore) RedeemToken(signingKey []byte, token string) (*pkgsession.Session, error)
- func (s *SessionStore) StoreSession(session *pkgsession.Session) error
Constants ¶
This section is empty.
Variables ¶
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) 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.