db

package
v0.0.0-...-a33db15 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBQuerier

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

func NewQuerier

func NewQuerier(conn genericConn) *DBQuerier

func (*DBQuerier) GetSubscriptions

func (q *DBQuerier) GetSubscriptions(ctx context.Context, did string) ([]GetSubscriptionsRow, error)

func (*DBQuerier) InvalidateToken

func (q *DBQuerier) InvalidateToken(ctx context.Context, token string) (pgconn.CommandTag, error)

type GetSubscriptionsRow

type GetSubscriptionsRow struct {
	Token   string `json:"token"`
	Posts   bool   `json:"posts"`
	Reposts bool   `json:"reposts"`
	Replies bool   `json:"replies"`
}

type Querier

type Querier interface {
	GetSubscriptions(ctx context.Context, did string) ([]GetSubscriptionsRow, error)

	InvalidateToken(ctx context.Context, token string) (pgconn.CommandTag, error)
}

Jump to

Keyboard shortcuts

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