Documentation ¶
Index ¶
- func RegisterAbout(i IAbout)
- func RegisterBlog(i IBlog)
- func RegisterCategory(i ICategory)
- func RegisterComment(i IComment)
- func RegisterContext(i IContext)
- func RegisterMiddleware(i IMiddleware)
- func RegisterMoment(i IMoment)
- func RegisterSiteSettings(i ISiteSettings)
- func RegisterTags(i ITags)
- func RegisterUser(i IUser)
- type IAbout
- type IBlog
- type ICategory
- type IComment
- type IContext
- type IMiddleware
- type IMoment
- type ISiteSettings
- type ITags
- type IUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAbout ¶
func RegisterAbout(i IAbout)
func RegisterBlog ¶
func RegisterBlog(i IBlog)
func RegisterCategory ¶
func RegisterCategory(i ICategory)
func RegisterComment ¶
func RegisterComment(i IComment)
func RegisterContext ¶
func RegisterContext(i IContext)
func RegisterMiddleware ¶
func RegisterMiddleware(i IMiddleware)
func RegisterMoment ¶
func RegisterMoment(i IMoment)
func RegisterSiteSettings ¶
func RegisterSiteSettings(i ISiteSettings)
func RegisterTags ¶
func RegisterTags(i ITags)
func RegisterUser ¶
func RegisterUser(i IUser)
Types ¶
type IAbout ¶
type IAbout interface { About(ctx context.Context) (out *model.AboutOutput, err error) UpdateAbout(ctx context.Context, in model.AboutOutput) (err error) }
type IBlog ¶
type IBlog interface { CreateBlog(ctx context.Context, in model.CreateBlogInput) (err error) UpdateBlog(ctx context.Context, in v1.UpdateBlogReq) (err error) BlogsList(ctx context.Context, title string, categroyId, page, size int) (out *model.BlogsListOutput, err error) BlogDetail(ctx context.Context, id int) (out *model.BlogDetailOutput, err error) UpdateBlogTop(ctx context.Context, blogId int, top bool) (err error) UpdateBlogRecommend(ctx context.Context, blogId int, recommend bool) (err error) UpdateBlogVisibility(ctx context.Context, in model.UpdateBlogVisibilityInput) (err error) DeleteBlog(ctx context.Context, blogId int) (err error) NbBlogs(ctx context.Context, page int) (out *model.BlogsListOutput, totalPage int, err error) }
type ICategory ¶
type ICategory interface { GetCategoryList(ctx context.Context) (out []*entity.Category, err error) ShowCategory(ctx context.Context, page, size int) (out *model.AllCategoryOutput, err error) AddCategory(ctx context.Context, name string) (err error) UpdateCategory(ctx context.Context, id int, name string) (err error) DeleteCategory(ctx context.Context, id int) (err error) }
type IComment ¶
type IComment interface { Comment(ctx context.Context, in model.CommentInput) (err error) CommentList(ctx context.Context) (out *model.CommentListOutput, err error) }
type IContext ¶
type IMiddleware ¶
type IMiddleware interface { I18NMiddleware(r *ghttp.Request) ResponseHandler(r *ghttp.Request) MiddlewareCORS(r *ghttp.Request) Ctx(r *ghttp.Request) TokenAuth(r *ghttp.Request) }
func Middleware ¶
func Middleware() IMiddleware
type IMoment ¶
type IMoment interface { CreateMoment(ctx context.Context, in model.CreateMomentInput) (err error) ShowMoments(ctx context.Context, page, size int) (out *model.ShowMomentOutput, err error) UpdatePublishedStatus(ctx context.Context, momentId int, isPublished bool) (err error) MomoentDetil(ctx context.Context, momentId int) (out *model.MomentDetilOutput, err error) UpdateMoment(ctx context.Context, in entity.Moment) (err error) DeleteMoment(ctx context.Context, momenId int) (err error) }
type ISiteSettings ¶
type ISiteSettings interface { SiteSettingsDetil(ctx context.Context) (out *model.SiteSettingsDetilOutput, err error) UpdateSiteSettings(ctx context.Context, in model.UpdateSiteSettingsInput) (err error) Site(ctx context.Context) (out *model.SiteOutput, err error) Badges(ctx context.Context) (out []*model.Badges, err error) Introduction(ctx context.Context) (out *model.Introduction, err error) NewBlogList(ctx context.Context) (out []*model.NewBlogList, err error) RandomBlogList(ctx context.Context) (out []*model.RandomBlogList, err error) SiteInfo(ctx context.Context) (out *model.SiteInfo, err error) }
func SiteSettings ¶
func SiteSettings() ISiteSettings
type ITags ¶
type ITags interface { GetTagsList(ctx context.Context) (out []*entity.Tag, err error) ShowTags(ctx context.Context, page, size int) (out *model.AllTagsOutput, err error) AddTags(ctx context.Context, name, color string) (err error) UpdateTags(ctx context.Context, id int, name, color string) (err error) DeleteTags(ctx context.Context, id int) (err error) }
Click to show internal directories.
Click to hide internal directories.