feat: consume generated Go SDK
This commit is contained in:
@@ -3,7 +3,7 @@ package doc_container_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type knowledgeBaseAdapter struct{}
|
||||
|
||||
@@ -3,7 +3,7 @@ package doc_container_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type ownAdapter struct{}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
const defaultContainerName = "own"
|
||||
|
||||
@@ -3,7 +3,7 @@ package doc_type_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type markdownAdapter struct{}
|
||||
|
||||
@@ -3,7 +3,7 @@ package doc_type_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type markdownSlideAdapter struct{}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
const defaultTypeName = "markdown"
|
||||
|
||||
@@ -3,7 +3,7 @@ package doc_type_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type tableAdapter struct{}
|
||||
|
||||
@@ -3,7 +3,7 @@ package doc_type_mapper
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/model"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type yoreseeRichTextAdapter struct{}
|
||||
|
||||
@@ -2,7 +2,7 @@ package template_container_mapper
|
||||
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type knowledgeBaseAdapter struct{}
|
||||
|
||||
@@ -2,7 +2,7 @@ package template_container_mapper
|
||||
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type ownAdapter struct{}
|
||||
|
||||
@@ -2,7 +2,7 @@ package template_container_mapper
|
||||
|
||||
import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type publicAdapter struct{}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
const defaultContainerName = "own"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"connectrpc.com/connect"
|
||||
"github.com/XingfenD/yoresee_doc/internal/repository"
|
||||
"github.com/XingfenD/yoresee_doc/internal/transport/grpcserver"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
func registerHandlers(mux *http.ServeMux, opts []connect.HandlerOption, repos *repository.Repositories) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"connectrpc.com/connect"
|
||||
"github.com/XingfenD/yoresee_doc/internal/repository"
|
||||
"github.com/redis/go-redis/v9"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/h2c"
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/dto"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/auth_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type AuthServiceServer struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/auth_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/comment_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type CommentServiceServer struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/media"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
"github.com/XingfenD/yoresee_doc/internal/utils"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
func baseResponseFromErr(err error) *pb.BaseResponse {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/document_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
"github.com/XingfenD/yoresee_doc/internal/utils"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type DocumentServiceServer struct {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/invitation_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
"github.com/XingfenD/yoresee_doc/internal/utils"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type InvitationServiceServer struct {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/knowledge_base_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
"github.com/XingfenD/yoresee_doc/internal/utils"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type KnowledgeBaseServiceServer struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/auth_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/membership_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type MembershipServiceServer struct {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/auth_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/notification_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type NotificationServiceServer struct {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/config"
|
||||
"github.com/XingfenD/yoresee_doc/internal/repository"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/auth_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/setting_service"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type SettingServiceServer struct {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/XingfenD/yoresee_doc/internal/config"
|
||||
"github.com/XingfenD/yoresee_doc/internal/service/config_service"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
type SystemServiceServer struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package grpcserver
|
||||
import (
|
||||
doc_container_mapper "github.com/XingfenD/yoresee_doc/internal/mapper/doc_container_mapper"
|
||||
"github.com/XingfenD/yoresee_doc/internal/status"
|
||||
pb "github.com/XingfenD/yoresee_doc/pkg/gen/yoresee_doc/v1"
|
||||
pb "git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_go/yoresee_doc/v1"
|
||||
)
|
||||
|
||||
func validateUpdateDocumentRequest(req *pb.UpdateDocumentRequest) error {
|
||||
|
||||
Reference in New Issue
Block a user