Documentation
¶
Index ¶
- type DB
- func (db *DB) CreateArticle(article types.Article) (string, error)
- func (db *DB) CreateUser(user types.User) (string, error)
- func (db *DB) DeleteArticle(id string) error
- func (db *DB) DeleteUser(id string) error
- func (db *DB) EmailExistsInDatabase(email string) bool
- func (db *DB) FetchArticleByID(id string) (types.Article, error)
- func (db *DB) FetchArticleBySlug(slug string) (types.Article, error)
- func (db *DB) FetchArticles() ([]types.Article, error)
- func (db *DB) FetchArticlesByType(articleType string) ([]types.Article, error)
- func (db *DB) FetchAuth(email string) (types.AuthUser, error)
- func (db *DB) FetchMetaDataBySlug(slug string) (types.Article, error)
- func (db *DB) FetchUserById(id string) (types.User, error)
- func (db *DB) FetchUsers() ([]types.User, error)
- func (db *DB) GetExistingEmail(userID string) (string, error)
- func (db *DB) RegisterUser(user types.RegisterUser) error
- func (db *DB) UniqueEmail(fl validator.FieldLevel) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) DeleteArticle ¶
func (*DB) DeleteUser ¶
func (*DB) EmailExistsInDatabase ¶
EmailExistsInDatabase checks if an email exists in the database
func (*DB) FetchArticleBySlug ¶
func (*DB) FetchArticlesByType ¶
func (*DB) FetchMetaDataBySlug ¶
func (*DB) GetExistingEmail ¶
GetExistingEmail fetches the existing email for a given user ID
func (*DB) RegisterUser ¶
func (db *DB) RegisterUser(user types.RegisterUser) error
func (*DB) UniqueEmail ¶
UniqueEmail is a custom validation function for unique email
Click to show internal directories.
Click to hide internal directories.