Documentation ¶
Index ¶
- func AddArticle(data map[string]interface{}) error
- func CheckAuth(username, password string) (bool, error)
- func CleanAllArticle() error
- func CloseDB()
- func DeleteArticle(id int) error
- func EditArticle(id int, data interface{}) error
- func ExistArticleByID(id int) (bool, error)
- func GetArticleTotal(maps interface{}) (int64, error)
- func Setup(repository *Repository) *gorm.DB
- type Auth
- type Model
- type Project
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddArticle ¶
Addproject add a single article
func EditArticle ¶
Editproject modify a single article
func ExistArticleByID ¶
ExistArticleByID checks if an project exists based on ID
func GetArticleTotal ¶
GetArticleTotal gets the total number of projects based on the constraints
Types ¶
type Project ¶
type Project struct { Model TagID int `json:"tag_id" gorm:"index"` Title string `json:"title"` Desc string `json:"desc"` Content string `json:"content"` CoverImageUrl string `json:"cover_image_url"` CreatedBy string `json:"created_by"` ModifiedBy string `json:"modified_by"` State int `json:"state"` }
func GetProject ¶
GetProject Get a single project based on ID
type Repository ¶
Click to show internal directories.
Click to hide internal directories.