store

package
v0.0.0-...-5346f80 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmailAlreadyInUse is returned when email is already in use
	ErrEmailAlreadyInUse = errors.New("email is already in use")
)

Functions

This section is empty.

Types

type AchievementStore

type AchievementStore interface {
	CreateAchievement(ach *record.Achievement, memberIDs []model.UserID) (*record.Achievement, error)
	GetAchievement(id int64) (*record.Achievement, error)
	ListAchievements(before time.Time, limit int) (aches []*record.Achievement, next time.Time, err error)
	UpdateAchievement(ach *record.Achievement, memberIDs []model.UserID) (*record.Achievement, error)
	UpdateAchievementImage(id int64, filename string) (ach *record.Achievement, old string, err error)
	DeleteAchievement(id int64) error
}

AchievementStore provides achievements

type DepartmentStore

type DepartmentStore interface {
	ListDepartments() ([]*record.Department, error)
	GetDepartment(roleID int64) (*record.Department, error)
}

DepartmentStore accesses department data

type EmailConfirmationStore

type EmailConfirmationStore interface {
	CreateConfirmation(userID model.UserID, email string) (*record.EmailConfirmation, error)
	GetConfirmation(token string) (*record.EmailConfirmation, error)
	ConfirmEmail(c *record.EmailConfirmation) (*record.User, error)
}

EmailConfirmationStore provides email confirmations

type EntryStore

type EntryStore interface {
	ListPublicEntries(before time.Time, limit int) ([]*record.Entry, time.Time, error)
	CreateEntries(blog *record.Blog, feed *gofeed.Feed) (int64, error)
}

EntryStore accesses entry data

type FeedStore

type FeedStore interface {
	GetFeedURL(url string) (string, error)
	IsValidFeedURL(url string) error
	GetFeed(feedURL string) (*gofeed.Feed, error)
}

FeedStore provides feed

type GitHubStore

type GitHubStore interface {
	UpdateContributionDays(c *model.GitHubContributionCollection) ([]*record.GithubContributionDay, error)
	ListContributionCollections(usersLimit int) ([]*model.GitHubContributionCollection, error)
}

GitHubStore provides github data

type HeartbeatStore

type HeartbeatStore interface {
	Beat() error
	GetHeartbeat() error
}

HeartbeatStore accesses worker's heartbeat

type ImageStore

type ImageStore interface {
	CreateImage(image []byte) (filename string, err error)
	DeleteImage(filename string) error
	MigrateImages() error
}

ImageStore provides images

type InvitationStore

type InvitationStore interface {
	ListInvitations() ([]*record.Invitation, error)
	GetInvitation(code string) (*record.Invitation, error)
	CreateInvitation(inviter model.UserID, email string) (*record.Invitation, error)
	DeleteInvitation(id int64) error
}

InvitationStore provides invitations

type PasswordResetStore

type PasswordResetStore interface {
	CreateConfirmation(userID model.UserID, email string) (r *record.PasswordReset, token string, err error)
	GetConfirmation(email, token string) (*record.PasswordReset, error)
	UpdatePassword(reset *record.PasswordReset, password string) error
}

PasswordResetStore provides password resets

type ProfileStore

type ProfileStore interface {
	CreateOrUpdateProfile(userID model.UserID, profile *record.Profile, updateRole bool) error
}

ProfileStore accesses profiles data

type RoleStore

type RoleStore interface {
	ListRoles() ([]*record.Role, error)
	GetRole(roleID int64) (*record.Role, error)
}

RoleStore accesses roles

type SessionStore

type SessionStore interface {
	CreateSession(nameOrEmail, password string) (*model.Session, error)
	GetSession(sessionID string) (*model.Session, error)
	ResetSession(userID model.UserID) (*model.Session, error)
	DeleteSession(sessionID string) error
}

SessionStore accesses sessions

type UserBlogStore

type UserBlogStore interface {
	ListUserBlogs() ([]*record.Blog, error)
	GetUserBlog(blogID int64) (*record.Blog, error)
	CreateUserBlog(blog *record.Blog) error
	UpdateUserBlog(blog *record.Blog) error
	DeleteUserBlog(blogID int64) error
}

UserBlogStore accesses users data

type UserStore

type UserStore interface {
	CreateUser(user *record.User) error
	GetPublicUserByName(name string) (*record.User, error)
	GetUserByName(name string) (*record.User, error)
	GetUserByEmail(email string) (*record.User, error)
	GetUserWithPrivate(userID model.UserID) (*record.User, error)
	ListPublicUsers(subName string, minUserID model.UserID, limit int) ([]*record.User, model.UserID, error)
	ListPrivateUsers(subName string, minUserID model.UserID, limit int) ([]*record.User, model.UserID, error)
	UpdateFullName(userID model.UserID, fullName string) (*record.User, error)
	UpdateIcon(userID model.UserID, filename string) (u *record.User, old string, err error)
}

UserStore accesses users data

Jump to

Keyboard shortcuts

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