Documentation ¶
Index ¶
- func AddFeeds(uid []byte, cookie string, urls ...string) error
- func AddUser(uid, pwd []byte, salt *sec.Salt, nick, email string) error
- func Authenticate(uid, pswd []byte) bool
- func Backup(path string) error
- func Cache(s string) error
- func Console()
- func Debug() []byte
- func DeleteUser(uid []byte) error
- func Exists(uid []byte) bool
- func Feeds(uid []byte) ([]*rss.Feed, error)
- func FeedsToJson(uid []byte, cookie string) ([]byte, error)
- func Login(uid, pswd []byte) (string, time.Time, error)
- func Nickname(uid []byte, cookie string) (string, error)
- func Reader() io.Reader
- func ResetUserFeeds(uid []byte) error
- func Restore(path string) error
- func Salt(email string) *sec.Salt
- func StringToUid(s string) ([]byte, error)
- func UidToString(uid []byte) string
- func UpdateNickname(uid []byte, cookie string, nickname string) error
- func UpdatePassword(uid, pwd, nPwd []byte) error
- func Validate(cookie string, uid []byte) (bool, string, time.Time)
- type AuthenticationError
- type BackupFailure
- type CacheItem
- type Cookie
- type CookieJar
- type Database
- type EmailAlreadyExists
- type RestoreFailure
- type User
- type UserAlreadyExists
- type UserDoesNotExist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFeeds ¶
pushes update to user’s account.
func Update(userID []byte, delta *Delta) error { return nil }
func AddUser ¶
AddUser creates a new user and adds it to the database. It establishes that both the user does not exist and that their email is not in use
func Authenticate ¶
Authenticate checks that the userID and password match.
func DeleteUser ¶
Delete user removes a user from the database provided they exist in the system
func Login ¶
Login logs a user into the system, returning the cookie string Authenticates the user first if user already has a valid cookie, returns that cookie as opposed to creating one
func StringToUid ¶
func UidToString ¶
func UpdateNickname ¶
UpdateNickname updates a users nickname having first established the existence of a user and validated the cookie
func UpdatePassword ¶
UpdatePassword changes the password of a given user
Types ¶
type AuthenticationError ¶
type AuthenticationError struct{}
func (AuthenticationError) Error ¶
func (err AuthenticationError) Error() string
type BackupFailure ¶
type BackupFailure struct{}
func (BackupFailure) Append ¶
func (b BackupFailure) Append(err error) error
func (BackupFailure) Error ¶
func (err BackupFailure) Error() string
type EmailAlreadyExists ¶
type EmailAlreadyExists struct{}
func (EmailAlreadyExists) Error ¶
func (err EmailAlreadyExists) Error() string
type RestoreFailure ¶
type RestoreFailure struct{}
func (RestoreFailure) Append ¶
func (r RestoreFailure) Append(err error) error
func (RestoreFailure) Error ¶
func (err RestoreFailure) Error() string
type UserAlreadyExists ¶
type UserAlreadyExists struct{}
DATABASE ERRORS
func (UserAlreadyExists) Error ¶
func (err UserAlreadyExists) Error() string
type UserDoesNotExist ¶
type UserDoesNotExist struct{}
func (UserDoesNotExist) Error ¶
func (err UserDoesNotExist) Error() string