Documentation ¶
Index ¶
- type Storage
- func (s *Storage) DeletePostByID(ctx context.Context, postID int64) error
- func (s *Storage) DeletePostTagsForPostID(ctx context.Context, postID int64) error
- func (s *Storage) InsertPost(ctx context.Context, title string, slug string, markdown []byte, html []byte, ...) (int64, error)
- func (s *Storage) InsertPostTag(ctx context.Context, postID int64, tagID int64) error
- func (s *Storage) InsertRoleUser(ctx context.Context, roleID int64, userID int64) error
- func (s *Storage) InsertTag(ctx context.Context, name string, slug string, createdAt time.Time, ...) (int64, error)
- func (s *Storage) InsertUser(ctx context.Context, name string, slug string, password string, email string, ...) (int64, error)
- func (s *Storage) RetrieveActiveTheme(ctx context.Context) (string, error)
- func (s *Storage) RetrieveBlog(ctx context.Context) (*structure.Blog, error)
- func (s *Storage) RetrieveHashedPasswordForUser(ctx context.Context, name string) ([]byte, error)
- func (s *Storage) RetrieveNumberOfPosts(ctx context.Context) (int64, error)
- func (s *Storage) RetrieveNumberOfPostsByTag(ctx context.Context, tagID int64) (int64, error)
- func (s *Storage) RetrieveNumberOfPostsByUser(ctx context.Context, userID int64) (int64, error)
- func (s *Storage) RetrievePostByID(ctx context.Context, postID int64) (*structure.Post, error)
- func (s *Storage) RetrievePostBySlug(ctx context.Context, slug string) (*structure.Post, error)
- func (s *Storage) RetrievePostsByTag(ctx context.Context, tagID int64, limit int64, offset int64) ([]structure.Post, error)
- func (s *Storage) RetrievePostsByUser(ctx context.Context, userID int64, limit int64, offset int64) ([]structure.Post, error)
- func (s *Storage) RetrievePostsForApi(ctx context.Context, limit int64, offset int64) ([]structure.Post, error)
- func (s *Storage) RetrievePostsForIndex(ctx context.Context, limit int64, offset int64) ([]structure.Post, error)
- func (s *Storage) RetrieveTag(ctx context.Context, tagID int64) (*structure.Tag, error)
- func (s *Storage) RetrieveTagBySlug(ctx context.Context, slug string) (*structure.Tag, error)
- func (s *Storage) RetrieveTagIDBySlug(ctx context.Context, slug string) (int64, error)
- func (s *Storage) RetrieveTags(ctx context.Context, postID int64) ([]structure.Tag, error)
- func (s *Storage) RetrieveUser(ctx context.Context, userID int64) (*structure.User, error)
- func (s *Storage) RetrieveUserByName(ctx context.Context, name string) (*structure.User, error)
- func (s *Storage) RetrieveUserBySlug(ctx context.Context, slug string) (*structure.User, error)
- func (s *Storage) RetrieveUsersCount(ctx context.Context) int
- func (s *Storage) Tx(ctx context.Context, fn func(ctx context.Context, tx pgx.Tx, s *Storage) error) error
- func (s *Storage) UpdateActiveTheme(ctx context.Context, activeTheme string, updatedAt time.Time, updatedBy int64) error
- func (s *Storage) UpdateLastLogin(ctx context.Context, logInDate time.Time, userID int64) error
- func (s *Storage) UpdatePost(ctx context.Context, postID int64, title string, slug string, markdown []byte, ...) error
- func (s *Storage) UpdateSettings(ctx context.Context, title string, description string, logo string, ...) error
- func (s *Storage) UpdateUser(ctx context.Context, userID int64, name string, slug string, email string, ...) error
- func (s *Storage) UpdateUserPassword(ctx context.Context, userID int64, password string, updatedAt time.Time, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) DeletePostByID ¶
func (*Storage) DeletePostTagsForPostID ¶
func (*Storage) InsertPost ¶
func (*Storage) InsertPostTag ¶
func (*Storage) InsertRoleUser ¶
func (*Storage) InsertUser ¶
func (*Storage) RetrieveActiveTheme ¶
func (*Storage) RetrieveBlog ¶
func (*Storage) RetrieveHashedPasswordForUser ¶
func (*Storage) RetrieveNumberOfPosts ¶
func (*Storage) RetrieveNumberOfPostsByTag ¶
func (*Storage) RetrieveNumberOfPostsByUser ¶
func (*Storage) RetrievePostByID ¶
func (*Storage) RetrievePostBySlug ¶
func (*Storage) RetrievePostsByTag ¶
func (*Storage) RetrievePostsByUser ¶
func (*Storage) RetrievePostsForApi ¶
func (*Storage) RetrievePostsForIndex ¶
func (*Storage) RetrieveTag ¶
func (*Storage) RetrieveTagBySlug ¶
func (*Storage) RetrieveTagIDBySlug ¶
func (*Storage) RetrieveTags ¶
func (*Storage) RetrieveUser ¶
func (*Storage) RetrieveUserByName ¶
RetrieveUserByName Retrieve user by name
func (*Storage) RetrieveUserBySlug ¶
func (*Storage) UpdateActiveTheme ¶
func (*Storage) UpdateLastLogin ¶
func (*Storage) UpdatePost ¶
func (*Storage) UpdateSettings ¶
func (*Storage) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.