privacy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPrivate = errors.New("user is private")

ErrPrivate is an error returned by Check when the user is in the list.

Functions

This section is empty.

Types

type List

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

List is a List backed by an SQL database.

func Open

func Open(ctx context.Context, db *sqlitex.Pool) (*List, error)

Open opens an existing privacy list in an SQL database.

func (*List) Add

func (l *List) Add(ctx context.Context, user string) error

Add adds a user to the database.

func (*List) Check

func (l *List) Check(ctx context.Context, user string) error

Check checks whether a user is in the database.

func (*List) Remove

func (l *List) Remove(ctx context.Context, user string) error

Remove removes a user from the database.

Jump to

Keyboard shortcuts

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