Documentation ¶
Index ¶
- func Blog(w http.ResponseWriter, r *http.Request)
- func BlogPost(w http.ResponseWriter, r *http.Request)
- func Categories(w http.ResponseWriter, r *http.Request)
- func Category(w http.ResponseWriter, r *http.Request)
- func Course(w http.ResponseWriter, r *http.Request)
- func Courses(w http.ResponseWriter, r *http.Request)
- func DeleteCategory(w http.ResponseWriter, r *http.Request)
- func DeleteCourse(w http.ResponseWriter, r *http.Request)
- func DeleteCourseInDB(db *sql.DB, slug string) error
- func DeleteModule(w http.ResponseWriter, r *http.Request)
- func DeleteModuleInDB(db *sql.DB, slug string) error
- func DeleteQuestions(db *sql.DB, sessionID int) error
- func DeleteSession(w http.ResponseWriter, r *http.Request)
- func DeleteSessionInDB(db *sql.DB, slug string) error
- func DropCategoryItems(db *sql.DB, categoryID int) error
- func DropToolbar(db *sql.DB) error
- func Files(w http.ResponseWriter, r *http.Request)
- func FooterCategories(w http.ResponseWriter, r *http.Request)
- func FooterCategory(w http.ResponseWriter, r *http.Request)
- func GetCategoryIDFromName(db *sql.DB, name string) (int, error)
- func GetCourse(db *sql.DB, slug string) (course.Course, error)
- func GetCourseFromName(db *sql.DB, name string) (int, string, error)
- func GetCourses(db *sql.DB) ([]course.Course, error)
- func GetSessionBySlugs(db *sql.DB, course, module, session string) (string, int, int, error)
- func GetSessionText(db *sql.DB, sessionID int) (string, error)
- func GetSessionsYoutube(db *sql.DB, sessionID int) (string, string, error)
- func Group(w http.ResponseWriter, r *http.Request)
- func Groups(w http.ResponseWriter, r *http.Request)
- func HandleSessionMultipleChoice(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
- func HandleSessionText(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
- func HandleSessionYoutube(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
- func Index(w http.ResponseWriter, r *http.Request)
- func InsertAccessLog(db *sql.DB, accessTime time.Time, ...) error
- func InsertCourseInDB(db *sql.DB, name, description string, categoryID int) (string, error)
- func InsertMultipleChoiceOptionInDB(db *sql.DB, option course.Option, questionID int64) error
- func InsertMultipleChoiceQuestionInDB(db *sql.DB, questionText string, sessionID int) (int64, error)
- func InsertNewBlogPost(w http.ResponseWriter, r *http.Request)
- func InsertNewBlogPostInDB(db *sql.DB, title, text string) (string, error)
- func InsertNewCategory(w http.ResponseWriter, r *http.Request)
- func InsertNewCategoryInDB(db *sql.DB, name string) (string, error)
- func InsertNewCourse(w http.ResponseWriter, r *http.Request)
- func InsertNewGroup(w http.ResponseWriter, r *http.Request)
- func InsertNewGroupInDB(db *sql.DB, name string) error
- func InsertNewModule(w http.ResponseWriter, r *http.Request)
- func InsertNewModuleInDB(db *sql.DB, name, description, course string) (string, error)
- func InsertNewPage(w http.ResponseWriter, r *http.Request)
- func InsertNewPageInDB(db *sql.DB, title, text, slug string) error
- func InsertNewPodcastPost(w http.ResponseWriter, r *http.Request)
- func InsertNewPodcastPostInDB(db *sql.DB, title, text, file string) (string, error)
- func InsertNewSession(w http.ResponseWriter, r *http.Request)
- func InsertNewSessionInDB(db *sql.DB, name string, moduleSlug string, sessionType int) (string, int64, error)
- func InsertNewSessionTextInDB(db *sql.DB, sessionID int64, text string) error
- func InsertNewSessionYoutubeInDB(db *sql.DB, sessionID int64, text, youtube string) error
- func InsertNewSetting(w http.ResponseWriter, r *http.Request)
- func InsertNewSettingInDB(db *sql.DB, key, value string) error
- func Module(w http.ResponseWriter, r *http.Request)
- func NewBlogPost(w http.ResponseWriter, r *http.Request)
- func NewCategory(w http.ResponseWriter, r *http.Request)
- func NewCourse(w http.ResponseWriter, r *http.Request)
- func NewFile(w http.ResponseWriter, r *http.Request)
- func NewGroup(w http.ResponseWriter, r *http.Request)
- func NewModule(w http.ResponseWriter, r *http.Request)
- func NewPage(w http.ResponseWriter, r *http.Request)
- func NewPodcastPost(w http.ResponseWriter, r *http.Request)
- func NewSession(w http.ResponseWriter, r *http.Request)
- func NewSetting(w http.ResponseWriter, r *http.Request)
- func Pages(w http.ResponseWriter, r *http.Request)
- func Podcast(w http.ResponseWriter, r *http.Request)
- func PodcastPost(w http.ResponseWriter, r *http.Request)
- func RemoveFile(w http.ResponseWriter, r *http.Request)
- func Session(w http.ResponseWriter, r *http.Request)
- func Setting(w http.ResponseWriter, r *http.Request)
- func Settings(w http.ResponseWriter, r *http.Request)
- func SingleFile(w http.ResponseWriter, r *http.Request)
- func SinglePage(w http.ResponseWriter, r *http.Request)
- func Ticket(w http.ResponseWriter, r *http.Request)
- func Tickets(w http.ResponseWriter, r *http.Request)
- func Toolbar(w http.ResponseWriter, r *http.Request)
- func UpdateBlogPost(w http.ResponseWriter, r *http.Request)
- func UpdateBlogPostInDB(db *sql.DB, title, text, slug string) error
- func UpdateCategory(w http.ResponseWriter, r *http.Request)
- func UpdateCategoryInDatabase(db *sql.DB, newName string, slug string) error
- func UpdateCategoryItems(db *sql.DB, categoryID int, value string) error
- func UpdateCourse(w http.ResponseWriter, r *http.Request)
- func UpdateCourseInDB(db *sql.DB, name, description, slug string, categoryID int) error
- func UpdateFooter(w http.ResponseWriter, r *http.Request)
- func UpdateGroup(w http.ResponseWriter, r *http.Request)
- func UpdateGroupInDB(db *sql.DB, newName, oldName string) error
- func UpdateModule(w http.ResponseWriter, r *http.Request)
- func UpdateModuleInDB(db *sql.DB, name, description, slug string, courseID int) error
- func UpdateMultipleChoiceInDB(db *sql.DB, questions []course.Question, sessionID int) error
- func UpdatePage(w http.ResponseWriter, r *http.Request)
- func UpdatePageInDB(db *sql.DB, title, text, slug string) error
- func UpdatePodcastPost(w http.ResponseWriter, r *http.Request)
- func UpdatePodcastPostInDB(db *sql.DB, title, text, file, slug string) error
- func UpdateSession(w http.ResponseWriter, r *http.Request)
- func UpdateSessionNameInDB(db *sql.DB, name string, id int) error
- func UpdateSessionTextInDB(db *sql.DB, text string, id int) error
- func UpdateSessionYoutubeInDB(db *sql.DB, text, youtube string, id int) error
- func UpdateSetting(w http.ResponseWriter, r *http.Request)
- func UpdateSettingWithName(db *sql.DB, name, value string) error
- func UpdateTicket(w http.ResponseWriter, r *http.Request)
- func UpdateToolbar(w http.ResponseWriter, r *http.Request)
- func UpdateValue(db *sql.DB, value string) error
- func UploadNewFile(w http.ResponseWriter, r *http.Request)
- func User(w http.ResponseWriter, r *http.Request)
- func Users(w http.ResponseWriter, r *http.Request)
- type BlogPageData
- type BlogPostData
- type BlogPostPageData
- type CategoriesData
- type CategoryData
- type CategoryPageData
- type CoursePageData
- type CoursesPageData
- type FilesPageData
- type FooterCategoryData
- type FooterCategoryPage
- type FooterPage
- type GroupData
- type GroupPageData
- type GroupUserData
- type GroupsData
- type IndexPageData
- type ModuleData
- type ModulePageData
- type NewCoursePage
- type Page
- type PageData
- type PageStats
- type PagesData
- type PodcastPageData
- type PodcastPostData
- type PodcastPostPageData
- type SessionBody
- type SessionData
- type SessionMultipleChoice
- type SessionText
- type SessionYoutube
- type SettingData
- type SettingPageData
- type SettingsData
- type SinglePageData
- type TicketData
- type TicketPageData
- type TicketsPageData
- type ToolbarData
- type ToolbarPage
- type UserData
- type UserPageData
- type UsersData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCategory ¶
func DeleteCategory(w http.ResponseWriter, r *http.Request)
DeleteCategory ...
func DeleteSessionInDB ¶
DeleteSessionInDB ...
func DropCategoryItems ¶
DropCategoryItems ...
func FooterCategories ¶
func FooterCategories(w http.ResponseWriter, r *http.Request)
FooterCategories ...
func FooterCategory ¶
func FooterCategory(w http.ResponseWriter, r *http.Request)
FooterCategory ...
func GetCategoryIDFromName ¶
GetCategoryIDFromName ...
func GetCourseFromName ¶
GetCourseFromName ...
func GetSessionBySlugs ¶
GetSessionBySlugs ...
func GetSessionText ¶
GetSessionText ...
func GetSessionsYoutube ¶
GetSessionsYoutube ...
func HandleSessionMultipleChoice ¶
func HandleSessionMultipleChoice(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
HandleSessionMultipleChoice ...
func HandleSessionText ¶
func HandleSessionText(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
HandleSessionText ...
func HandleSessionYoutube ¶
func HandleSessionYoutube(w http.ResponseWriter, r *http.Request, db *sql.DB, name string, sessionID int)
HandleSessionYoutube ...
func InsertAccessLog ¶
func InsertAccessLog(db *sql.DB, accessTime time.Time, method, path, remoteAddress, userAgent string, speed int) error
InsertAccessLog ...
func InsertCourseInDB ¶
InsertCourseInDB ...
func InsertMultipleChoiceOptionInDB ¶
InsertMultipleChoiceOptionInDB ...
func InsertMultipleChoiceQuestionInDB ¶
func InsertMultipleChoiceQuestionInDB(db *sql.DB, questionText string, sessionID int) (int64, error)
InsertMultipleChoiceQuestionInDB ...
func InsertNewBlogPost ¶
func InsertNewBlogPost(w http.ResponseWriter, r *http.Request)
InsertNewBlogPost ...
func InsertNewBlogPostInDB ¶
InsertNewBlogPostInDB ...
func InsertNewCategory ¶
func InsertNewCategory(w http.ResponseWriter, r *http.Request)
InsertNewCategory ...
func InsertNewCategoryInDB ¶
InsertNewCategoryInDB ...
func InsertNewCourse ¶
func InsertNewCourse(w http.ResponseWriter, r *http.Request)
InsertNewCourse ...
func InsertNewGroup ¶
func InsertNewGroup(w http.ResponseWriter, r *http.Request)
InsertNewGroup ...
func InsertNewGroupInDB ¶
InsertNewGroupInDB ...
func InsertNewModule ¶
func InsertNewModule(w http.ResponseWriter, r *http.Request)
InsertNewModule ...
func InsertNewModuleInDB ¶
InsertNewModuleInDB ...
func InsertNewPageInDB ¶
InsertNewPageInDB ...
func InsertNewPodcastPost ¶
func InsertNewPodcastPost(w http.ResponseWriter, r *http.Request)
InsertNewPodcastPost ...
func InsertNewPodcastPostInDB ¶
InsertNewPodcastPostInDB ...
func InsertNewSession ¶
func InsertNewSession(w http.ResponseWriter, r *http.Request)
InsertNewSession ...
func InsertNewSessionInDB ¶
func InsertNewSessionInDB(db *sql.DB, name string, moduleSlug string, sessionType int) (string, int64, error)
InsertNewSessionInDB ...
func InsertNewSessionTextInDB ¶
InsertNewSessionTextInDB ...
func InsertNewSessionYoutubeInDB ¶
InsertNewSessionYoutubeInDB ...
func InsertNewSetting ¶
func InsertNewSetting(w http.ResponseWriter, r *http.Request)
InsertNewSetting ...
func InsertNewSettingInDB ¶
InsertNewSettingInDB ...
func NewPodcastPost ¶
func NewPodcastPost(w http.ResponseWriter, r *http.Request)
NewPodcastPost ...
func UpdateBlogPost ¶
func UpdateBlogPost(w http.ResponseWriter, r *http.Request)
UpdateBlogPost ...
func UpdateBlogPostInDB ¶
UpdateBlogPostInDB ...
func UpdateCategory ¶
func UpdateCategory(w http.ResponseWriter, r *http.Request)
UpdateCategory ...
func UpdateCategoryInDatabase ¶
UpdateCategoryInDatabase ...
func UpdateCategoryItems ¶
UpdateCategoryItems ...
func UpdateCourseInDB ¶
UpdateCourseInDB ...
func UpdateGroupInDB ¶
UpdateGroupInDB ...
func UpdateModuleInDB ¶
UpdateModuleInDB ...
func UpdateMultipleChoiceInDB ¶
UpdateMultipleChoiceInDB ...
func UpdatePageInDB ¶
UpdatePageInDB ...
func UpdatePodcastPost ¶
func UpdatePodcastPost(w http.ResponseWriter, r *http.Request)
UpdatePodcastPost ...
func UpdatePodcastPostInDB ¶
UpdatePodcastPostInDB ...
func UpdateSessionNameInDB ¶
UpdateSessionNameInDB ...
func UpdateSessionTextInDB ¶
UpdateSessionTextInDB ...
func UpdateSessionYoutubeInDB ¶
UpdateSessionYoutubeInDB ...
func UpdateSettingWithName ¶
UpdateSettingWithName ...
Types ¶
type BlogPageData ¶
type BlogPageData struct { Title string Paths []helpers.Path Posts []blog.PostData NewItemButton bool NewItemText string NewItemLink string }
BlogPageData ...
type BlogPostData ¶
BlogPostData ...
type BlogPostPageData ¶
BlogPostPageData ...
type CategoriesData ¶
type CategoriesData struct { Title string Paths []helpers.Path Categories []CategoryData NewItemButton bool NewItemText string NewItemLink string }
CategoriesData ...
type CategoryData ¶
CategoryData ...
type CategoryPageData ¶
type CategoryPageData struct { Title string Paths []helpers.Path Category CategoryData }
CategoryPageData ...
type CoursePageData ¶
type CoursePageData struct { Title string Paths []helpers.Path Course course.Course Categories []CategoryData Modules []ModuleData NewItemButton bool NewItemText string NewItemLink string }
CoursePageData ...
type CoursesPageData ¶
type CoursesPageData struct { Title string Paths []helpers.Path Courses []course.Course NewItemButton bool NewItemText string NewItemLink string }
CoursesPageData ...
type FilesPageData ¶
type FilesPageData struct { Title string Paths []helpers.Path Files []string NewItemButton bool NewItemText string NewItemLink string }
FilesPageData ...
type FooterCategoryData ¶
type FooterCategoryData struct {}
FooterCategoryData ...
func GetFooterCategories ¶
func GetFooterCategories(db *sql.DB) ([]FooterCategoryData, error)
GetFooterCategories ...
func GetFooterCategory ¶
GetFooterCategory ...
type GroupData ¶
type GroupData struct {
Name string
}
GroupData ...
func GetGroupByName ¶
GetGroupByName ...
type GroupPageData ¶
GroupPageData ...
type GroupUserData ¶
GroupUserData ...
func GetGroupsUserIsPartOf ¶
func GetGroupsUserIsPartOf(db *sql.DB, username string) ([]GroupUserData, error)
GetGroupsUserIsPartOf ...
type GroupsData ¶
type GroupsData struct { Title string Paths []helpers.Path Groups []GroupData NewItemButton bool NewItemText string NewItemLink string }
GroupsData ...
type IndexPageData ¶
type IndexPageData struct { Title string Paths []helpers.Path PageViews int Errors int Tickets int Revenue int Pages []PageStats }
IndexPageData ...
type ModuleData ¶
ModuleData ...
func GetModuleAndCourseBySlug ¶
func GetModuleAndCourseBySlug(db *sql.DB, slug string) (ModuleData, error)
GetModuleAndCourseBySlug ...
func GetModulesByCourseSlug ¶
func GetModulesByCourseSlug(db *sql.DB, slug string) ([]ModuleData, error)
GetModulesByCourseSlug ...
type ModulePageData ¶
type ModulePageData struct { Title string Paths []helpers.Path Module ModuleData CourseSlug string Courses []course.Course Sessions []SessionData NewItemButton bool NewItemText string NewItemLink string }
ModulePageData ...
type NewCoursePage ¶
type NewCoursePage struct { Title string Paths []helpers.Path Categories []CategoryData }
NewCoursePage ...
type PagesData ¶
type PagesData struct { Title string Paths []helpers.Path Pages []PageData NewItemButton bool NewItemText string NewItemLink string }
PagesData ...
type PodcastPageData ¶
type PodcastPageData struct { Title string Paths []helpers.Path Posts []podcast.PostData NewItemButton bool NewItemText string NewItemLink string }
PodcastPageData ...
type PodcastPostData ¶
PodcastPostData ...
type PodcastPostPageData ¶
PodcastPostPageData ...
type SessionBody ¶
SessionBody ...
type SessionData ¶
SessionData ...
func GetSessionsByModuleSlug ¶
func GetSessionsByModuleSlug(db *sql.DB, slug string) ([]SessionData, error)
GetSessionsByModuleSlug ...
type SessionMultipleChoice ¶
type SessionMultipleChoice struct { Title string Paths []helpers.Path Name string Questions []course.Question }
SessionMultipleChoice ...
type SessionText ¶
SessionText ...
type SessionYoutube ¶
type SessionYoutube struct { Title string Paths []helpers.Path Name string Text string Youtube string }
SessionYoutube ...
type SettingData ¶
SettingData ...
func GetSettingFromName ¶
func GetSettingFromName(db *sql.DB, name string) (SettingData, error)
GetSettingFromName ...
type SettingPageData ¶
type SettingPageData struct { Title string Paths []helpers.Path Option SettingData }
SettingPageData ...
type SettingsData ¶
type SettingsData struct { Title string Paths []helpers.Path Options []SettingData NewItemButton bool NewItemText string NewItemLink string }
SettingsData ...
type SinglePageData ¶
SinglePageData ...
type TicketData ¶
TicketData ...
type TicketPageData ¶
type TicketPageData struct { Title string Paths []helpers.Path Ticket TicketData }
TicketPageData ...
type TicketsPageData ¶
type TicketsPageData struct { Title string Paths []helpers.Path Tickets []TicketData }
TicketsPageData ...
type ToolbarData ¶
ToolbarData ...
func GetFooterItems ¶
func GetFooterItems(db *sql.DB, footerID int) ([]ToolbarData, error)
GetFooterItems ...
type ToolbarPage ¶
type ToolbarPage struct { Title string Paths []helpers.Path ToolbarItems []ToolbarData NewItemButton bool NewItemText string NewItemLink string }
ToolbarPage ...
type UserPageData ¶
type UserPageData struct { Title string Paths []helpers.Path User UserData Groups []GroupUserData }
UserPageData ...