service

package
v0.0.0-...-98e323f Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package service 业务逻辑

update 2025-01-04 21:13:05

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIService

type AIService interface {
	GetPrompt(ctx context.Context, req *dto.GetPromptRequest) (rsp *dto.GetPromptResponse, err error)
	GetLatestPrompt(ctx context.Context, req *dto.GetLatestPromptRequest) (rsp *dto.GetLatestPromptResponse, err error)
	ListPrompt(ctx context.Context, req *dto.ListPromptRequest) (rsp *dto.ListPromptResponse, err error)
	CreatePrompt(ctx context.Context, req *dto.CreatePromptRequest) (rsp *dto.EmptyResponse, err error)
	GenerateContentCompletion(ctx context.Context, req *dto.GenerateContentCompletionRequest) (tokenChan <-chan string, errChan <-chan error)
	GenerateArticleSummary(ctx context.Context, req *dto.GenerateArticleSummaryRequest) (tokenChan <-chan string, errChan <-chan error)
	GenerateArticleTranslation(ctx context.Context, req *dto.GenerateArticleQARequest) (tokenChan <-chan string, errChan <-chan error)
	GenerateArticleQA(ctx context.Context, req *dto.GenerateArticleQARequest) (tokenChan <-chan string, errChan <-chan error)
	GenerateTermExplaination(ctx context.Context, req *dto.GenerateTermExplainationRequest) (tokenChan <-chan string, errChan <-chan error)
}

AIService AI服务

author centonhuang
update 2025-01-05 17:57:43

func NewAIService

func NewAIService() AIService

NewAIService 创建AI服务

return AIService
author centonhuang
update 2025-01-05 17:57:43

type ArticleService

type ArticleService interface {
	CreateArticle(ctx context.Context, req *dto.CreateArticleRequest) (rsp *dto.CreateArticleResponse, err error)
	GetArticleInfo(ctx context.Context, req *dto.GetArticleRequest) (rsp *dto.GetArticleResponse, err error)
	GetArticleInfoBySlug(ctx context.Context, req *dto.GetArticleBySlugRequest) (rsp *dto.GetArticleBySlugResponse, err error)
	UpdateArticle(ctx context.Context, req *dto.UpdateArticleRequest) (rsp *dto.EmptyResponse, err error)
	UpdateArticleStatus(ctx context.Context, req *dto.UpdateArticleStatusRequest) (rsp *dto.EmptyResponse, err error)
	DeleteArticle(ctx context.Context, req *dto.DeleteArticleRequest) (rsp *dto.EmptyResponse, err error)
	ListArticles(ctx context.Context, req *dto.ListArticleRequest) (rsp *dto.ListArticleResponse, err error)
}

ArticleService 文章服务

func NewArticleService

func NewArticleService() ArticleService

NewArticleService 创建文章服务

type ArticleVersionService

type ArticleVersionService interface {
	CreateArticleVersion(ctx context.Context, req *dto.CreateArticleVersionRequest) (rsp *dto.CreateArticleVersionResponse, err error)
	GetArticleVersionInfo(ctx context.Context, req *dto.GetArticleVersionRequest) (rsp *dto.GetArticleVersionResponse, err error)
	GetLatestArticleVersionInfo(ctx context.Context, req *dto.GetLatestArticleVersionRequest) (rsp *dto.GetLatestArticleVersionResponse, err error)
	ListArticleVersions(ctx context.Context, req *dto.ListArticleVersionsRequest) (rsp *dto.ListArticleVersionsResponse, err error)
}

ArticleVersionService 文章版本服务

func NewArticleVersionService

func NewArticleVersionService() ArticleVersionService

NewArticleVersionService 创建文章版本服务

type AssetService

type AssetService interface {
	ListUserLikeArticles(ctx context.Context, req *dto.ListUserLikeArticlesRequest) (rsp *dto.ListUserLikeArticlesResponse, err error)
	ListUserLikeComments(ctx context.Context, req *dto.ListUserLikeCommentsRequest) (rsp *dto.ListUserLikeCommentsResponse, err error)
	ListUserLikeTags(ctx context.Context, req *dto.ListUserLikeTagsRequest) (rsp *dto.ListUserLikeTagsResponse, err error)
	ListImages(ctx context.Context, req *dto.EmptyRequest) (rsp *dto.ListImagesResponse, err error)
	UploadImage(ctx context.Context, req *dto.UploadImageRequest) (rsp *dto.EmptyResponse, err error)
	GetImage(ctx context.Context, req *dto.GetImageRequest) (rsp *dto.URLResponse, err error)
	DeleteImage(ctx context.Context, req *dto.DeleteImageRequest) (rsp *dto.EmptyResponse, err error)
	ListUserViewArticles(ctx context.Context, req *dto.ListUserViewArticlesRequest) (rsp *dto.ListUserViewArticlesResponse, err error)
	DeleteUserView(ctx context.Context, req *dto.DeleteUserViewRequest) (rsp *dto.EmptyResponse, err error)
}

AssetService 资产服务

author centonhuang
update 2025-01-05 17:57:43

func NewAssetService

func NewAssetService() AssetService

NewAssetService 创建资产服务

return AssetService
author centonhuang
update 2025-01-05 16:41:39

type CommentService

type CommentService interface {
	CreateArticleComment(ctx context.Context, req *dto.CreateCommentRequest) (rsp *dto.CreateCommentResponse, err error)
	DeleteComment(ctx context.Context, req *dto.DeleteCommentRequest) (rsp *dto.EmptyResponse, err error)
	ListArticleComments(ctx context.Context, req *dto.ListArticleCommentRequest) (rsp *dto.ListArticleCommentResponse, err error)
	ListChildrenComments(ctx context.Context, req *dto.ListChildrenCommentRequest) (rsp *dto.ListChildrenCommentResponse, err error)
}

CommentService 评论服务

func NewCommentService

func NewCommentService() CommentService

NewCommentService 创建评论服务

type Oauth2Service

type Oauth2Service interface {
	Login(ctx context.Context, req *dto.LoginRequest) (rsp *dto.LoginResponse, err error)
	Callback(ctx context.Context, req *dto.CallbackRequest) (rsp *dto.CallbackResponse, err error)
}

Oauth2Service OAuth2服务接口

author centonhuang
update 2025-01-05 21:00:00

func NewGithubOauth2Service

func NewGithubOauth2Service() Oauth2Service

NewGithubOauth2Service 创建Github OAuth2服务

func NewGoogleOauth2Service

func NewGoogleOauth2Service() Oauth2Service

NewGoogleOauth2Service 创建Google OAuth2服务

type OperationService

type OperationService interface {
	LikeArticle(ctx context.Context, req *dto.LikeArticleRequest) (rsp *dto.EmptyResponse, err error)
	LikeComment(ctx context.Context, req *dto.LikeCommentRequest) (rsp *dto.EmptyResponse, err error)
	LikeTag(ctx context.Context, req *dto.LikeTagRequest) (rsp *dto.EmptyResponse, err error)
	LogArticleView(ctx context.Context, req *dto.LogArticleViewRequest) (rsp *dto.EmptyResponse, err error)
}

OperationService 用户操作服务

func NewOperationService

func NewOperationService() OperationService

NewOperationService 创建用户操作服务

type TagService

type TagService interface {
	CreateTag(ctx context.Context, req *dto.CreateTagRequest) (rsp *dto.CreateTagResponse, err error)
	GetTagInfo(ctx context.Context, req *dto.GetTagRequest) (rsp *dto.GetTagResponse, err error)
	UpdateTag(ctx context.Context, req *dto.UpdateTagRequest) (rsp *dto.EmptyResponse, err error)
	DeleteTag(ctx context.Context, req *dto.DeleteTagRequest) (rsp *dto.EmptyResponse, err error)
	ListTags(ctx context.Context, req *dto.ListTagRequest) (rsp *dto.ListTagResponse, err error)
}

TagService 标签服务

author centonhuang
update 2025-10-31 05:45:00

func NewTagService

func NewTagService() TagService

NewTagService 创建标签服务

type TokenService

type TokenService interface {
	RefreshToken(ctx context.Context, req *dto.RefreshTokenRequest) (rsp *dto.RefreshTokenResponse, err error)
}

TokenService 令牌服务

author centonhuang
update 2025-01-05 21:00:00

func NewTokenService

func NewTokenService() TokenService

NewTokenService 创建令牌服务

return TokenService
author centonhuang
update 2025-01-05 21:00:00

type UserService

type UserService interface {
	GetCurUserInfo(ctx context.Context, req *dto.EmptyRequest) (rsp *dto.GetCurrentUserResponse, err error)
	GetUserInfo(ctx context.Context, req *dto.GetUserRequest) (rsp *dto.GetUserResponse, err error)
	UpdateUserInfo(ctx context.Context, req *dto.UpdateUserRequest) (rsp *dto.EmptyResponse, err error)
}

UserService 用户服务

author centonhuang
update 2025-01-04 21:04:00

func NewUserService

func NewUserService() UserService

NewUserService 创建用户服务

return UserService
author centonhuang
update 2025-01-04 21:03:45

Jump to

Keyboard shortcuts

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