Documentation
¶
Index ¶
- func RunMigrations(ctx context.Context, db *sql.DB) error
- type CommentRepo
- func (repo *CommentRepo) Delete(ctx context.Context, id string) error
- func (repo *CommentRepo) Get(ctx context.Context, id string) (*blog.Comment, error)
- func (repo *CommentRepo) Insert(ctx context.Context, comment *blog.Comment) error
- func (repo *CommentRepo) List(ctx context.Context, params *blog.ListCommentsParams) ([]*blog.Comment, error)
- func (repo *CommentRepo) Update(ctx context.Context, comment *blog.Comment) error
- type MediaItemRepo
- func (repo *MediaItemRepo) Delete(ctx context.Context, id string) error
- func (repo *MediaItemRepo) ExistsByFilename(ctx context.Context, filename string) (bool, error)
- func (repo *MediaItemRepo) Get(ctx context.Context, id string) (*media.Item, error)
- func (repo *MediaItemRepo) Insert(ctx context.Context, item *media.Item) error
- func (repo *MediaItemRepo) List(ctx context.Context) ([]*media.Item, error)
- type PasswordResetTokenRepo
- func (repo *PasswordResetTokenRepo) Delete(ctx context.Context, tokenID string) error
- func (repo *PasswordResetTokenRepo) GetByToken(ctx context.Context, tokenStr string) (*authentication.PasswordResetToken, error)
- func (repo *PasswordResetTokenRepo) Insert(ctx context.Context, token *authentication.PasswordResetToken) error
- type PostRepo
- func (repo *PostRepo) Count(ctx context.Context) (int, error)
- func (repo *PostRepo) Delete(ctx context.Context, id string) error
- func (repo *PostRepo) Get(ctx context.Context, id string) (*blog.Post, error)
- func (repo *PostRepo) GetBySlug(ctx context.Context, slug string) (*blog.Post, error)
- func (repo *PostRepo) Insert(ctx context.Context, post *blog.Post) error
- func (repo *PostRepo) List(ctx context.Context, params *blog.ListPostsParams) ([]*blog.Post, error)
- func (repo *PostRepo) SlugExists(ctx context.Context, slug string) (bool, error)
- func (repo *PostRepo) Update(ctx context.Context, post *blog.Post) error
- type SessionRepo
- type UserRepo
- func (repo *UserRepo) ExistsByEmailAddress(ctx context.Context, emailAddress string) (bool, error)
- func (repo *UserRepo) ExistsByUsername(ctx context.Context, username string) (bool, error)
- func (repo *UserRepo) Get(ctx context.Context, id string) (*authentication.User, error)
- func (repo *UserRepo) GetByEmailAddress(ctx context.Context, emailAddress string) (*authentication.User, error)
- func (repo *UserRepo) GetByUsername(ctx context.Context, username string) (*authentication.User, error)
- func (repo *UserRepo) Insert(ctx context.Context, user *authentication.User) error
- func (repo *UserRepo) List(ctx context.Context, params authentication.ListUsersParams) ([]*authentication.User, error)
- func (repo *UserRepo) Update(ctx context.Context, user *authentication.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommentRepo ¶
func (*CommentRepo) List ¶
func (repo *CommentRepo) List( ctx context.Context, params *blog.ListCommentsParams, ) ([]*blog.Comment, error)
type MediaItemRepo ¶
func (*MediaItemRepo) Delete ¶
func (repo *MediaItemRepo) Delete(ctx context.Context, id string) error
func (*MediaItemRepo) ExistsByFilename ¶
type PasswordResetTokenRepo ¶
func (*PasswordResetTokenRepo) Delete ¶
func (repo *PasswordResetTokenRepo) Delete(ctx context.Context, tokenID string) error
func (*PasswordResetTokenRepo) GetByToken ¶
func (repo *PasswordResetTokenRepo) GetByToken( ctx context.Context, tokenStr string, ) (*authentication.PasswordResetToken, error)
func (*PasswordResetTokenRepo) Insert ¶
func (repo *PasswordResetTokenRepo) Insert( ctx context.Context, token *authentication.PasswordResetToken, ) error
type PostRepo ¶
func (*PostRepo) SlugExists ¶
type SessionRepo ¶
func (*SessionRepo) Get ¶
func (repo *SessionRepo) Get(ctx context.Context, id string) (*authentication.Session, error)
func (*SessionRepo) Insert ¶
func (repo *SessionRepo) Insert(ctx context.Context, session *authentication.Session) error
type UserRepo ¶
func (*UserRepo) ExistsByEmailAddress ¶
func (*UserRepo) ExistsByUsername ¶
func (*UserRepo) GetByEmailAddress ¶
func (*UserRepo) GetByUsername ¶
func (*UserRepo) List ¶
func (repo *UserRepo) List(ctx context.Context, params authentication.ListUsersParams) ([]*authentication.User, error)
Click to show internal directories.
Click to hide internal directories.