Documentation ¶
Index ¶
- Constants
- type ArticleEditModel
- type ArticleListItemModel
- type ArticleLockModel
- type ArticleModel
- type Config
- type ErrorPageModel
- type FileCache
- type GoBlogServer
- func (s *GoBlogServer) Article() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleDelete() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleEdit() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleHistories() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleList() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleLock() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleLockPost() goweb.HandlerFunc
- func (s *GoBlogServer) ArticleSave() goweb.HandlerFunc
- func (s *GoBlogServer) AuthMiddleware() goweb.HandlerFunc
- func (s *GoBlogServer) BindHandlers()
- func (s *GoBlogServer) CategoryDelete() goweb.HandlerFunc
- func (s *GoBlogServer) CategoryEdit() goweb.HandlerFunc
- func (s *GoBlogServer) CategoryList() goweb.HandlerFunc
- func (s *GoBlogServer) CategorySave() goweb.HandlerFunc
- func (s *GoBlogServer) ErrorPage() goweb.ErrorPageFunc
- func (s *GoBlogServer) FriendlyLink() goweb.HandlerFunc
- func (s *GoBlogServer) FriendlyLinkApply() goweb.HandlerFunc
- func (s *GoBlogServer) FriendlyLinkApplyActivePUT() goweb.HandlerFunc
- func (s *GoBlogServer) FriendlyLinkApplyList() goweb.HandlerFunc
- func (s *GoBlogServer) FriendlyLinkApplyPOST() goweb.HandlerFunc
- func (s *GoBlogServer) GetLoginUser(ctx *goweb.Context) (*models.UserDto, error)
- func (server *GoBlogServer) GetStorage(ctx *goweb.Context) storage.Storage
- func (s *GoBlogServer) HasArticleReadAccess(user *models.UserDto, article *models.ArticleDto) (bool, error)
- func (s *GoBlogServer) Login() goweb.HandlerFunc
- func (s *GoBlogServer) LoginCallback() goweb.HandlerFunc
- func (s *GoBlogServer) LogoutPost() goweb.HandlerFunc
- func (s *GoBlogServer) MustGetLoginUser(ctx *goweb.Context) *models.UserDto
- func (s *GoBlogServer) NewPageModel(ctx *goweb.Context, title string, data interface{}) *PageModel
- func (s *GoBlogServer) Profile() goweb.HandlerFunc
- func (s *GoBlogServer) Serve()
- func (s *GoBlogServer) SetLevelTwoPwd() goweb.HandlerFunc
- func (s *GoBlogServer) SetLevelTwoPwdPost() goweb.HandlerFunc
- func (s *GoBlogServer) Upload() goweb.HandlerFunc
- func (s *GoBlogServer) UserArticle() goweb.HandlerFunc
- type HandlerWidget
- type MemoryCache
- type PageModel
- type ProfileModel
- type SetLevelTwoPwdModel
- type SettingsItemModel
- type UserArticleModel
Constants ¶
View Source
const ( PATH_ARTICLELIST = "/articlelist" PATH_ARTICLEEDIT = "/articleedit" PATH_ARTICLESAVE = "/articlesave" PATH_ARTICLEDELETE = "/articledelete" PATH_ARTICLELOCK = "/articlelock" PATH_ARTICLEHISTORIES = "/articlehistories" PATH_LOGIN = "/login" PATH_LOGIN_CALLBACK = "/login-callback" PATH_LOGOUT = "/logout" PATH_CATEGORYLIST = "/categories" PATH_CATEGORYEDIT = "/categoryedit" PATH_CATEGORYSAVE = "/categorysave" PATH_CATEGORYDELETE = "/categorydelete" PATH_SETLEVELTWOPWD = "/setlevel2pwd" PATH_PROFILE = "/profile" PATH_UPLOAD = "/upload" PATH_FriendlyLink = "/friendly-link" PATH_FriendlyLinkApply = "/friendly-link-apply" PATH_FriendlyLinkApplyList = "/friendly-link-apply-list" PATH_FriendlyLinkApplyActive = "/friendly_link_apply_active" PATH_WEBSOCKET = "/ws" )
View Source
const SessionName = "session"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleEditModel ¶
type ArticleEditModel struct { CategoryList []models.CategoryDto Article models.ArticleDto UserId int }
type ArticleListItemModel ¶
type ArticleLockModel ¶
type ArticleModel ¶
type ArticleModel struct { Article *models.ArticleDto Html template.HTML Readonly bool }
type Config ¶
type Config struct { FileLocation string Host string Website_domain string SqlDataSourceName string WebsiteName string Key string PostKey string ConcurrenceNum int SmtpUsername string SmtpPassword string SmtpAddr string OAuthClientId string OAuthTokenUrl string OAuthAuthUrl string OAuthSecret string Tls_cert_file string Tls_key_file string Log_file string //not read from configuration file LastUpdateTime string OAUTH2Config *oauth2.Config JWKJsonUrl string OAuthLogoutRedirectUrl string OAuthLogoutUrl string IntrospectTokenURL string }
func (*Config) ImageDirPath ¶
type ErrorPageModel ¶
type FileCache ¶
type FileCache struct { HomeWallpaper string // contains filtered or unexported fields }
type GoBlogServer ¶
type GoBlogServer struct { FileCache *FileCache MemoryCache *MemoryCache // contains filtered or unexported fields }
func NewGoBlogServer ¶
func NewGoBlogServer(configPath string, skip_tls_verify bool) *GoBlogServer
func (*GoBlogServer) Article ¶
func (s *GoBlogServer) Article() goweb.HandlerFunc
func (*GoBlogServer) ArticleDelete ¶
func (s *GoBlogServer) ArticleDelete() goweb.HandlerFunc
func (*GoBlogServer) ArticleEdit ¶
func (s *GoBlogServer) ArticleEdit() goweb.HandlerFunc
func (*GoBlogServer) ArticleHistories ¶
func (s *GoBlogServer) ArticleHistories() goweb.HandlerFunc
func (*GoBlogServer) ArticleList ¶
func (s *GoBlogServer) ArticleList() goweb.HandlerFunc
func (*GoBlogServer) ArticleLock ¶
func (s *GoBlogServer) ArticleLock() goweb.HandlerFunc
func (*GoBlogServer) ArticleLockPost ¶
func (s *GoBlogServer) ArticleLockPost() goweb.HandlerFunc
func (*GoBlogServer) ArticleSave ¶
func (s *GoBlogServer) ArticleSave() goweb.HandlerFunc
func (*GoBlogServer) AuthMiddleware ¶
func (s *GoBlogServer) AuthMiddleware() goweb.HandlerFunc
func (*GoBlogServer) BindHandlers ¶
func (s *GoBlogServer) BindHandlers()
func (*GoBlogServer) CategoryDelete ¶
func (s *GoBlogServer) CategoryDelete() goweb.HandlerFunc
func (*GoBlogServer) CategoryEdit ¶
func (s *GoBlogServer) CategoryEdit() goweb.HandlerFunc
func (*GoBlogServer) CategoryList ¶
func (s *GoBlogServer) CategoryList() goweb.HandlerFunc
func (*GoBlogServer) CategorySave ¶
func (s *GoBlogServer) CategorySave() goweb.HandlerFunc
func (*GoBlogServer) ErrorPage ¶
func (s *GoBlogServer) ErrorPage() goweb.ErrorPageFunc
func (*GoBlogServer) FriendlyLink ¶
func (s *GoBlogServer) FriendlyLink() goweb.HandlerFunc
func (*GoBlogServer) FriendlyLinkApply ¶
func (s *GoBlogServer) FriendlyLinkApply() goweb.HandlerFunc
func (*GoBlogServer) FriendlyLinkApplyActivePUT ¶
func (s *GoBlogServer) FriendlyLinkApplyActivePUT() goweb.HandlerFunc
func (*GoBlogServer) FriendlyLinkApplyList ¶
func (s *GoBlogServer) FriendlyLinkApplyList() goweb.HandlerFunc
func (*GoBlogServer) FriendlyLinkApplyPOST ¶
func (s *GoBlogServer) FriendlyLinkApplyPOST() goweb.HandlerFunc
func (*GoBlogServer) GetLoginUser ¶
func (*GoBlogServer) GetStorage ¶
func (server *GoBlogServer) GetStorage(ctx *goweb.Context) storage.Storage
func (*GoBlogServer) HasArticleReadAccess ¶
func (s *GoBlogServer) HasArticleReadAccess(user *models.UserDto, article *models.ArticleDto) (bool, error)
func (*GoBlogServer) Login ¶
func (s *GoBlogServer) Login() goweb.HandlerFunc
func (*GoBlogServer) LoginCallback ¶
func (s *GoBlogServer) LoginCallback() goweb.HandlerFunc
func (*GoBlogServer) LogoutPost ¶
func (s *GoBlogServer) LogoutPost() goweb.HandlerFunc
func (*GoBlogServer) MustGetLoginUser ¶
func (s *GoBlogServer) MustGetLoginUser(ctx *goweb.Context) *models.UserDto
func (*GoBlogServer) NewPageModel ¶
func (s *GoBlogServer) NewPageModel(ctx *goweb.Context, title string, data interface{}) *PageModel
func (*GoBlogServer) Profile ¶
func (s *GoBlogServer) Profile() goweb.HandlerFunc
func (*GoBlogServer) Serve ¶
func (s *GoBlogServer) Serve()
func (*GoBlogServer) SetLevelTwoPwd ¶
func (s *GoBlogServer) SetLevelTwoPwd() goweb.HandlerFunc
func (*GoBlogServer) SetLevelTwoPwdPost ¶
func (s *GoBlogServer) SetLevelTwoPwdPost() goweb.HandlerFunc
func (*GoBlogServer) Upload ¶
func (s *GoBlogServer) Upload() goweb.HandlerFunc
func (*GoBlogServer) UserArticle ¶
func (s *GoBlogServer) UserArticle() goweb.HandlerFunc
type HandlerWidget ¶
type HandlerWidget struct {
// contains filtered or unexported fields
}
func (*HandlerWidget) Post_Process ¶
func (hw *HandlerWidget) Post_Process(ctx *goweb.Context)
func (*HandlerWidget) Pre_Process ¶
func (hw *HandlerWidget) Pre_Process(ctx *goweb.Context)
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func (*MemoryCache) FriendlyLinks ¶
func (cache *MemoryCache) FriendlyLinks(forceRefresh bool) ([]models.FriendlyLink, error)
type ProfileModel ¶
type ProfileModel struct {
Settings []*SettingsItemModel
}
type SetLevelTwoPwdModel ¶
type SetLevelTwoPwdModel struct { Settings []*SettingsItemModel ExistLevel2Pwd bool }
type SettingsItemModel ¶
func GetSettingsModel ¶
func GetSettingsModel(activePath string) []*SettingsItemModel
type UserArticleModel ¶
type UserArticleModel struct { Articles []models.ArticleDto Categories []models.CategoryDto UserId int LoggedUser *models.UserDto }
func (UserArticleModel) GetCategoryUrl ¶
func (m UserArticleModel) GetCategoryUrl(id int) string
Click to show internal directories.
Click to hide internal directories.