{"id":24540030,"url":"https://github.com/spurtcms/courses","last_synced_at":"2025-03-16T04:43:05.591Z","repository":{"id":235482218,"uuid":"781823622","full_name":"spurtcms/courses","owner":"spurtcms","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-12T13:24:57.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-12T13:27:00.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spurtcms.png","metadata":{"files":{"readme":null,"changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-04T05:30:30.000Z","updated_at":"2025-03-12T13:24:22.000Z","dependencies_parsed_at":"2024-05-10T14:53:26.356Z","dependency_job_id":"fa92799e-9e16-43cb-a978-32ab98fdaa19","html_url":"https://github.com/spurtcms/courses","commit_stats":null,"previous_names":["spurtcms/spaces","spurtcms/courses"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spurtcms%2Fcourses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spurtcms%2Fcourses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spurtcms%2Fcourses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spurtcms%2Fcourses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spurtcms","download_url":"https://codeload.github.com/spurtcms/courses/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826778,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T17:17:58.319Z","updated_at":"2025-03-16T04:43:05.578Z","avatar_url":"https://github.com/spurtcms.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Learning Package\n\nWith 'learning' package, experience an organized content creation process that allows effortless organization of content presentation on your website. Customize specific areas like the header, footer, or dedicated sections for different content types.  This package will empower you to create a structured website in Golang, with layout tailored to diverse content presentations, ensuring seamless content management with distinct layouts and specialized sections for an enhanced user experience\n\n## Features\n\n- SpaceList: Administrators can access a comprehensive list of all spaces available within the CMS, providing a comprehensive overview of the system's organizational structure and facilitating streamlined navigation.\n- SpaceDetail: This function facilitates the retrieval of detailed information regarding specific spaces within the CMS, which helps comprehensive understanding of individual spaces' configurations and attributes.\n- SpaceCreation: This function allows administrators to create new spaces within the CMS, facilitating the expansion and customization of the system's content architecture to suit evolving new needs.\n- SpaceUpdate: Enables administrators to dynamically modify existing space configurations for its Title, description, cover image etc, ensuring flexibility and adaptability in aligning spaces with changing objectives or requirements.\n- DeleteSpace: Facilitates the removal of obsolete or redundant spaces from the CMS, maintaining system cleanliness and optimizing resource utilization.\n- CloneSpace: Provides administrators with the ability to duplicate existing spaces along with Page groups and pages mapped to it, enabling efficient content replication across different sections of the CMS.\n- PageList: Retrieves a comprehensive list of pages available within the CMS, empowering administrators with a detailed overview of the system's content inventory and organizational structure.\n- PageCategoryList: This function retrieves a structured list of page categories.\n\n# Installation\n\n``` bash\ngo get github.com/spurtcms/Learning\n```\n\n\n# Usage Example\n\n``` bash\nimport (\n\t\"github.com/spurtcms/auth\"\n\t\"github.com/spurtcms/Learning\"\n)\n\nfunc main() {\n\n\tAuth := auth.AuthSetup(auth.Config{\n\t\tUserId:     1,\n\t\tExpiryTime: 2,\n\t\tSecretKey:  \"SecretKey@123\",\n\t\tDB: \u0026gorm.DB{},\n\t\tRoleid:1,\n\t})\n\n\ttoken, _ := Auth.CreateToken()\n\n\tAuth.VerifyToken(token, SecretKey)\n\n\tpermisison, _ := Auth.IsGranted(\"Space\", auth.CRUD)\n\n\tspaceauth := space.SpaceSetup(\u0026space.Config{\n\t\tDB:               \u0026gorm.DB{},\n\t\tAuthEnable:       false,\n\t\tPermissionEnable: false,\n\t\tAuth:             Auth,\n\t})\n\n\t//spaces\n\tif permisison {\n\n\t\t//list space\n\t\tspacelist, count, err := spaceauth.SpaceList(space.SpaceListReq{Limit: 10, Offset: 0})\n\t\tfmt.Println(spacelist, count, err)\n\n\t\t//create space\n\t\t_, cerr := spaceauth.SpaceCreation(space.SpaceCreation{\n\t\t\tName:        \"Default_Space\",\n\t\t\tDescription: \"default space\",\n\t\t\tCategoryId:  1,\n\t\t\tCreatedBy:   1,\n\t\t})\n\n\t\tif cerr != nil {\n\n\t\t\tfmt.Println(cerr)\n\t\t}\n\n\t\t//update space\n\t\tuerr := spaceauth.SpaceUpdate(space.SpaceCreation{\n\t\t\tName:        \"Default Space\",\n\t\t\tDescription: \"default space\",\n\t\t\tCategoryId:  1,\n\t\t\tModifiedBy:  1,\n\t\t}, 1)\n\n\t\tif uerr != nil {\n\n\t\t\tfmt.Println(uerr)\n\n\t\t}\n\n\t\t// delete space\n\t\tderr := spaceauth.DeleteSpace(1, 1)\n\n\t\tif derr != nil {\n\n\t\t\tfmt.Println(derr)\n\n\t\t}\n\t\t// page list\n\t\tpages, pagecount, perr := spaceauth.GetPages(space.GetPageReq{Spaceid: 2, PublishedPageonly: true})\n\t\tfmt.Println(pages, pagecount, perr)\n\n\t\t// create page\n\t\tpagedata := space.Pages{PageId: 1, Title: \"Introduction\", ParentId: 1}\n\n\t\tpagelog, cperr := spaceauth.CreatePagelog(2, []space.Pages{pagedata}, \"public\")\n\t\tfmt.Println(pagelog)\n\n\t\tif cperr != nil {\n\n\t\t\tfmt.Println(cperr)\n\n\t\t}\n\n\t\t// create group\n\t\tgroup := space.PageGroups{Name: \"Default_Group\", OrderIndex: 1}\n\n\t\tpagegroup, gcerr := spaceauth.CreateGroup(2, []space.PageGroups{group}, 1)\n\t\tfmt.Println(pagegroup)\n\n\t\tif gcerr != nil {\n\n\t\t\tfmt.Println(gcerr)\n\n\t\t}\n\n\t}\n\n}\n\n```\n\n# Getting help\nIf you encounter a problem with the package,please refer [Please refer [(https://www.spurtcms.com/documentation/cms-admin)] or you can create a new Issue in this repo[https://github.com/spurtcms/learning/issues]. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspurtcms%2Fcourses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspurtcms%2Fcourses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspurtcms%2Fcourses/lists"}