sqlite

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListDB

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

func OpenListDB

func OpenListDB(connStr string) (*ListDB, error)

func (*ListDB) AddKnowns

func (db *ListDB) AddKnowns(list *ulist.List, addrs []*mailutil.Addr) ([]*mailutil.Addr, error)

func (*ListDB) AddMembers

func (db *ListDB) AddMembers(list *ulist.List, addrs []*mailutil.Addr, receive, moderate, notify, admin bool) ([]*mailutil.Addr, error)

returns addresses which have been added successfully

func (*ListDB) Admins

func (db *ListDB) Admins(list *ulist.List) ([]string, error)

func (*ListDB) AllLists

func (db *ListDB) AllLists() ([]ulist.ListInfo, error)

func (*ListDB) Close

func (db *ListDB) Close() error

func (*ListDB) Create

func (db *ListDB) Create(address, name string) (*ulist.List, error)

CreateList creates a new mailing list with default actions: messages from unknown senders are moderated, all others pass.

func (*ListDB) Delete

func (db *ListDB) Delete(list *ulist.List) error

func (*ListDB) GetList

func (db *ListDB) GetList(listAddress *mailutil.Addr) (*ulist.List, error)

*List can be nil, error is never sql.ErrNoRows

func (*ListDB) GetMembership

func (db *ListDB) GetMembership(list *ulist.List, addr *mailutil.Addr) (ulist.Membership, error)

GetMembership returns whether addr is a member of the list and what permissions she has.

func (*ListDB) IsKnown

func (db *ListDB) IsKnown(list *ulist.List, rawAddress string) (bool, error)

func (*ListDB) IsList

func (db *ListDB) IsList(address *mailutil.Addr) (bool, error)

func (*ListDB) IsMember

func (db *ListDB) IsMember(list *ulist.List, addr *mailutil.Addr) (bool, error)

list and addr can be nil

func (*ListDB) Knowns

func (db *ListDB) Knowns(list *ulist.List) ([]string, error)

func (*ListDB) Members

func (db *ListDB) Members(list *ulist.List) ([]ulist.Membership, error)

func (*ListDB) Memberships

func (db *ListDB) Memberships(member *ulist.Addr) ([]ulist.Membership, error)

func (*ListDB) Notifieds

func (db *ListDB) Notifieds(list *ulist.List) ([]string, error)

func (*ListDB) PublicLists

func (db *ListDB) PublicLists() ([]ulist.ListInfo, error)

func (*ListDB) Receivers

func (db *ListDB) Receivers(list *ulist.List) ([]string, error)

func (*ListDB) RemoveKnowns

func (db *ListDB) RemoveKnowns(list *ulist.List, addrs []*mailutil.Addr) ([]*mailutil.Addr, error)

func (*ListDB) RemoveMembers

func (db *ListDB) RemoveMembers(list *ulist.List, addrs []*mailutil.Addr) ([]*mailutil.Addr, error)

func (*ListDB) Update

func (db *ListDB) Update(list *ulist.List, display string, publicSignup, hideFrom bool, actionMod, actionMember, actionKnown, actionUnknown ulist.Action) error

func (*ListDB) UpdateMember

func (db *ListDB) UpdateMember(list *ulist.List, rawAddress string, receive, moderate, notify, admin bool) error

type UserDB

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

func OpenUserDB

func OpenUserDB(connStr string) (*UserDB, error)

func (*UserDB) Authenticate

func (db *UserDB) Authenticate(username, password string) (bool, error)

func (*UserDB) Available

func (db *UserDB) Available() bool

func (*UserDB) Close

func (db *UserDB) Close() error

func (*UserDB) Name added in v0.13.2

func (db *UserDB) Name() string

Jump to

Keyboard shortcuts

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