web

package
v0.0.0-...-2335f76 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPayInfoRequest

type AddPayInfoRequest struct {
	Name  string `json:"name" binding:"required"`
	Image string `json:"image" binding:"required"`
}

type AddRecordInWebsiteConfig

type AddRecordInWebsiteConfig struct {
	Record string `json:"website_record" binding:"required"`
}

type Admin

type Admin struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type AdminInfoVO

type AdminInfoVO struct {
	Username string `json:"username"`
	Picture  string `json:"picture"`
}

type AdminSocialInfoVO

type AdminSocialInfoVO struct {
	Id string `json:"id"`
	SocialInfoVO
}

type BaiduPushConfigVO

type BaiduPushConfigVO struct {
	Site  string `json:"site"`
	Token string `json:"token"`
}

type CarouselRequest

type CarouselRequest struct {
	Id        string `json:"id"`
	Title     string `json:"title"`
	Summary   string `json:"summary"`
	CoverImg  string `json:"cover_img"`
	Show      bool   `json:"show"`
	Color     string `json:"color"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"Updated_at"`
}

type CarouselShowRequest

type CarouselShowRequest struct {
	Show bool `json:"show"`
}

type CarouselVO

type CarouselVO struct {
	Id        string `json:"id"`
	Title     string `json:"title"`
	Summary   string `json:"summary"`
	CoverImg  string `json:"cover_img"`
	Show      bool   `json:"show"`
	Color     string `json:"color"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

type CommentConfigVO

type CommentConfigVO struct {
	EnableComment bool `json:"enable_comment"`
}

type EmailConfigVO

type EmailConfigVO struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

type EmailServer

type EmailServer struct {
	Host     string `json:"host" binding:"required"`
	Port     int    `json:"port"`
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required"`
}

type FriendConfigVO

type FriendConfigVO struct {
	EnableFriendCommit bool   `json:"enable_friend_commit"`
	Introduction       string `json:"introduction"`
}

type FrontPostCountConfigVO

type FrontPostCountConfigVO struct {
	Count int64 `json:"count"`
}

type IndexConfigVO

type IndexConfigVO struct {
	WebsiteConfig      WebsiteConfigVO    `json:"website_config"`
	OwnerConfig        OwnerConfigVO      `json:"owner_config"`
	NoticeConfigVO     NoticeConfigVO     `json:"notice_config"`
	SocialInfoConfigVO SocialInfoConfigVO `json:"social_info_config"`
	PayInfoConfigVO    []PayInfoConfigVO  `json:"pay_info_config"`
	SeoMetaConfigVO    SeoMetaConfigVO    `json:"seo_meta_config"`
	TPSVVO             []TPSVVO           `json:"third_party_site_verification"`
}

IndexConfigVO 首页信息

type InitRequest

type InitRequest struct {
	WebsiteName         string      `json:"website_name" binding:"required"`
	WebsiteIcon         string      `json:"website_icon" binding:"required"`
	WebsiteOwner        string      `json:"website_owner" binding:"required"`
	WebsiteOwnerProfile string      `json:"website_owner_profile" binding:"required"`
	WebsiteOwnerAvatar  string      `json:"website_owner_avatar" binding:"required"`
	EmailServer         EmailServer `json:"email_server" binding:"required"`
	Admin               Admin       `json:"admin" binding:"required"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type LoginVO

type LoginVO struct {
	AdminInfo  AdminInfoVO `json:"admin_info"`
	Expiration int64       `json:"expiration"`
	Token      string      `json:"token"`
}

type NoticeConfigVO

type NoticeConfigVO struct {
	Title       string `json:"title" `
	Content     string `json:"content"`
	PublishTime int64  `json:"publish_time"`
	Enabled     bool   `json:"enabled"`
}

type OwnerConfigVO

type OwnerConfigVO struct {
	Name    string `json:"name"`
	Profile string `json:"profile"`
	Picture string `json:"picture"`
}

type PayInfoConfigVO

type PayInfoConfigVO struct {
	Name  string `json:"name"`
	Image string `json:"image"`
}

type SeoMetaConfigVO

type SeoMetaConfigVO struct {
	Title                 string `json:"title"`
	Description           string `json:"description"`
	OgTitle               string `json:"og_title"`
	OgImage               string `json:"og_image"`
	BaiduSiteVerification string `json:"baidu_site_verification"`
	Keywords              string `json:"keywords"`
	Author                string `json:"author"`
	Robots                string `json:"robots"`
}

type SocialInfoConfigVO

type SocialInfoConfigVO struct {
	SocialInfoList []SocialInfoVO `json:"social_info_list"`
}

type SocialInfoReq

type SocialInfoReq struct {
	SocialName  string `json:"social_name"`
	SocialValue string `json:"social_value"`
	CssClass    string `json:"css_class"`
	IsLink      bool   `json:"is_link"`
}

type SocialInfoVO

type SocialInfoVO struct {
	SocialName  string `json:"social_name"`
	SocialValue string `json:"social_value"`
	CssClass    string `json:"css_class"`
	IsLink      bool   `json:"is_link"`
}

type TPSVRequest

type TPSVRequest struct {
	Key         string `json:"key" binding:"required"`
	Value       string `json:"value" binding:"required"`
	Description string `json:"description" binding:"required"`
}

type TPSVUpdateRequest

type TPSVUpdateRequest struct {
	Value       string `json:"value" binding:"required"`
	Description string `json:"description" binding:"required"`
}

type TPSVVO

type TPSVVO struct {
	Key         string `json:"key"`
	Value       string `json:"value"`
	Description string `json:"description"`
}

type UpdateCommentConfigReq

type UpdateCommentConfigReq struct {
	EnableComment *bool `json:"enable_comment" binding:"required"`
}

type UpdateEmailConfigReq

type UpdateEmailConfigReq struct {
	Host     string `json:"host" binding:"required"`
	Port     int    `json:"port" binding:"required"`
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required"`
}

type UpdateFPCConfigCountReq

type UpdateFPCConfigCountReq struct {
	Count int64 `json:"count" binding:"required"`
}

type UpdateFriendIntroConfigReq

type UpdateFriendIntroConfigReq struct {
	Introduction *string `json:"introduction" binding:"required"`
}

type UpdateFriendSwitchConfigReq

type UpdateFriendSwitchConfigReq struct {
	EnableFriendCommit *bool `json:"enable_friend_commit" binding:"required"`
}

type UpdateNoticeConfigEnabledReq

type UpdateNoticeConfigEnabledReq struct {
	Enabled *bool `json:"enabled" binding:"required"`
}

type UpdateNoticeConfigReq

type UpdateNoticeConfigReq struct {
	Title   string `json:"title" binding:"required"`
	Content string `json:"content" binding:"required"`
}

type UpdateOwnerConfigReq

type UpdateOwnerConfigReq struct {
	Name    string `json:"name" binding:"required"`
	Profile string `json:"profile" binding:"required"`
	Picture string `json:"picture" binding:"required"`
}

type UpdateSeoMetaConfigReq

type UpdateSeoMetaConfigReq struct {
	Title                 string `json:"title,omitempty"`
	Description           string `json:"description" binding:"required"`
	OgTitle               string `json:"og_title,omitempty"`
	Keywords              string `json:"keywords" binding:"required"`
	Author                string `json:"author" binding:"required"`
	Robots                string `json:"robots" binding:"required"`
	OgImage               string `json:"og_image,omitempty"`
	BaiduSiteVerification string `json:"baidu_site_verification"`
}

type UpdateWebsiteConfigReq

type UpdateWebsiteConfigReq struct {
	WebsiteName         string `json:"website_name" binding:"required"`
	WebsiteIcon         string `json:"website_icon" binding:"required"`
	WebsiteOwner        string `json:"website_owner" binding:"required"`
	WebsiteOwnerProfile string `json:"website_owner_profile" binding:"required"`
	WebsiteOwnerAvatar  string `json:"website_owner_avatar" binding:"required"`
	WebsiteRuntime      int64  `json:"website_runtime" binding:"required"`
}

type WebsiteConfigHandler

type WebsiteConfigHandler struct {
	// contains filtered or unexported fields
}

func (*WebsiteConfigHandler) AddCarouselConfig

func (h *WebsiteConfigHandler) AddCarouselConfig(ctx *gin.Context, req CarouselRequest) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminAddPayInfo

func (h *WebsiteConfigHandler) AdminAddPayInfo(ctx *gin.Context, req AddPayInfoRequest) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminAddRecordInWebsiteConfig

func (h *WebsiteConfigHandler) AdminAddRecordInWebsiteConfig(ctx *gin.Context, req AddRecordInWebsiteConfig) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminAddSocialConfig

func (h *WebsiteConfigHandler) AdminAddSocialConfig(ctx *gin.Context, req SocialInfoReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminAddTPSVConfig

func (h *WebsiteConfigHandler) AdminAddTPSVConfig(ctx *gin.Context, req TPSVRequest) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminDeletePayInfo

func (h *WebsiteConfigHandler) AdminDeletePayInfo(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminDeleteRecordInWebsiteConfig

func (h *WebsiteConfigHandler) AdminDeleteRecordInWebsiteConfig(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminDeleteSocialConfig

func (h *WebsiteConfigHandler) AdminDeleteSocialConfig(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminDeleteTPSVConfig

func (h *WebsiteConfigHandler) AdminDeleteTPSVConfig(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminGetCarouselConfig

func (h *WebsiteConfigHandler) AdminGetCarouselConfig(ctx *gin.Context) (*apiwrap.ResponseBody[apiwrap.ListVO[CarouselVO]], error)

func (*WebsiteConfigHandler) AdminGetCommentConfig

func (h *WebsiteConfigHandler) AdminGetCommentConfig(ctx *gin.Context) (*apiwrap.ResponseBody[CommentConfigVO], error)

func (*WebsiteConfigHandler) AdminGetEmailConfig

func (h *WebsiteConfigHandler) AdminGetEmailConfig(ctx *gin.Context) (*apiwrap.ResponseBody[EmailConfigVO], error)

func (*WebsiteConfigHandler) AdminGetFPCConfig

func (*WebsiteConfigHandler) AdminGetFriendConfig

func (h *WebsiteConfigHandler) AdminGetFriendConfig(ctx *gin.Context) (*apiwrap.ResponseBody[FriendConfigVO], error)

func (*WebsiteConfigHandler) AdminGetNoticeConfig

func (h *WebsiteConfigHandler) AdminGetNoticeConfig(ctx *gin.Context) (*apiwrap.ResponseBody[NoticeConfigVO], error)

func (*WebsiteConfigHandler) AdminGetPayConfig

func (*WebsiteConfigHandler) AdminGetPushConfigByKey

func (h *WebsiteConfigHandler) AdminGetPushConfigByKey(ctx *gin.Context) (*apiwrap.ResponseBody[BaiduPushConfigVO], error)

func (*WebsiteConfigHandler) AdminGetSeoConfig

func (h *WebsiteConfigHandler) AdminGetSeoConfig(ctx *gin.Context) (*apiwrap.ResponseBody[SeoMetaConfigVO], error)

func (*WebsiteConfigHandler) AdminGetSocialConfig

func (*WebsiteConfigHandler) AdminGetTPSVConfig

func (h *WebsiteConfigHandler) AdminGetTPSVConfig(ctx *gin.Context) (*apiwrap.ResponseBody[apiwrap.ListVO[TPSVVO]], error)

func (*WebsiteConfigHandler) AdminGetWebsiteConfig

func (h *WebsiteConfigHandler) AdminGetWebsiteConfig(ctx *gin.Context) (*apiwrap.ResponseBody[WebsiteConfigVO], error)

func (*WebsiteConfigHandler) AdminGetWebsiteConfig4Meta

func (h *WebsiteConfigHandler) AdminGetWebsiteConfig4Meta(ctx *gin.Context) (*apiwrap.ResponseBody[WebsiteConfigMetaVO], error)

func (*WebsiteConfigHandler) AdminLogin

func (*WebsiteConfigHandler) AdminUpdateCarouselShowStatus

func (h *WebsiteConfigHandler) AdminUpdateCarouselShowStatus(ctx *gin.Context, req CarouselShowRequest) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateCommentConfig

func (h *WebsiteConfigHandler) AdminUpdateCommentConfig(ctx *gin.Context, req UpdateCommentConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateEmailConfig

func (h *WebsiteConfigHandler) AdminUpdateEmailConfig(ctx *gin.Context, req UpdateEmailConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateFPCConfig

func (h *WebsiteConfigHandler) AdminUpdateFPCConfig(ctx *gin.Context, req UpdateFPCConfigCountReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateIntroduction4FriendConfig

func (h *WebsiteConfigHandler) AdminUpdateIntroduction4FriendConfig(ctx *gin.Context, req UpdateFriendIntroConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateNoticeConfig

func (h *WebsiteConfigHandler) AdminUpdateNoticeConfig(ctx *gin.Context, req UpdateNoticeConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateNoticeEnabled

func (h *WebsiteConfigHandler) AdminUpdateNoticeEnabled(ctx *gin.Context, req UpdateNoticeConfigEnabledReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdatePushConfigByKey

func (h *WebsiteConfigHandler) AdminUpdatePushConfigByKey(ctx *gin.Context, req map[string]any) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateSeoConfig

func (h *WebsiteConfigHandler) AdminUpdateSeoConfig(ctx *gin.Context, req UpdateSeoMetaConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateSocialConfig

func (h *WebsiteConfigHandler) AdminUpdateSocialConfig(ctx *gin.Context, req SocialInfoReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateSwitch4FriendConfig

func (h *WebsiteConfigHandler) AdminUpdateSwitch4FriendConfig(ctx *gin.Context, req UpdateFriendSwitchConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) AdminUpdateWebsiteConfig

func (h *WebsiteConfigHandler) AdminUpdateWebsiteConfig(ctx *gin.Context, req UpdateWebsiteConfigReq) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) DeleteCarouselElem

func (h *WebsiteConfigHandler) DeleteCarouselElem(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) GetCarouselConfig

func (*WebsiteConfigHandler) GetIndexConfig

func (*WebsiteConfigHandler) GetInitStatus

func (h *WebsiteConfigHandler) GetInitStatus(_ *gin.Context) (*apiwrap.ResponseBody[map[string]bool], error)

func (*WebsiteConfigHandler) InitializeWebsite

func (h *WebsiteConfigHandler) InitializeWebsite(ctx *gin.Context, req InitRequest) (*apiwrap.ResponseBody[any], error)

func (*WebsiteConfigHandler) RegisterGinRoutes

func (h *WebsiteConfigHandler) RegisterGinRoutes(engine *gin.Engine)

func (*WebsiteConfigHandler) UpdateCarouselElem

func (h *WebsiteConfigHandler) UpdateCarouselElem(ctx *gin.Context, req CarouselRequest) (*apiwrap.ResponseBody[any], error)

type WebsiteConfigMetaVO

type WebsiteConfigMetaVO struct {
	WebsiteName string `json:"website_name"`
	WebsiteIcon string `json:"website_icon"`
}

type WebsiteConfigVO

type WebsiteConfigVO struct {
	WebsiteName         string   `json:"website_name"`
	WebsiteIcon         string   `json:"website_icon"`
	WebsiteOwner        string   `json:"website_owner"`
	WebsiteOwnerProfile string   `json:"website_owner_profile"`
	WebsiteOwnerAvatar  string   `json:"website_owner_avatar"`
	WebsiteRuntime      int64    `json:"website_runtime,omitempty"`
	WebsiteRecords      []string `json:"website_records,omitempty"`
}

Jump to

Keyboard shortcuts

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