Documentation ¶
Index ¶
- Variables
- type PsqlDB
- func (me *PsqlDB) AddUser() (string, error)
- func (me *PsqlDB) AddViewCount(postID string) (int, error)
- func (me *PsqlDB) Close() error
- func (me *PsqlDB) FindAllPosts(page *db.Pager, space string) (*db.Paginate[*db.Post], error)
- func (me *PsqlDB) FindAllUpdatedPosts(page *db.Pager, space string) (*db.Paginate[*db.Post], error)
- func (me *PsqlDB) FindKeysForUser(user *db.User) ([]*db.PublicKey, error)
- func (me *PsqlDB) FindPost(postID string) (*db.Post, error)
- func (me *PsqlDB) FindPostWithFilename(filename string, persona_id string, space string) (*db.Post, error)
- func (me *PsqlDB) FindPosts() ([]*db.Post, error)
- func (me *PsqlDB) FindPostsBeforeDate(date *time.Time, space string) ([]*db.Post, error)
- func (me *PsqlDB) FindPostsForUser(userID string, space string) ([]*db.Post, error)
- func (me *PsqlDB) FindPublicKeyForKey(key string) (*db.PublicKey, error)
- func (me *PsqlDB) FindSiteAnalytics(space string) (*db.Analytics, error)
- func (me *PsqlDB) FindUpdatedPostsForUser(userID string, space string) ([]*db.Post, error)
- func (me *PsqlDB) FindUser(userID string) (*db.User, error)
- func (me *PsqlDB) FindUserForKey(username string, key string) (*db.User, error)
- func (me *PsqlDB) FindUserForName(name string) (*db.User, error)
- func (me *PsqlDB) FindUserForNameAndKey(name string, key string) (*db.User, error)
- func (me *PsqlDB) FindUsers() ([]*db.User, error)
- func (me *PsqlDB) InsertPost(userID string, filename string, title string, text string, description string, ...) (*db.Post, error)
- func (me *PsqlDB) LinkUserKey(userID string, key string) error
- func (me *PsqlDB) RemoveKeys(keyIDs []string) error
- func (me *PsqlDB) RemovePosts(postIDs []string) error
- func (me *PsqlDB) RemoveUsers(userIDs []string) error
- func (me *PsqlDB) SetUserName(userID string, name string) error
- func (me *PsqlDB) UpdatePost(postID string, title string, text string, description string, ...) (*db.Post, error)
- func (me *PsqlDB) ValidateName(name string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var PAGER_SIZE = 15
Functions ¶
This section is empty.
Types ¶
type PsqlDB ¶
type PsqlDB struct { Logger *zap.SugaredLogger Db *sql.DB }
func (*PsqlDB) FindAllPosts ¶
func (*PsqlDB) FindAllUpdatedPosts ¶
func (*PsqlDB) FindKeysForUser ¶
func (*PsqlDB) FindPostWithFilename ¶
func (*PsqlDB) FindPostsBeforeDate ¶
func (*PsqlDB) FindPostsForUser ¶
func (*PsqlDB) FindPublicKeyForKey ¶
func (*PsqlDB) FindSiteAnalytics ¶
func (*PsqlDB) FindUpdatedPostsForUser ¶
func (*PsqlDB) FindUserForKey ¶
func (*PsqlDB) FindUserForNameAndKey ¶
func (*PsqlDB) InsertPost ¶
func (*PsqlDB) RemoveKeys ¶
func (*PsqlDB) RemovePosts ¶
func (*PsqlDB) RemoveUsers ¶
func (*PsqlDB) UpdatePost ¶
func (*PsqlDB) ValidateName ¶
Click to show internal directories.
Click to hide internal directories.