Documentation ¶
Index ¶
- func MigrateTable(DB *gorm.DB)
- type Arrangecategories
- type Authstruct
- func (c Authstruct) CheckCategoryGroupName(category TblCategory, userid int, name string, DB *gorm.DB) error
- func (c Authstruct) CheckSubCategoryName(category TblCategory, categoryid []int, currentid int, name string, ...) error
- func (c Authstruct) CreateCategory(category *TblCategory, DB *gorm.DB) error
- func (c Authstruct) DeleteCategoryById(category *TblCategory, categoryId int, DB *gorm.DB) error
- func (c Authstruct) DeleteChannelCategoryids(channelcategory *TblChannelCategory, cid string, DB *gorm.DB) error
- func (c Authstruct) DeleteEntriesCategoryids(cid string, DB *gorm.DB) error
- func (c Authstruct) DeletePopup(category *TblCategory, id int, DB *gorm.DB) (categorylist TblCategory, err error)
- func (c Authstruct) DeleteallCategoryById(category *TblCategory, categoryId []int, spacecatid int, DB *gorm.DB) error
- func (c Authstruct) GetAllParentCategory(categories *[]TblCategory, DB *gorm.DB) error
- func (c Authstruct) GetCategoryById(category *TblCategory, categoryId int, DB *gorm.DB) (categorylist TblCategory, err error)
- func (c Authstruct) GetCategoryDetails(id int, category *TblCategory, DB *gorm.DB) (categorylist TblCategory, err error)
- func (c Authstruct) GetCategoryList(categories []TblCategory, offset int, limit int, filter Filter, DB *gorm.DB) (category []TblCategory, count int64)
- func (c Authstruct) GetCategoryTree(categoryID int, DB *gorm.DB) ([]TblCategory, error)
- func (c Authstruct) GetChildCategoriesById(childCategories *[]TblCategory, parentId int, DB *gorm.DB) error
- func (c Authstruct) GetParentPageCategorys(category *[]TblCategory, parent_id int, DB *gorm.DB) (error, []TblCategory)
- func (c Authstruct) GetSubCategoryList(categories *[]TblCategory, offset int, limit int, filter Filter, parent_id int, ...) (categorylist *[]TblCategory, count int64)
- func (c Authstruct) UpdateCategory(category *TblCategory, DB *gorm.DB) error
- func (c Authstruct) UpdateImagePath(Imagepath string, DB *gorm.DB) error
- type Category
- func (c Category) AddCategory(req CategoryCreate) error
- func (c Category) AllCategoriesWithSubList() (arrangecategories []Arrangecategories, CategoryNames []string)
- func (c Category) CategoryGroupList(limit int, offset int, filter Filter) (Categorylist []TblCategory, categorycount int64, err error)
- func (c Category) CheckCategroyGroupName(id int, name string) (bool, error)
- func (c Category) CheckSubCategroyName(id []int, Currentcategoryid int, name string) (bool, error)
- func (c Category) CreateCategoryGroup(req CategoryCreate) error
- func (c Category) DeleteCategoryGroup(Categoryid int) error
- func (c Category) DeletePopup(categoryid int) (TblCategory, error)
- func (c Category) DeleteSubCategory(categoryid int) error
- func (c Category) FilterSubCategory(limit int, filter Filter, parent_id int) (tblcat []TblCategory, categorycount int64, err error)
- func (c Category) GetSubCategoryDetails(categoryid int) (categorys TblCategory, err error)
- func (c Category) ListCategory(offset int, limit int, filter Filter, parent_id int) (tblcat []TblCategory, category []TblCategory, parentcategory TblCategory, ...)
- func (c Category) UpdateCategoryGroup(req CategoryCreate) error
- func (c Category) UpdateImagePath(ImagePath string) error
- func (c Category) UpdateSubCategory(req CategoryCreate) error
- type CategoryCreate
- type CatgoriesOrd
- type Filter
- type Result
- type TblCategory
- type TblChannelCategory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Arrangecategories ¶
type Arrangecategories struct {
Categories []CatgoriesOrd
}
type Authstruct ¶
type Authstruct struct{}
var C Authstruct
func (Authstruct) CheckCategoryGroupName ¶
func (c Authstruct) CheckCategoryGroupName(category TblCategory, userid int, name string, DB *gorm.DB) error
Check category group name already exists
func (Authstruct) CheckSubCategoryName ¶ added in v1.0.51
func (c Authstruct) CheckSubCategoryName(category TblCategory, categoryid []int, currentid int, name string, DB *gorm.DB) error
Check sub category name already exists
func (Authstruct) CreateCategory ¶
func (c Authstruct) CreateCategory(category *TblCategory, DB *gorm.DB) error
func (Authstruct) DeleteCategoryById ¶
func (c Authstruct) DeleteCategoryById(category *TblCategory, categoryId int, DB *gorm.DB) error
func (Authstruct) DeleteChannelCategoryids ¶ added in v1.0.59
func (c Authstruct) DeleteChannelCategoryids(channelcategory *TblChannelCategory, cid string, DB *gorm.DB) error
func (Authstruct) DeleteEntriesCategoryids ¶ added in v1.0.59
func (c Authstruct) DeleteEntriesCategoryids(cid string, DB *gorm.DB) error
func (Authstruct) DeletePopup ¶
func (c Authstruct) DeletePopup(category *TblCategory, id int, DB *gorm.DB) (categorylist TblCategory, err error)
delete sub category
func (Authstruct) DeleteallCategoryById ¶ added in v1.0.58
func (c Authstruct) DeleteallCategoryById(category *TblCategory, categoryId []int, spacecatid int, DB *gorm.DB) error
func (Authstruct) GetAllParentCategory ¶
func (c Authstruct) GetAllParentCategory(categories *[]TblCategory, DB *gorm.DB) error
func (Authstruct) GetCategoryById ¶
func (c Authstruct) GetCategoryById(category *TblCategory, categoryId int, DB *gorm.DB) (categorylist TblCategory, err error)
getCategory Details
func (Authstruct) GetCategoryDetails ¶
func (c Authstruct) GetCategoryDetails(id int, category *TblCategory, DB *gorm.DB) (categorylist TblCategory, err error)
Get Childern list
func (Authstruct) GetCategoryList ¶
func (c Authstruct) GetCategoryList(categories []TblCategory, offset int, limit int, filter Filter, DB *gorm.DB) (category []TblCategory, count int64)
Parent Category List
func (Authstruct) GetCategoryTree ¶
func (c Authstruct) GetCategoryTree(categoryID int, DB *gorm.DB) ([]TblCategory, error)
func (Authstruct) GetChildCategoriesById ¶
func (c Authstruct) GetChildCategoriesById(childCategories *[]TblCategory, parentId int, DB *gorm.DB) error
func (Authstruct) GetParentPageCategorys ¶
func (c Authstruct) GetParentPageCategorys(category *[]TblCategory, parent_id int, DB *gorm.DB) (error, []TblCategory)
func (Authstruct) GetSubCategoryList ¶
func (c Authstruct) GetSubCategoryList(categories *[]TblCategory, offset int, limit int, filter Filter, parent_id int, flag int, DB *gorm.DB) (categorylist *[]TblCategory, count int64)
Children Category List
func (Authstruct) UpdateCategory ¶
func (c Authstruct) UpdateCategory(category *TblCategory, DB *gorm.DB) error
Update Children list
func (Authstruct) UpdateImagePath ¶ added in v1.0.61
func (c Authstruct) UpdateImagePath(Imagepath string, DB *gorm.DB) error
update imagepath
type Category ¶
type Category struct {
Authority *auth.Authorization
}
this struct holds dbconnection ,token
func (Category) AllCategoriesWithSubList ¶
func (c Category) AllCategoriesWithSubList() (arrangecategories []Arrangecategories, CategoryNames []string)
Get All cateogry with parents and subcategory
func (Category) CategoryGroupList ¶
func (c Category) CategoryGroupList(limit int, offset int, filter Filter) (Categorylist []TblCategory, categorycount int64, err error)
List Category Group
func (Category) CheckCategroyGroupName ¶
func (Category) CheckSubCategroyName ¶ added in v1.0.51
Check Sub category name already exists
func (Category) CreateCategoryGroup ¶
func (c Category) CreateCategoryGroup(req CategoryCreate) error
Add Category Group
func (Category) DeleteCategoryGroup ¶
DeleteCategoryGroup
func (Category) DeletePopup ¶
func (c Category) DeletePopup(categoryid int) (TblCategory, error)
Delete Sub Category
func (Category) DeleteSubCategory ¶
Delete Sub Category
func (Category) FilterSubCategory ¶
func (c Category) FilterSubCategory(limit int, filter Filter, parent_id int) (tblcat []TblCategory, categorycount int64, err error)
Filter Category
func (Category) GetSubCategoryDetails ¶
func (c Category) GetSubCategoryDetails(categoryid int) (categorys TblCategory, err error)
func (Category) ListCategory ¶
func (c Category) ListCategory(offset int, limit int, filter Filter, parent_id int) (tblcat []TblCategory, category []TblCategory, parentcategory TblCategory, categorycount int64, err error)
ListCategory
func (Category) UpdateCategoryGroup ¶
func (c Category) UpdateCategoryGroup(req CategoryCreate) error
UpdateCategoryGroup
func (Category) UpdateImagePath ¶ added in v1.0.61
Remove entries cover image if media image delete
func (Category) UpdateSubCategory ¶
func (c Category) UpdateSubCategory(req CategoryCreate) error
Update Sub category
type CategoryCreate ¶
type CatgoriesOrd ¶
type TblCategory ¶
type TblCategory struct { Id int CategoryName string CategorySlug string Description string ImagePath string CreatedOn time.Time CreatedBy int ModifiedOn time.Time `gorm:"DEFAULT:NULL"` ModifiedBy int `gorm:"DEFAULT:NULL"` IsDeleted int DeletedOn time.Time `gorm:"DEFAULT:NULL"` DeletedBy int `gorm:"DEFAULT:NULL"` ParentId int CreatedDate string `gorm:"-"` ModifiedDate string `gorm:"-"` DateString string `gorm:"-"` ParentCategoryName string `gorm:"-"` Parent []string `gorm:"-"` ParentWithChild []Result `gorm:"-"` }
func GetChildPageCategoriess ¶
func GetChildPageCategoriess(category *TblCategory, category_id int, DB *gorm.DB) (error, TblCategory)
Click to show internal directories.
Click to hide internal directories.