lms

package
v1.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateTable

func MigrateTable(db *gorm.DB) error

Types

type Arrangecategories

type Arrangecategories struct {
	Categories []CatgoriesOrd
}

type Authstruct added in v1.0.84

type Authstruct struct{}
var C Authstruct

func (Authstruct) CheckSpaceCategoryGroupName added in v1.0.88

func (c Authstruct) CheckSpaceCategoryGroupName(category TblSpaceCategory, userid int, name string, DB *gorm.DB) error

Check category group name already exists

func (Authstruct) CheckSubCategoryName added in v1.0.88

func (c Authstruct) CheckSubCategoryName(category TblSpaceCategory, categoryid []int, currentid int, name string, DB *gorm.DB) error

Check sub category name already exists

func (Authstruct) CreateSpaceCategory added in v1.0.86

func (c Authstruct) CreateSpaceCategory(category *TblSpaceCategory, DB *gorm.DB) error

Create Space Category

func (Authstruct) DeleteCategoryById added in v1.0.88

func (c Authstruct) DeleteCategoryById(category *TblSpaceCategory, categoryId int, DB *gorm.DB) error

Delete Sub Category

func (Authstruct) DeleteallCategoryById added in v1.0.86

func (c Authstruct) DeleteallCategoryById(category *TblSpaceCategory, categoryId []int, spacecatid int, DB *gorm.DB) error

func (Authstruct) GetAllParentCategory added in v1.0.88

func (c Authstruct) GetAllParentCategory(categories *[]TblSpaceCategory, DB *gorm.DB) error

func (Authstruct) GetCategoryById added in v1.0.88

func (c Authstruct) GetCategoryById(category *TblSpaceCategory, categoryId int, DB *gorm.DB) (categorylist TblSpaceCategory, err error)

getCategory Details

func (Authstruct) GetCategoryDetails added in v1.0.88

func (c Authstruct) GetCategoryDetails(id int, category *TblSpaceCategory, DB *gorm.DB) (categorylist TblSpaceCategory, err error)

Get Childern list

func (Authstruct) GetCategoryTree added in v1.0.86

func (c Authstruct) GetCategoryTree(categoryID int, DB *gorm.DB) ([]TblSpaceCategory, error)

func (Authstruct) GetSpaceCategoryList added in v1.0.84

func (c Authstruct) GetSpaceCategoryList(categories []TblSpaceCategory, offset int, limit int, filter Filter, DB *gorm.DB) (category []TblSpaceCategory, count int64)

Parent Category List

func (Authstruct) GetSubSpaceCategoryList added in v1.0.88

func (c Authstruct) GetSubSpaceCategoryList(categories *[]TblSpaceCategory, offset int, limit int, filter Filter, parent_id int, flag int, DB *gorm.DB) (categorylist *[]TblSpaceCategory, count int64)

Children Category List

func (Authstruct) SpaceCategoryDeletePopup added in v1.0.88

func (c Authstruct) SpaceCategoryDeletePopup(category *TblSpaceCategory, id int, DB *gorm.DB) (categorylist TblSpaceCategory, err error)

delete sub category modal

func (Authstruct) UpdateCategory added in v1.0.86

func (c Authstruct) UpdateCategory(category *TblSpaceCategory, DB *gorm.DB) error

Update Children list

func (Authstruct) UpdateImagePath added in v1.0.88

func (c Authstruct) UpdateImagePath(Imagepath string, DB *gorm.DB) error

update imagepath

type CategoryCreate added in v1.0.86

type CategoryCreate struct {
	Id           int
	CategoryName string
	CategorySlug string
	Description  string
	ImagePath    string
	ParentId     int
}

type CatgoriesOrd

type CatgoriesOrd struct {
	Id       int
	Category string
}

type Filter

type Filter struct {
	Keyword    string
	CategoryId int
}

type HighlightsReq

type HighlightsReq struct {
	Pageid       int
	Content      string
	Start        int
	Offset       int
	SelectPara   string
	ContentColor string
}

type MemberPage

type MemberPage struct {
	MemAuth *authcore.Authorization
}

this struct holds dbconnection ,token for weblms

func (MemberPage) GetHighlights

func (m MemberPage) GetHighlights(pageid int) ([]TblMemberNotesHighlight, error)

Get Page content - PAGE VIEW

func (MemberPage) GetNotes

func (m MemberPage) GetNotes(pageid int) ([]TblMemberNotesHighlight, error)

Get Page content - PAGE VIEW

func (MemberPage) GetPageContent

func (m MemberPage) GetPageContent(pageid int) (TblPageAliases, error)

Get Page content - PAGE VIEW

func (MemberPage) MemberPageList

func (p MemberPage) MemberPageList(spaceid int) ([]PageGroups, []Pages, []SubPages, error)

list page

func (MemberPage) RemoveHighlightsandNotes

func (m MemberPage) RemoveHighlightsandNotes(Id int) (flg bool, err error)

Remove Highlights

func (MemberPage) UpdateHighlights

func (m MemberPage) UpdateHighlights(highreq HighlightsReq) (flg bool, err error)

Update Highlights

func (MemberPage) UpdateNotes

func (m MemberPage) UpdateNotes(pageid int, content string) (flg bool, err error)

Update Notes

type MemberSpace

type MemberSpace struct {
	MemAuth *authcore.Authorization
}

this struct holds dbconnection ,token for weblms

func (MemberSpace) MemberSpaceList

func (s MemberSpace) MemberSpaceList(limit, offset int, filter Filter) (tblspace []TblSpacesAliases, totalcount int64, err error)

spacelist

type MetaDetails

type MetaDetails struct {
	MetaTitle       string
	MetaDescription string
	Keywords        string
	Slug            string
}

type Page

type Page struct {
	Authority *authcore.Authorization
}

this struct holds dbconnection ,token

func (Page) InsertPage1

func (p Page) InsertPage1(Pagec PageCreate) error

Create page

func (Page) PageAliasesLog

func (p Page) PageAliasesLog(spaceid int) (log []PageLog, err error)

Get Page log

func (Page) PageList

func (p Page) PageList(spaceid int) ([]PageGroups, []Pages, []SubPages, error)

list page

type PageCreate

type PageCreate struct {
	SpaceId       int          //spaceid
	NewPages      []Pages      //pages only
	NewGroup      []PageGroups //groups only
	NewSubPage    []SubPages   //subpages only
	UpdatePages   []Pages      //pages only
	UpdateGroup   []PageGroups //groups only
	UpdateSubPage []SubPages   //subpages only
	DeletePages   []Pages      //delete pages only
	DeleteGroup   []PageGroups //delete groups only
	DeleteSubPage []SubPages   //delete subpages only
	Status        string       //publish,draft
}

type PageGroups

type PageGroups struct {
	GroupId    int
	NewGroupId int
	Name       string
	OrderIndex int `json:"OrderIndex"`
}

type PageLog

type PageLog struct {
	Username string
	Status   string
	Date     time.Time
}

type PageStrut

type PageStrut struct{}
var PG PageStrut

func (PageStrut) CheckGroupExists

func (P PageStrut) CheckGroupExists(tblgroup *TblPagesGroup, id int, spaceid int, DB *gorm.DB) error

Check if groupexist

func (PageStrut) CheckPageExists

func (P PageStrut) CheckPageExists(tblpage *TblPage, pageid int, spaceid int, DB *gorm.DB) error

Check if page exists

func (PageStrut) CreatePage

func (P PageStrut) CreatePage(tblpage *TblPage, DB *gorm.DB) (*TblPage, error)

CreatePage

func (PageStrut) CreatePageGroup

func (P PageStrut) CreatePageGroup(tblpagegroup *TblPagesGroup, DB *gorm.DB) (*TblPagesGroup, error)

func (PageStrut) CreatePageGroupAliases

func (P PageStrut) CreatePageGroupAliases(tblpagegroup *TblPagesGroupAliases, DB *gorm.DB) error

Create PagegroupAliases

func (PageStrut) Createpage

func (P PageStrut) Createpage(tblpage *TblPage, DB *gorm.DB) error

create page

func (PageStrut) CreatepageAliases

func (P PageStrut) CreatepageAliases(tblpageAliases *TblPageAliases, DB *gorm.DB) error

create PageAliases

func (PageStrut) DeletePage

func (P PageStrut) DeletePage(tblpage *TblPage, id int, DB *gorm.DB) error

Delete PageAliases

func (PageStrut) DeletePageAliase

func (P PageStrut) DeletePageAliase(tblpage *TblPageAliases, id int, DB *gorm.DB) error

Delete PageAliases

func (PageStrut) DeletePageAliases

func (P PageStrut) DeletePageAliases(tblpageAliases *TblPageAliases, id int, DB *gorm.DB) error

Delete Page

func (PageStrut) DeletePageGroup

func (P PageStrut) DeletePageGroup(tblpagegroup *TblPagesGroup, id int, DB *gorm.DB) error

Delete group

func (PageStrut) DeletePageGroupAliases

func (P PageStrut) DeletePageGroupAliases(tblpagegroup *TblPagesGroupAliases, id int, DB *gorm.DB) error

Delete Groupaliases

func (PageStrut) GetContentByPageId

func (P PageStrut) GetContentByPageId(tblpage *TblPageAliases, id int, DB *gorm.DB) error

Get Content

func (PageStrut) GetHighlights

func (p PageStrut) GetHighlights(notes *[]TblMemberNotesHighlight, memberid int, pageid int, DB *gorm.DB) error

GET NOTES

func (PageStrut) GetNotes

func (p PageStrut) GetNotes(notes *[]TblMemberNotesHighlight, memberid int, pageid int, DB *gorm.DB) error

GET NOTES

func (PageStrut) GetPageDataByName

func (P PageStrut) GetPageDataByName(TblPageAliases *TblPageAliases, spaceid int, name string, DB *gorm.DB) error

GetPage

func (PageStrut) GetPageGroupByName

func (P PageStrut) GetPageGroupByName(TblPagesGroupAliases *TblPagesGroupAliases, spaceid int, name string, DB *gorm.DB) error

PageGroup

func (PageStrut) GetPageLogDetails

func (P PageStrut) GetPageLogDetails(tblpagelog *[]TblPageAliasesLog, spaceid int, DB *gorm.DB) error

Get page log

func (PageStrut) GetPageLogDetailsByPageId

func (P PageStrut) GetPageLogDetailsByPageId(tblpagelog *[]TblPageAliasesLog, spaceid int, pageid int, DB *gorm.DB) error

Get page log

func (PageStrut) MemberRestrictActive

func (P PageStrut) MemberRestrictActive(Mod *auth.TblModule, DB *gorm.DB) error

func (PageStrut) PageAliases

func (P PageStrut) PageAliases(tblpagegroup *TblPageAliases, id int, DB *gorm.DB) error

func (PageStrut) PageAliasesLog

func (P PageStrut) PageAliasesLog(tblpagelog *TblPageAliasesLog, DB *gorm.DB) error

Create page log

func (PageStrut) PageGroup

func (P PageStrut) PageGroup(tblpagegroup *TblPagesGroupAliases, id int, DB *gorm.DB) error

func (PageStrut) RemoveHighlights

func (P PageStrut) RemoveHighlights(high *TblMemberNotesHighlight, DB *gorm.DB) error

Remove Highligts

func (PageStrut) SelectGroup

func (P PageStrut) SelectGroup(tblgroup *[]TblPagesGroup, id int, grpid []int, DB *gorm.DB) error

func (PageStrut) SelectPage

func (P PageStrut) SelectPage(tblpage *[]TblPage, id int, pgid []int, DB *gorm.DB) error

func (PageStrut) UpdateNotesHighlights

func (p PageStrut) UpdateNotesHighlights(notes *TblMemberNotesHighlight, contype string, DB *gorm.DB) error

Insert Notes

func (PageStrut) UpdatePage

func (P PageStrut) UpdatePage(tblpage *TblPage, pageid int, DB *gorm.DB) error

update page

func (PageStrut) UpdatePageAliase

func (P PageStrut) UpdatePageAliase(tblpageali *TblPageAliases, pageid int, DB *gorm.DB) error

update pagealiases

func (PageStrut) UpdatePageAliasePublishStatus

func (P PageStrut) UpdatePageAliasePublishStatus(pageid []int, userid int, DB *gorm.DB) error

update pagealiases

func (PageStrut) UpdatePageGroup

func (P PageStrut) UpdatePageGroup(tblpagegroup *TblPagesGroup, id int, DB *gorm.DB) error

Update pagegroup

func (PageStrut) UpdatePageGroupAliases

func (P PageStrut) UpdatePageGroupAliases(tblpagegroup *TblPagesGroupAliases, id int, DB *gorm.DB) error

pdate pagegroupAliases

type Pages

type Pages struct {
	PgId        int
	NewPgId     int
	Name        string
	Content     string `json:"Content"`
	Pgroupid    int
	NewGrpId    int
	OrderIndex  int `json:"OrderIndex"`
	ParentId    int
	ReadTime    int
	CreatedDate time.Time
	LastUpdate  time.Time
	Status      string
	Date        string
	Username    string
	Log         []PageLog
}

type Result added in v1.0.84

type Result struct {
	CategoryName string
}

type SPM

type SPM struct{}
var (
	SP SPM

	SpecialToken = "%$HEID$#PDGH*&MGEAFCC"
)

func (SPM) AddViewCount added in v1.0.73

func (SP SPM) AddViewCount(id, memberid int, DB *gorm.DB) error

func (SPM) AliasesInParentId

func (SP SPM) AliasesInParentId(data *TblPageAliases, parentid int, spacid int, DB *gorm.DB) error

func (SPM) CheckSpaceName

func (SP SPM) CheckSpaceName(space *TblSpacesAliases, userid int, name string, DB *gorm.DB) error

Name already exists

func (SPM) ClonePage

func (SP SPM) ClonePage(page *TblPage, DB *gorm.DB) (*TblPage, error)

func (SPM) ClonePages

func (SP SPM) ClonePages(pages *TblPageAliases, DB *gorm.DB) error

func (SPM) ClonePagesGroup

func (SP SPM) ClonePagesGroup(pagegroup *TblPagesGroupAliases, DB *gorm.DB) error

func (SPM) CloneSpaceInPagesGroup

func (SP SPM) CloneSpaceInPagesGroup(group *TblPagesGroup, DB *gorm.DB) (*TblPagesGroup, error)

func (SPM) CreateSpace

func (SP SPM) CreateSpace(tblspaces *TblSpaces, DB *gorm.DB) (*TblSpaces, error)

Create Space

func (SPM) CreateSpacesAliases

func (SP SPM) CreateSpacesAliases(tblspace *TblSpacesAliases, DB *gorm.DB) error

Create space

func (SPM) DeletePageAliInSpace

func (SP SPM) DeletePageAliInSpace(pageali *TblPageAliases, id []int, DB *gorm.DB) error

func (SPM) DeletePageGroup

func (SP SPM) DeletePageGroup(tblpage *TblPagesGroup, spaceid int, DB *gorm.DB) error

func (SPM) DeletePageGroupAliases

func (SP SPM) DeletePageGroupAliases(tblpageali *TblPagesGroupAliases, id int, DB *gorm.DB) error

delete page group aliases

func (SPM) DeletePageInSpace

func (SP SPM) DeletePageInSpace(page *TblPage, id []int, DB *gorm.DB) error

func (SPM) DeleteSpace

func (SP SPM) DeleteSpace(tblspace *TblSpaces, id int, DB *gorm.DB) error

Deleted space

func (SPM) DeleteSpaceAliases

func (SP SPM) DeleteSpaceAliases(tblspace *TblSpacesAliases, id int, DB *gorm.DB) error

Deleted space

func (SPM) EditSpace

func (SP SPM) EditSpace(tblspace *TblSpacesAliases, id int, DB *gorm.DB) error

Update Space

func (SPM) GetCategoryByParentId added in v1.0.74

func (SP SPM) GetCategoryByParentId(DB *gorm.DB, categoryId int) (category categories.TblCategory, err error)

func (SPM) GetChildPageCategories

func (SP SPM) GetChildPageCategories(pagecategory *[]TblPagesCategoriesAliases, parent_id int, DB *gorm.DB) ([]TblPagesCategoriesAliases, error)

func (SPM) GetDefaultLanguage

func (SP SPM) GetDefaultLanguage(default_lang *TblLanguage, DB *gorm.DB) error

get default lang id

func (SPM) GetDetailsInPageAli

func (SP SPM) GetDetailsInPageAli(pagedetails *TblPagesGroupAliases, groupname string, spaceid int, DB *gorm.DB) error

func (SPM) GetDetailsInPageAlia

func (SP SPM) GetDetailsInPageAlia(pageid *TblPagesGroupAliases, pagegroupid int, spaceid int, DB *gorm.DB) error

func (SPM) GetGraphqlPagegroupsUnderSpace added in v1.0.76

func (SP SPM) GetGraphqlPagegroupsUnderSpace(db *gorm.DB, memberid, spaceId int) (pagegroups []TblPagesGroupAliases, err error)

func (SPM) GetGraphqlPagesUnderSpace added in v1.0.76

func (SP SPM) GetGraphqlPagesUnderSpace(db *gorm.DB, memberid, spaceId int) (pages []TblPageAliases, err error)

func (SPM) GetGraphqlSubpagesUnderSpace added in v1.0.76

func (SP SPM) GetGraphqlSubpagesUnderSpace(db *gorm.DB, memberid, spaceId int) (subpages []TblPageAliases, err error)

func (SPM) GetIdInPage

func (SP SPM) GetIdInPage(pageid *TblPagesGroupAliases, spaceid int, DB *gorm.DB) error

func (SPM) GetLastUpdatePageAliases

func (SP SPM) GetLastUpdatePageAliases(tblpageali *TblPageAliases, spaceid int, DB *gorm.DB) error

get last update

func (SPM) GetPageAliasesInPage

func (SP SPM) GetPageAliasesInPage(data *[]TblPageAliases, spacid int, DB *gorm.DB) error

func (SPM) GetPageAliasesInPageData

func (SP SPM) GetPageAliasesInPageData(result *[]TblPageAliases, spacid int, DB *gorm.DB) error

func (SPM) GetPageCategoryTree

func (SP SPM) GetPageCategoryTree(id int, DB *gorm.DB) ([]TblPagesCategoriesAliases, error)

func (SPM) GetPageData

func (SP SPM) GetPageData(page *[]TblPageAliases, id int, DB *gorm.DB) error

func (SPM) GetPageDetailsBySpaceId

func (SP SPM) GetPageDetailsBySpaceId(getpg *[]TblPage, id int, DB *gorm.DB) (*[]TblPage, error)

func (SPM) GetPageGroupData

func (SP SPM) GetPageGroupData(group *[]TblPagesGroupAliases, id int, DB *gorm.DB) error

func (SPM) GetPageGroupDetailsBySpaceId

func (SP SPM) GetPageGroupDetailsBySpaceId(getpagegrp *[]TblPagesGroup, id int, DB *gorm.DB) (*[]TblPagesGroup, error)

get pagegroup data by pass spaceid

func (SPM) GetPageInPage

func (SP SPM) GetPageInPage(pageid *[]TblPageAliases, spaceid int, DB *gorm.DB) error

func (SPM) GetParentPageCategory

func (SP SPM) GetParentPageCategory(pagecategory *TblPagesCategoriesAliases, page_category_id int, DB *gorm.DB) (TblPagesCategoriesAliases, error)

func (SPM) GetSpaceDetails

func (SP SPM) GetSpaceDetails(tblspace *TblSpaces, id int, DB *gorm.DB) error

func (SPM) GetSpaceName

func (SP SPM) GetSpaceName(TblSpacesAliases *TblSpacesAliases, spaceid int, DB *gorm.DB) error

spacename

func (SPM) GetSpacesData

func (SP SPM) GetSpacesData(spaces *[]TblSpaces, id int, DB *gorm.DB) error

Category based space list

func (SPM) GraphqlSpaceDetails added in v1.0.76

func (SP SPM) GraphqlSpaceDetails(db *gorm.DB, memberid, spaceId int, spaceslug string) (space TblSpacesAliases, err error)

func (SPM) GraphqlSpacelist added in v1.0.74

func (SP SPM) GraphqlSpacelist(db *gorm.DB, memberid, limit, offset int, categoriesID *int) (spacelist []TblSpacesAliases, count int64, err error)

func (SPM) LastLoopAliasesInPage

func (SP SPM) LastLoopAliasesInPage(data *TblPageAliases, pagetitle string, spacid int, DB *gorm.DB) error

func (SPM) MemberSpaceList

func (SP SPM) MemberSpaceList(tblspace *[]TblSpacesAliases, langId int, limit int, offset int, filter Filter, DB *gorm.DB) (spacecount int64, err error)

spaceList

func (SPM) MostlyViewList added in v1.0.72

func (SP SPM) MostlyViewList(Space *[]TblSpacesAliases, limit int, DB *gorm.DB) (err error)

func (SPM) NewpageCount

func (SP SPM) NewpageCount(DB *gorm.DB) (count int64, err error)

func (SPM) PageCount

func (SP SPM) PageCount(DB *gorm.DB) (count int64, err error)

func (SPM) PageParentCategoryList

func (SP SPM) PageParentCategoryList(pagecategory *[]TblPagesCategoriesAliases, DB *gorm.DB) error

func (SPM) ParentWithChild

func (SP SPM) ParentWithChild(parent *TblPage, id int, spaceid int, DB *gorm.DB) error

func (SPM) PublishPageSpaceList

func (SP SPM) PublishPageSpaceList(tblspace *[]TblSpacesAliases, langId int, limit int, offset int, filter Filter, cid []int, DB *gorm.DB) (spacecount int64, err error)

func (SPM) RecentlyViewList added in v1.0.72

func (SP SPM) RecentlyViewList(Space *[]TblSpacesAliases, limit int, DB *gorm.DB) (err error)

func (SPM) SpaceDeletePageGroup

func (SP SPM) SpaceDeletePageGroup(tblpage *TblPagesGroup, id int, DB *gorm.DB) error

delete page group

func (SPM) SpaceList

func (SP SPM) SpaceList(tblspace *[]TblSpacesAliases, langId int, limit int, offset int, filter Filter, spaceid []int, DB *gorm.DB) (spacecount int64, err error)

spaceList

func (SPM) UpdateImagePath

func (SP SPM) UpdateImagePath(Imagepath string, DB *gorm.DB) error

update imagepath

func (SPM) UpdateSpace

func (SP SPM) UpdateSpace(tblspace *TblSpaces, id int, DB *gorm.DB) error

Update Space

type Space

type Space struct {
	Authority *authcore.Authorization
}

this struct holds dbconnection ,token

func (Space) AddViewCount added in v1.0.73

func (s Space) AddViewCount(spaceid, memberid int) (err error)

func (Space) CheckSpaceName

func (s Space) CheckSpaceName(id int, name string) (bool, error)

Check Name is already exits or not

func (Space) CloneSpace

func (s Space) CloneSpace(SPC SpaceCreation, clonespaceid int) error

func (Space) DashboardPagesCount

func (s Space) DashboardPagesCount() (totalcount int, lasttendayscount int, err error)

Dashboard pagescount function

func (Space) DeleteSpace

func (s Space) DeleteSpace(spaceid int) error

Delete Space

func (Space) GetGraphqlSpaceDetails added in v1.0.76

func (s Space) GetGraphqlSpaceDetails(SpaceId int, spaceslug string, pathUrl string) (space TblSpacesAliases, err error)

func (Space) GetGraphqlSpacelist added in v1.0.74

func (s Space) GetGraphqlSpacelist(limit, offset int, pathUrl string, categoriesID *int) (spacelist []TblSpacesAliases, count int64, err error)

func (Space) GetPagesAndPagegroupsUnderSpace added in v1.0.76

func (s Space) GetPagesAndPagegroupsUnderSpace(spaceId int) (pages []TblPageAliases, subpages []TblPageAliases, pagegroups []TblPagesGroupAliases, err error)

func (Space) GetPublishedSpaces

func (s Space) GetPublishedSpaces(limit int, offset int, filter Filter, languageid int) (spacedetails []TblSpacesAliases, err error)

Get Published spaces

func (Space) MostlyViewList added in v1.0.72

func (s Space) MostlyViewList(limit int) (spacedetails []TblSpacesAliases, err error)

func (Space) PageCategoryList

func (s Space) PageCategoryList() []Arrangecategories

func (Space) RecentlyViewList added in v1.0.72

func (s Space) RecentlyViewList(limit int) (spacedetails []TblSpacesAliases, err error)

func (Space) RemoveSpaceImage

func (s Space) RemoveSpaceImage(ImagePath string) (err error)

Remove entries cover image if media image delete

func (Space) SpaceCreation

func (s Space) SpaceCreation(SPC SpaceCreation) error

create space

func (Space) SpaceDetail

func (s Space) SpaceDetail(spaceid int) (space TblSpaces, err error)

SpaceDetail

func (Space) SpaceList

func (s Space) SpaceList(limit, offset int, filter Filter) (tblspace []TblSpacesAliases, totalcount int64, err error)

spacelist

func (Space) SpaceUpdate

func (s Space) SpaceUpdate(SPC SpaceCreation, spaceid int) error

update space

type SpaceCategory added in v1.0.84

type SpaceCategory struct {
	Authority *auth.Authorization
}

this struct holds dbconnection ,token

func (SpaceCategory) AddCategory added in v1.0.88

func (c SpaceCategory) AddCategory(req CategoryCreate) error

Add Category

func (SpaceCategory) AllCategoriesWithSubList added in v1.0.88

func (c SpaceCategory) AllCategoriesWithSubList() (arrangecategories []Arrangecategories, CategoryNames []string)

Get All cateogry with parents and subcategory

func (SpaceCategory) CategorySpaceGroupList added in v1.0.86

func (c SpaceCategory) CategorySpaceGroupList(limit int, offset int, filter Filter) (Categorylist []TblSpaceCategory, categorycount int64, err error)

List Category Group

func (SpaceCategory) CheckCategroyGroupName added in v1.0.88

func (c SpaceCategory) CheckCategroyGroupName(id int, name string) (bool, error)

func (SpaceCategory) CheckSubCategroyName added in v1.0.88

func (c SpaceCategory) CheckSubCategroyName(id []int, Currentcategoryid int, name string) (bool, error)

Check Sub category name already exists

func (SpaceCategory) CreateCategoryGroup added in v1.0.86

func (c SpaceCategory) CreateCategoryGroup(req CategoryCreate) error

Add Category Group

func (SpaceCategory) DeleteCategoryGroup added in v1.0.86

func (c SpaceCategory) DeleteCategoryGroup(Categoryid int) error

DeleteCategoryGroup

func (SpaceCategory) DeletePopup added in v1.0.88

func (c SpaceCategory) DeletePopup(categoryid int) (TblSpaceCategory, error)

Delete Sub Category

func (SpaceCategory) DeleteSubCategory added in v1.0.88

func (c SpaceCategory) DeleteSubCategory(categoryid int) error

Delete Sub Category

func (SpaceCategory) GetParentGivenByChildId added in v1.0.88

func (c SpaceCategory) GetParentGivenByChildId(childcategoryid string) (category []TblSpaceCategory, err error)

this func helps to get parent hierarcy by child id

func (SpaceCategory) GetSubCategoryDetails added in v1.0.88

func (c SpaceCategory) GetSubCategoryDetails(categoryid int) (categorys TblSpaceCategory, err error)

func (SpaceCategory) ListCategory added in v1.0.88

func (c SpaceCategory) ListCategory(offset int, limit int, filter Filter, parent_id int) (tblcat []TblSpaceCategory, category []TblSpaceCategory, parentcategory TblSpaceCategory, categorycount int64, err error)

ListCategory

func (SpaceCategory) UpdateCategoryGroup added in v1.0.86

func (c SpaceCategory) UpdateCategoryGroup(req CategoryCreate) error

UpdateCategoryGroup

func (SpaceCategory) UpdateImagePath added in v1.0.88

func (c SpaceCategory) UpdateImagePath(ImagePath string) error

Remove entries cover image if media image delete

func (SpaceCategory) UpdateSubCategory added in v1.0.88

func (c SpaceCategory) UpdateSubCategory(req CategoryCreate) error

Update Sub category

type SpaceCreation

type SpaceCreation struct {
	Name        string
	Description string
	ImagePath   string
	CategoryId  int //child category id
	LanguageId  int //For specific language space
}

type SubPages

type SubPages struct {
	SpgId       int
	NewSpId     int
	Name        string
	Content     string
	ParentId    int
	NewParentId int
	PgroupId    int
	NewPgroupId int
	ReadTime    int
	OrderIndex  int `json:"OrderIndex"`
	CreatedDate time.Time
	LastUpdate  time.Time
	Status      string
	Date        string
	Username    string
	Log         []PageLog
}

type TblLanguage

type TblLanguage struct {
	Id           int    `gorm:"primaryKey;auto_increment"`
	LanguageName string `gorm:"type:character varying"`
	LanguageCode string `gorm:"type:character varying"`
	CreatedOn    time.Time
	CreatedBy    int       `gorm:"type:integer"`
	ModifiedOn   time.Time `gorm:"DEFAULT:NULL"`
	ModifiedBy   int       `gorm:"DEFAULT:NULL"`
	DeletedOn    time.Time `gorm:"DEFAULT:NULL"`
	DeletedBy    int       `gorm:"DEFAULT:NULL"`
	IsDeleted    int       `gorm:"DEFAULT:0"`
	ImagePath    string    `gorm:"type:character varying"`
	IsStatus     int       `gorm:"type:integer"`
	IsDefault    int       `gorm:"type:integer"`
	JsonPath     string    `gorm:"type:character varying"`
}

type TblMemberNotesHighlight

type TblMemberNotesHighlight struct {
	Id                      int               `gorm:"primaryKey;auto_increment"`
	MemberId                int               `gorm:"type:integer"`
	PageId                  int               `gorm:"type:integer"`
	NotesHighlightsContent  string            `gorm:"type:character varying"`
	NotesHighlightsType     string            `gorm:"type:character varying"`
	HighlightsConfiguration datatypes.JSONMap `gorm:"type:jsonb"`
	CreatedBy               int               `gorm:"type:integer"`
	CreatedOn               time.Time         `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedOn              time.Time         `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy              int               `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn               time.Time         `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy               int               `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted               int               `gorm:"type:integer"`
}

type TblPage

type TblPage struct {
	Id          int       `gorm:"primaryKey;auto_increment"`
	SpacesId    int       `gorm:"type:integer"`
	PageGroupId int       `gorm:"type:integer"`
	ParentId    int       `gorm:"type:integer"`
	CreatedOn   time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	CreatedBy   int       `gorm:"type:integer"`
	ModifiedOn  time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy  int       `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn   time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy   int       `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted   int       `gorm:"type:integer;DEFAULT:0"`
}

type TblPageAliases

type TblPageAliases struct {
	Id               int       `gorm:"primaryKey;auto_increment"`
	PageId           int       `gorm:"type:integer"`
	LanguageId       int       `gorm:"type:integer"`
	PageTitle        string    `gorm:"type:character varying"`
	PageSlug         string    `gorm:"type:character varying"`
	PageDescription  string    `gorm:"type:character varying"`
	PublishedOn      time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	Author           string    `gorm:"type:character varying"`
	Excerpt          string    `gorm:"type:character varying"`
	FeaturedImages   string    `gorm:"type:character varying"`
	Access           string    `gorm:"type:character varying"`
	MetaDetails      datatypes.JSONType[MetaDetails]
	Status           string `gorm:"type:character varying"`
	AllowComments    bool
	CreatedOn        time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	CreatedBy        int       `gorm:"type:integer"`
	ModifiedOn       time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy       int       `gorm:"DEFAULT:NULL"`
	DeletedOn        time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy        int       `gorm:"DEFAULT:NULL"`
	IsDeleted        int       `gorm:"DEFAULT:0"`
	OrderIndex       int       `gorm:"type:integer"`
	PageSuborder     int       `gorm:"type:integer"`
	CreatedDate      string    `gorm:"-"`
	ModifiedDate     string    `gorm:"-"`
	Username         string    `gorm:"<-:false"`
	PageGroupId      int       `gorm:"-:migration;<-:false"`
	ParentId         int       `gorm:"-:migration;<-:false"`
	LastRevisionDate time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	LastRevisionNo   int       `gorm:"type:integer"`
	ReadTime         int       `gorm:"type:integer"`
}

type TblPageAliasesLog

type TblPageAliasesLog struct {
	Id              int       `gorm:"primaryKey;auto_increment"`
	PageId          int       `gorm:"type:integer"`
	LanguageId      int       `gorm:"type:integer"`
	PageTitle       string    `gorm:"type:character varying"`
	PageSlug        string    `gorm:"type:character varying"`
	PageDescription string    `gorm:"type:character varying"`
	PublishedOn     time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	Author          string    `gorm:"type:character varying"`
	Excerpt         string    `gorm:"type:character varying"`
	FeaturedImages  string    `gorm:"type:character varying"`
	Access          string    `gorm:"type:character varying"`
	MetaDetails     datatypes.JSONType[MetaDetails]
	Status          string `gorm:"type:character varying"`
	AllowComments   bool
	CreatedOn       time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy       int       `gorm:"type:integer"`
	ModifiedOn      time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy      int       `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn       time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy       int       `gorm:"type:integer;DEFAULT:NULL"`
	CreatedDate     string    `gorm:"-"`
	ModifiedDate    string    `gorm:"-"`
	Username        string    `gorm:"-:migration;<-:false"`
	PageGroupId     int       `gorm:"-:migration;<-:false"`
	ParentId        int       `gorm:"-:migration;<-:false"`
	ReadTime        int       `gorm:"type:integer"`
}

type TblPagesCategories

type TblPagesCategories struct {
	Id         int `gorm:"primaryKey;auto_increment"`
	CreatedOn  time.Time
	CreatedBy  int       `gorm:"type:integer"`
	ModifiedOn time.Time `gorm:"DEFAULT:NULL"`
	ModifiedBy int       `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn  time.Time `gorm:"DEFAULT:NULL"`
	DeletedBy  int       `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted  int       `gorm:"type:integer;DEFAULT:0"`
}

type TblPagesCategoriesAliases

type TblPagesCategoriesAliases struct {
	Id                  int    `gorm:"primaryKey;auto_increment"`
	PageCategoryId      int    `gorm:"type:integer"`
	LanguageId          int    `gorm:"type:integer"`
	CategoryName        string `gorm:"type:character varying"`
	CategorySlug        string `gorm:"type:character varying"`
	CategoryDescription string `gorm:"type:character varying"`
	CreatedOn           time.Time
	CreatedBy           int       `gorm:"type:integer"`
	ModifiedOn          time.Time `gorm:"DEFAULT:NULL"`
	ModifiedBy          int       `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn           time.Time `gorm:"DEFAULT:NULL"`
	DeletedBy           int       `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted           int       `gorm:"type:integer;DEFAULT:0"`
	ParentId            int       `gorm:"type:integer"`
}

type TblPagesGroup

type TblPagesGroup struct {
	Id         int       `gorm:"primaryKey;auto_increment"`
	SpacesId   int       `gorm:"type:integer"`
	CreatedOn  time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy  int       `gorm:"type:integer"`
	ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy int       `gorm:"DEFAULT:NULL"`
	DeletedOn  time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy  int       `gorm:"DEFAULT:NULL"`
	IsDeleted  int       `gorm:"DEFAULT:0"`
}

type TblPagesGroupAliases

type TblPagesGroupAliases struct {
	Id               int       `gorm:"primaryKey;auto_increment"`
	PageGroupId      int       `gorm:"type:integer"`
	LanguageId       int       `gorm:"type:integer"`
	GroupName        string    `gorm:"type:character varying"`
	GroupSlug        string    `gorm:"type:character varying"`
	GroupDescription string    `gorm:"type:character varying"`
	CreatedOn        time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy        int       `gorm:"type:integer"`
	ModifiedOn       time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy       int       `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn        time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy        int       `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted        int       `gorm:"type:integer;DEFAULT:0"`
	OrderIndex       int       `gorm:"type:integer"`
}

type TblSpaceCategory added in v1.0.84

type TblSpaceCategory 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:"-"`
}

type TblSpaces

type TblSpaces struct {
	Id             int `gorm:"primaryKey;auto_increment"`
	PageCategoryId int `gorm:"type:integer"`
	CreatedOn      time.Time
	CreatedBy      int       `gorm:"type:integer"`
	ModifiedOn     time.Time `gorm:"DEFAULT:NULL"`
	ModifiedBy     int       `gorm:"DEFAULT:NULL"`
	DeletedOn      time.Time `gorm:"DEFAULT:NULL"`
	DeletedBy      int       `gorm:"DEFAULT:NULL"`
	IsDeleted      int       `gorm:"DEFAULT:0"`
	Username       string    `gorm:"-:migration;<-:false"`
	CreatedDate    string    `gorm:"-"`
	ModifiedDate   string    `gorm:"-"`
	SpaceName      string    `gorm:"-"`
}

type TblSpacesAliases

type TblSpacesAliases struct {
	Id                   int
	SpacesId             int    `gorm:"type:integer"`
	LanguageId           int    `gorm:"type:integer"`
	SpacesName           string `gorm:"type:character varying"`
	SpacesSlug           string `gorm:"type:character varying"`
	SpacesDescription    string `gorm:"type:character varying"`
	ImagePath            string `gorm:"type:character varying"`
	CreatedOn            time.Time
	CreatedBy            int                      `gorm:"type:integer"`
	ModifiedOn           time.Time                `gorm:"DEFAULT:NULL"`
	ModifiedBy           int                      `gorm:"type:integer;DEFAULT:NULL"`
	DeletedOn            time.Time                `gorm:"DEFAULT:NULL"`
	DeletedBy            int                      `gorm:"type:integer;DEFAULT:NULL"`
	IsDeleted            int                      `gorm:"type:integer;DEFAULT:0"`
	PageCategoryId       int                      `gorm:"-:migration;column:page_category_id;<-:false"`
	ParentId             int                      `gorm:"-:migration;column:parent_id;<-:false"`
	CreatedDate          string                   `gorm:"-"`
	ModifiedDate         string                   `gorm:"-"`
	CategoryNames        []categories.TblCategory `gorm:"-"`
	CategoryId           int                      `gorm:"-:migration;column:category_id;<-:false"`
	FullSpaceAccess      bool                     `gorm:"-"`
	SpaceFullDescription string                   `gorm:"-"`
	ReadTime             string                   `gorm:"-"`
	ViewCount            int                      `gorm:"type:integer"`
	RecentTime           time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL