refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,251 +0,0 @@
|
||||
# CMS Service Makefile
|
||||
|
||||
# 变量定义
|
||||
APP_NAME := cms
|
||||
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0")
|
||||
BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S)
|
||||
GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown")
|
||||
GO_VERSION := $(shell go version | awk '{print $$3}')
|
||||
|
||||
# 构建标志
|
||||
LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s"
|
||||
BUILD_FLAGS := -trimpath $(LDFLAGS)
|
||||
|
||||
# 目录
|
||||
BUILD_DIR := build
|
||||
PROTO_DIR := proto
|
||||
PB_DIR := pb
|
||||
|
||||
# Go环境变量
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.cn,direct
|
||||
export GOPRIVATE=git.apinb.com/*
|
||||
export GONOPROXY=git.apinb.com/*
|
||||
export GOINSECURE=git.apinb.com/*
|
||||
export GONOSUMDB=git.apinb.com/*
|
||||
export GOEXPERIMENT=jsonv2
|
||||
|
||||
.PHONY: help
|
||||
help: ## 显示帮助信息
|
||||
@echo "CMS Service - 可用的命令:"
|
||||
@echo ""
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
|
||||
.PHONY: tidy
|
||||
tidy: ## 下载依赖
|
||||
@echo "下载Go依赖..."
|
||||
go mod download
|
||||
go mod tidy
|
||||
|
||||
.PHONY: buf
|
||||
buf: ## buf生成相关代码
|
||||
@echo "buf生成相关代码..."
|
||||
buf generate
|
||||
@echo "buf生成完成"
|
||||
cd ../../bsm-sdk/client && \
|
||||
git add . && \
|
||||
git commit -m "Auto Update Commit." && \
|
||||
git push
|
||||
|
||||
.PHONY: build
|
||||
build: deps ## 构建应用
|
||||
@echo "构建应用..."
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go
|
||||
@echo "构建完成: $(BUILD_DIR)/$(APP_NAME)"
|
||||
|
||||
.PHONY: build-linux
|
||||
build-linux: deps ## 构建Linux版本
|
||||
@echo "构建Linux版本..."
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go
|
||||
@echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64"
|
||||
|
||||
.PHONY: build-windows
|
||||
build-windows: deps ## 构建Windows版本
|
||||
@echo "构建Windows版本..."
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go
|
||||
@echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe"
|
||||
|
||||
.PHONY: build-darwin
|
||||
build-darwin: deps ## 构建macOS版本
|
||||
@echo "构建macOS版本..."
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go
|
||||
@echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64"
|
||||
|
||||
.PHONY: build-all
|
||||
build-all: build-linux build-windows build-darwin ## 构建所有平台版本
|
||||
|
||||
.PHONY: run
|
||||
run: build ## 运行应用
|
||||
@echo "启动应用..."
|
||||
./$(BUILD_DIR)/$(APP_NAME)
|
||||
|
||||
.PHONY: dev
|
||||
dev: ## 开发模式运行
|
||||
@echo "开发模式启动..."
|
||||
go run ./cmd/main/main.go
|
||||
|
||||
.PHONY: test
|
||||
test: ## 运行测试
|
||||
@echo "运行测试..."
|
||||
go test -v ./...
|
||||
|
||||
.PHONY: test-coverage
|
||||
test-coverage: ## 运行测试并生成覆盖率报告
|
||||
@echo "运行测试覆盖率..."
|
||||
go test -v -coverprofile=coverage.out ./...
|
||||
go tool cover -html=coverage.out -o coverage.html
|
||||
@echo "覆盖率报告生成: coverage.html"
|
||||
|
||||
.PHONY: test-grpc
|
||||
test-grpc: ## 运行gRPC测试
|
||||
@echo "运行gRPC测试..."
|
||||
@if [ -f ./test/grpc/main.go ]; then \
|
||||
go run ./test/grpc/main.go; \
|
||||
else \
|
||||
echo "gRPC测试文件不存在"; \
|
||||
fi
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## 运行代码检查
|
||||
@echo "运行代码检查..."
|
||||
@if command -v golangci-lint >/dev/null 2>&1; then \
|
||||
golangci-lint run; \
|
||||
else \
|
||||
echo "golangci-lint 未安装,使用go vet..."; \
|
||||
go vet ./...; \
|
||||
fi
|
||||
|
||||
.PHONY: fmt
|
||||
fmt: ## 格式化代码
|
||||
@echo "格式化代码..."
|
||||
go fmt ./...
|
||||
@if command -v goimports >/dev/null 2>&1; then \
|
||||
goimports -w .; \
|
||||
fi
|
||||
|
||||
.PHONY: security
|
||||
security: ## 安全检查
|
||||
@echo "运行安全检查..."
|
||||
@if command -v gosec >/dev/null 2>&1; then \
|
||||
gosec ./...; \
|
||||
else \
|
||||
echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \
|
||||
fi
|
||||
|
||||
.PHONY: docker-build
|
||||
docker-build: ## 构建Docker镜像
|
||||
@echo "构建Docker镜像..."
|
||||
docker build -t $(APP_NAME):$(VERSION) .
|
||||
docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest
|
||||
|
||||
.PHONY: docker-run
|
||||
docker-run: ## 运行Docker容器
|
||||
@echo "运行Docker容器..."
|
||||
docker run -d --name $(APP_NAME) -p 12426:12426 -p 12425:12425 $(APP_NAME):latest
|
||||
|
||||
.PHONY: docker-stop
|
||||
docker-stop: ## 停止Docker容器
|
||||
@echo "停止Docker容器..."
|
||||
docker stop $(APP_NAME) || true
|
||||
docker rm $(APP_NAME) || true
|
||||
|
||||
.PHONY: docker-compose-up
|
||||
docker-compose-up: ## 启动docker-compose服务
|
||||
@echo "启动docker-compose服务..."
|
||||
docker-compose up -d
|
||||
|
||||
.PHONY: docker-compose-down
|
||||
docker-compose-down: ## 停止docker-compose服务
|
||||
@echo "停止docker-compose服务..."
|
||||
docker-compose down
|
||||
|
||||
.PHONY: docker-compose-logs
|
||||
docker-compose-logs: ## 查看docker-compose日志
|
||||
docker-compose logs -f
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## 清理构建文件
|
||||
@echo "清理构建文件..."
|
||||
rm -rf $(BUILD_DIR)
|
||||
rm -f coverage.out coverage.html
|
||||
docker system prune -f
|
||||
|
||||
.PHONY: install-tools
|
||||
install-tools: ## 安装开发工具
|
||||
@echo "安装开发工具..."
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
||||
go install github.com/bufbuild/buf/cmd/buf@latest
|
||||
go install git.apinb.com/bsm-tools/protoc-gen-markdown@latest
|
||||
go install git.apinb.com/bsm-tools/protoc-gen-slc@latest
|
||||
go install git.apinb.com/bsm-tools/protoc-gen-ts@latest
|
||||
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
|
||||
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
|
||||
go install github.com/pepabo/protoc-gen-go-client@latest
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
|
||||
.PHONY: update
|
||||
update: ## 更新依赖
|
||||
@echo "更新依赖..."
|
||||
go get -u ./...
|
||||
go mod tidy
|
||||
|
||||
.PHONY: version
|
||||
version: ## 显示版本信息
|
||||
@echo "应用名称: $(APP_NAME)"
|
||||
@echo "版本: $(VERSION)"
|
||||
@echo "构建时间: $(BUILD_TIME)"
|
||||
@echo "Git提交: $(GIT_COMMIT)"
|
||||
@echo "Go版本: $(GO_VERSION)"
|
||||
|
||||
.PHONY: swagger
|
||||
swagger: ## 生成Swagger文档
|
||||
@echo "Swagger文档已通过protobuf生成在swagger目录"
|
||||
|
||||
.PHONY: init-db
|
||||
init-db: ## 初始化数据库
|
||||
@echo "初始化数据库..."
|
||||
@echo "数据库表将在服务启动时自动创建"
|
||||
@echo "请确保数据库连接配置正确"
|
||||
|
||||
.PHONY: backup-db
|
||||
backup-db: ## 备份数据库
|
||||
@echo "备份数据库..."
|
||||
@read -p "请输入数据库连接字符串: " DB_URL; \
|
||||
pg_dump $$DB_URL > backup_$(shell date +%Y%m%d_%H%M%S).sql
|
||||
|
||||
.PHONY: migrate
|
||||
migrate: ## 运行数据库迁移
|
||||
@echo "运行数据库迁移..."
|
||||
go run ./cmd/cli/main.go
|
||||
|
||||
.PHONY: seed
|
||||
seed: ## 填充测试数据
|
||||
@echo "填充测试数据..."
|
||||
@echo "测试数据将在服务启动时自动创建"
|
||||
|
||||
.PHONY: health
|
||||
health: ## 检查服务健康状态
|
||||
@echo "检查服务健康状态..."
|
||||
@curl -f http://localhost:12425/health || echo "服务未运行或健康检查失败"
|
||||
|
||||
.PHONY: logs
|
||||
logs: ## 查看服务日志
|
||||
@echo "查看服务日志..."
|
||||
@if [ -f ./logs/cms.log ]; then \
|
||||
tail -f ./logs/cms.log; \
|
||||
else \
|
||||
echo "日志文件不存在"; \
|
||||
fi
|
||||
|
||||
.PHONY: all
|
||||
all: clean deps proto build test lint ## 执行完整的构建流程
|
||||
|
||||
# 默认目标
|
||||
.DEFAULT_GOAL := help
|
||||
@@ -1,750 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: blocks.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 列表请求参数
|
||||
type FetchRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数
|
||||
PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数
|
||||
Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *FetchRequest) Reset() {
|
||||
*x = FetchRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *FetchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FetchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FetchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FetchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetPageNo() int64 {
|
||||
if x != nil {
|
||||
return x.PageNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetPageSize() int64 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetParams() map[string]string {
|
||||
if x != nil {
|
||||
return x.Params
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 唯一标识请求参数
|
||||
type IdentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *IdentRequest) Reset() {
|
||||
*x = IdentRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *IdentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*IdentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *IdentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IdentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *IdentRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *IdentRequest) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 时序版本号请求参数
|
||||
type VersionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *VersionRequest) Reset() {
|
||||
*x = VersionRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *VersionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*VersionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *VersionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*VersionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *VersionRequest) GetVersion() int64 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 搜索请求参数
|
||||
type SearchRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //<必传>, 关键词
|
||||
PageNo int64 `protobuf:"varint,2,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数
|
||||
PageSize int64 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchRequest) Reset() {
|
||||
*x = SearchRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetKeyword() string {
|
||||
if x != nil {
|
||||
return x.Keyword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetPageNo() int64 {
|
||||
if x != nil {
|
||||
return x.PageNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetPageSize() int64 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type StatusReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态说明
|
||||
Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // 数据
|
||||
Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *StatusReply) Reset() {
|
||||
*x = StatusReply{}
|
||||
mi := &file_blocks_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *StatusReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StatusReply) ProtoMessage() {}
|
||||
|
||||
func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
|
||||
func (*StatusReply) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetCode() int32 {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetDetails() string {
|
||||
if x != nil {
|
||||
return x.Details
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetTimeseq() int64 {
|
||||
if x != nil {
|
||||
return x.Timeseq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 空结构请求
|
||||
type Empty struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Empty) Reset() {
|
||||
*x = Empty{}
|
||||
mi := &file_blocks_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Empty) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Empty) ProtoMessage() {}
|
||||
|
||||
func (x *Empty) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Empty.ProtoReflect.Descriptor instead.
|
||||
func (*Empty) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// 分类
|
||||
type CategoryItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
ParentId int64 `protobuf:"varint,4,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
|
||||
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,6,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,7,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,9,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
|
||||
Child []*CategoryItem `protobuf:"bytes,10,rep,name=child,proto3" json:"child,omitempty"` // 子集
|
||||
CategoryKey string `protobuf:"bytes,11,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CategoryItem) Reset() {
|
||||
*x = CategoryItem{}
|
||||
mi := &file_blocks_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CategoryItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CategoryItem) ProtoMessage() {}
|
||||
|
||||
func (x *CategoryItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CategoryItem.ProtoReflect.Descriptor instead.
|
||||
func (*CategoryItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetSiteIdentity() string {
|
||||
if x != nil {
|
||||
return x.SiteIdentity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetParentId() int64 {
|
||||
if x != nil {
|
||||
return x.ParentId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetCoverPath() string {
|
||||
if x != nil {
|
||||
return x.CoverPath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetIntro() string {
|
||||
if x != nil {
|
||||
return x.Intro
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetUpdatedAt() string {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetChild() []*CategoryItem {
|
||||
if x != nil {
|
||||
return x.Child
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CategoryItem) GetCategoryKey() string {
|
||||
if x != nil {
|
||||
return x.CategoryKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 标签
|
||||
type TagsItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,4,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,5,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,6,opt,name=created_at,proto3" json:"created_at,omitempty"` //创建时间
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TagsItem) Reset() {
|
||||
*x = TagsItem{}
|
||||
mi := &file_blocks_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TagsItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TagsItem) ProtoMessage() {}
|
||||
|
||||
func (x *TagsItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TagsItem.ProtoReflect.Descriptor instead.
|
||||
func (*TagsItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetCoverPath() string {
|
||||
if x != nil {
|
||||
return x.CoverPath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetIntro() string {
|
||||
if x != nil {
|
||||
return x.Intro
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TagsItem) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 附件
|
||||
type AccessoryItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // 附件标题
|
||||
FilePath string `protobuf:"bytes,3,opt,name=file_path,proto3" json:"file_path,omitempty"` // 附件文件路径
|
||||
CreatedAt string `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` //创建时间
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) Reset() {
|
||||
*x = AccessoryItem{}
|
||||
mi := &file_blocks_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccessoryItem) ProtoMessage() {}
|
||||
|
||||
func (x *AccessoryItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccessoryItem.ProtoReflect.Descriptor instead.
|
||||
func (*AccessoryItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) GetFilePath() string {
|
||||
if x != nil {
|
||||
return x.FilePath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessoryItem) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_blocks_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_blocks_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x10cms/blocks.proto\x12\x03cms\"\xb8\x01\n" +
|
||||
"\fFetchRequest\x12\x18\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x125\n" +
|
||||
"\x06params\x18\x03 \x03(\v2\x1d.cms.FetchRequest.ParamsEntryR\x06params\x1a9\n" +
|
||||
"\vParamsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" +
|
||||
"\fIdentRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" +
|
||||
"\x0eVersionRequest\x12\x18\n" +
|
||||
"\aversion\x18\x01 \x01(\x03R\aversion\"a\n" +
|
||||
"\rSearchRequest\x12\x18\n" +
|
||||
"\akeyword\x18\x01 \x01(\tR\akeyword\x12\x18\n" +
|
||||
"\apage_no\x18\x02 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x03 \x01(\x03R\tpage_size\"o\n" +
|
||||
"\vStatusReply\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" +
|
||||
"\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" +
|
||||
"\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\a\n" +
|
||||
"\x05Empty\"\xd7\x02\n" +
|
||||
"\fCategoryItem\x12$\n" +
|
||||
"\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x0e\n" +
|
||||
"\x02id\x18\x02 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x03 \x01(\tR\bidentity\x12\x1c\n" +
|
||||
"\tparent_id\x18\x04 \x01(\x03R\tparent_id\x12\x14\n" +
|
||||
"\x05title\x18\x05 \x01(\tR\x05title\x12\x1e\n" +
|
||||
"\n" +
|
||||
"cover_path\x18\x06 \x01(\tR\n" +
|
||||
"cover_path\x12\x14\n" +
|
||||
"\x05intro\x18\a \x01(\tR\x05intro\x12\x1e\n" +
|
||||
"\n" +
|
||||
"created_at\x18\b \x01(\tR\n" +
|
||||
"created_at\x12\x1e\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\t \x01(\tR\n" +
|
||||
"updated_at\x12'\n" +
|
||||
"\x05child\x18\n" +
|
||||
" \x03(\v2\x11.cms.CategoryItemR\x05child\x12\"\n" +
|
||||
"\fcategory_key\x18\v \x01(\tR\fcategory_key\"\xa2\x01\n" +
|
||||
"\bTagsItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
|
||||
"\x05title\x18\x03 \x01(\tR\x05title\x12\x1e\n" +
|
||||
"\n" +
|
||||
"cover_path\x18\x04 \x01(\tR\n" +
|
||||
"cover_path\x12\x14\n" +
|
||||
"\x05intro\x18\x05 \x01(\tR\x05intro\x12\x1e\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x06 \x01(\tR\n" +
|
||||
"created_at\"\x7f\n" +
|
||||
"\rAccessoryItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x14\n" +
|
||||
"\x05title\x18\x02 \x01(\tR\x05title\x12\x1c\n" +
|
||||
"\tfile_path\x18\x03 \x01(\tR\tfile_path\x12\x1e\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x04 \x01(\tR\n" +
|
||||
"created_atB\aZ\x05.;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_blocks_proto_rawDescOnce sync.Once
|
||||
file_blocks_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_blocks_proto_rawDescGZIP() []byte {
|
||||
file_blocks_proto_rawDescOnce.Do(func() {
|
||||
file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)))
|
||||
})
|
||||
return file_blocks_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_blocks_proto_goTypes = []any{
|
||||
(*FetchRequest)(nil), // 0: cms.FetchRequest
|
||||
(*IdentRequest)(nil), // 1: cms.IdentRequest
|
||||
(*VersionRequest)(nil), // 2: cms.VersionRequest
|
||||
(*SearchRequest)(nil), // 3: cms.SearchRequest
|
||||
(*StatusReply)(nil), // 4: cms.StatusReply
|
||||
(*Empty)(nil), // 5: cms.Empty
|
||||
(*CategoryItem)(nil), // 6: cms.CategoryItem
|
||||
(*TagsItem)(nil), // 7: cms.TagsItem
|
||||
(*AccessoryItem)(nil), // 8: cms.AccessoryItem
|
||||
nil, // 9: cms.FetchRequest.ParamsEntry
|
||||
}
|
||||
var file_blocks_proto_depIdxs = []int32{
|
||||
9, // 0: cms.FetchRequest.params:type_name -> cms.FetchRequest.ParamsEntry
|
||||
6, // 1: cms.CategoryItem.child:type_name -> cms.CategoryItem
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_blocks_proto_init() }
|
||||
func file_blocks_proto_init() {
|
||||
if File_blocks_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_blocks_proto_goTypes,
|
||||
DependencyIndexes: file_blocks_proto_depIdxs,
|
||||
MessageInfos: file_blocks_proto_msgTypes,
|
||||
}.Build()
|
||||
File_blocks_proto = out.File
|
||||
file_blocks_proto_goTypes = nil
|
||||
file_blocks_proto_depIdxs = nil
|
||||
}
|
||||
13
module/base/cms/pb/blocks_compat.go
Normal file
13
module/base/cms/pb/blocks_compat.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package cms
|
||||
|
||||
import blocks "bsm/full/protobuf"
|
||||
|
||||
type Empty = blocks.Empty
|
||||
type FetchRequest = blocks.FetchRequest
|
||||
type IdentRequest = blocks.IdentRequest
|
||||
type VersionRequest = blocks.VersionRequest
|
||||
type SearchRequest = blocks.CmsSearchRequest
|
||||
type StatusReply = blocks.StatusReply
|
||||
type CategoryItem = blocks.CmsCategoryItem
|
||||
type TagsItem = blocks.CmsTagsItem
|
||||
type AccessoryItem = blocks.CmsAccessoryItem
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: category.proto
|
||||
// protoc v7.35.0
|
||||
// source: module/base/cms/proto/category.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -25,7 +26,7 @@ const (
|
||||
type CategoryListReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// 数据
|
||||
Data []*CategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
// 总数
|
||||
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -34,7 +35,7 @@ type CategoryListReply struct {
|
||||
|
||||
func (x *CategoryListReply) Reset() {
|
||||
*x = CategoryListReply{}
|
||||
mi := &file_category_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -46,7 +47,7 @@ func (x *CategoryListReply) String() string {
|
||||
func (*CategoryListReply) ProtoMessage() {}
|
||||
|
||||
func (x *CategoryListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -59,10 +60,10 @@ func (x *CategoryListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CategoryListReply.ProtoReflect.Descriptor instead.
|
||||
func (*CategoryListReply) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CategoryListReply) GetData() []*CategoryItem {
|
||||
func (x *CategoryListReply) GetData() []*protobuf.CmsCategoryItem {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@@ -86,7 +87,7 @@ type AddCategoryResponse struct {
|
||||
|
||||
func (x *AddCategoryResponse) Reset() {
|
||||
*x = AddCategoryResponse{}
|
||||
mi := &file_category_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -98,7 +99,7 @@ func (x *AddCategoryResponse) String() string {
|
||||
func (*AddCategoryResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AddCategoryResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -111,7 +112,7 @@ func (x *AddCategoryResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddCategoryResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AddCategoryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AddCategoryResponse) GetIdentity() string {
|
||||
@@ -123,23 +124,23 @@ func (x *AddCategoryResponse) GetIdentity() string {
|
||||
|
||||
// 添加分类请求
|
||||
type AddCategoryRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码
|
||||
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
|
||||
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
|
||||
Data []*CategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码
|
||||
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
|
||||
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
|
||||
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddCategoryRequest) Reset() {
|
||||
*x = AddCategoryRequest{}
|
||||
mi := &file_category_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -151,7 +152,7 @@ func (x *AddCategoryRequest) String() string {
|
||||
func (*AddCategoryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -164,7 +165,7 @@ func (x *AddCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddCategoryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AddCategoryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{2}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *AddCategoryRequest) GetSiteIdentity() string {
|
||||
@@ -223,7 +224,7 @@ func (x *AddCategoryRequest) GetUpdatedAt() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddCategoryRequest) GetData() []*CategoryItem {
|
||||
func (x *AddCategoryRequest) GetData() []*protobuf.CmsCategoryItem {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@@ -232,24 +233,24 @@ func (x *AddCategoryRequest) GetData() []*CategoryItem {
|
||||
|
||||
// 修改分类请求
|
||||
type ModifyCategoryRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识
|
||||
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
|
||||
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
|
||||
Data []*CategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
|
||||
CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识
|
||||
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
|
||||
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
|
||||
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
|
||||
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
|
||||
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
|
||||
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
|
||||
CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ModifyCategoryRequest) Reset() {
|
||||
*x = ModifyCategoryRequest{}
|
||||
mi := &file_category_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -261,7 +262,7 @@ func (x *ModifyCategoryRequest) String() string {
|
||||
func (*ModifyCategoryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ModifyCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -274,7 +275,7 @@ func (x *ModifyCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ModifyCategoryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ModifyCategoryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{3}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ModifyCategoryRequest) GetSiteIdentity() string {
|
||||
@@ -333,7 +334,7 @@ func (x *ModifyCategoryRequest) GetUpdatedAt() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ModifyCategoryRequest) GetData() []*CategoryItem {
|
||||
func (x *ModifyCategoryRequest) GetData() []*protobuf.CmsCategoryItem {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@@ -357,7 +358,7 @@ type DeleteCategoryRequest struct {
|
||||
|
||||
func (x *DeleteCategoryRequest) Reset() {
|
||||
*x = DeleteCategoryRequest{}
|
||||
mi := &file_category_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -369,7 +370,7 @@ func (x *DeleteCategoryRequest) String() string {
|
||||
func (*DeleteCategoryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -382,7 +383,7 @@ func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteCategoryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteCategoryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{4}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DeleteCategoryRequest) GetIdentity() string {
|
||||
@@ -402,7 +403,7 @@ type KeywordRequest struct {
|
||||
|
||||
func (x *KeywordRequest) Reset() {
|
||||
*x = KeywordRequest{}
|
||||
mi := &file_category_proto_msgTypes[5]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -414,7 +415,7 @@ func (x *KeywordRequest) String() string {
|
||||
func (*KeywordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *KeywordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_category_proto_msgTypes[5]
|
||||
mi := &file_module_base_cms_proto_category_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -427,7 +428,7 @@ func (x *KeywordRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use KeywordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*KeywordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_category_proto_rawDescGZIP(), []int{5}
|
||||
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *KeywordRequest) GetKeyword() string {
|
||||
@@ -437,16 +438,16 @@ func (x *KeywordRequest) GetKeyword() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_category_proto protoreflect.FileDescriptor
|
||||
var File_module_base_cms_proto_category_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_category_proto_rawDesc = "" +
|
||||
const file_module_base_cms_proto_category_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x17base/cms/category.proto\x12\x03cms\x1a\x10cms/blocks.proto\"P\n" +
|
||||
"\x11CategoryListReply\x12%\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x11.cms.CategoryItemR\x04data\x12\x14\n" +
|
||||
"$module/base/cms/proto/category.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"V\n" +
|
||||
"\x11CategoryListReply\x12+\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x03R\x05count\"1\n" +
|
||||
"\x13AddCategoryResponse\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\"\xa7\x02\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\"\xad\x02\n" +
|
||||
"\x12AddCategoryRequest\x12$\n" +
|
||||
"\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1c\n" +
|
||||
@@ -461,8 +462,8 @@ const file_category_proto_rawDesc = "" +
|
||||
"created_at\x12\x1e\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\b \x01(\tR\n" +
|
||||
"updated_at\x12%\n" +
|
||||
"\x04data\x18\t \x03(\v2\x11.cms.CategoryItemR\x04data\"\xce\x02\n" +
|
||||
"updated_at\x12+\n" +
|
||||
"\x04data\x18\t \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\"\xd4\x02\n" +
|
||||
"\x15ModifyCategoryRequest\x12$\n" +
|
||||
"\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1c\n" +
|
||||
@@ -477,56 +478,56 @@ const file_category_proto_rawDesc = "" +
|
||||
"created_at\x12\x1e\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\b \x01(\tR\n" +
|
||||
"updated_at\x12%\n" +
|
||||
"\x04data\x18\t \x03(\v2\x11.cms.CategoryItemR\x04data\x12\"\n" +
|
||||
"updated_at\x12+\n" +
|
||||
"\x04data\x18\t \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\x12\"\n" +
|
||||
"\fcategory_key\x18\n" +
|
||||
" \x01(\tR\fcategory_key\"3\n" +
|
||||
"\x15DeleteCategoryRequest\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\"*\n" +
|
||||
"\x0eKeywordRequest\x12\x18\n" +
|
||||
"\akeyword\x18\x01 \x01(\tR\akeyword2\xe5\x01\n" +
|
||||
"\bCategory\x124\n" +
|
||||
"\x05Fetch\x12\x11.cms.IdentRequest\x1a\x16.cms.CategoryListReply\"\x00\x12/\n" +
|
||||
"\x06Create\x12\x11.cms.CategoryItem\x1a\x10.cms.StatusReply\"\x00\x128\n" +
|
||||
"\x06Modify\x12\x1a.cms.ModifyCategoryRequest\x1a\x10.cms.StatusReply\"\x00\x128\n" +
|
||||
"\x06Delete\x12\x1a.cms.DeleteCategoryRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
||||
"\akeyword\x18\x01 \x01(\tR\akeyword2\xf7\x01\n" +
|
||||
"\bCategory\x127\n" +
|
||||
"\x05Fetch\x12\x14.blocks.IdentRequest\x1a\x16.cms.CategoryListReply\"\x00\x128\n" +
|
||||
"\x06Create\x12\x17.blocks.CmsCategoryItem\x1a\x13.blocks.StatusReply\"\x00\x12;\n" +
|
||||
"\x06Modify\x12\x1a.cms.ModifyCategoryRequest\x1a\x13.blocks.StatusReply\"\x00\x12;\n" +
|
||||
"\x06Delete\x12\x1a.cms.DeleteCategoryRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_category_proto_rawDescOnce sync.Once
|
||||
file_category_proto_rawDescData []byte
|
||||
file_module_base_cms_proto_category_proto_rawDescOnce sync.Once
|
||||
file_module_base_cms_proto_category_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_category_proto_rawDescGZIP() []byte {
|
||||
file_category_proto_rawDescOnce.Do(func() {
|
||||
file_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc)))
|
||||
func file_module_base_cms_proto_category_proto_rawDescGZIP() []byte {
|
||||
file_module_base_cms_proto_category_proto_rawDescOnce.Do(func() {
|
||||
file_module_base_cms_proto_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_category_proto_rawDesc), len(file_module_base_cms_proto_category_proto_rawDesc)))
|
||||
})
|
||||
return file_category_proto_rawDescData
|
||||
return file_module_base_cms_proto_category_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_category_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_category_proto_goTypes = []any{
|
||||
(*CategoryListReply)(nil), // 0: cms.CategoryListReply
|
||||
(*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse
|
||||
(*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest
|
||||
(*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest
|
||||
(*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest
|
||||
(*KeywordRequest)(nil), // 5: cms.KeywordRequest
|
||||
(*CategoryItem)(nil), // 6: cms.CategoryItem
|
||||
(*IdentRequest)(nil), // 7: cms.IdentRequest
|
||||
(*StatusReply)(nil), // 8: cms.StatusReply
|
||||
var file_module_base_cms_proto_category_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_module_base_cms_proto_category_proto_goTypes = []any{
|
||||
(*CategoryListReply)(nil), // 0: cms.CategoryListReply
|
||||
(*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse
|
||||
(*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest
|
||||
(*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest
|
||||
(*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest
|
||||
(*KeywordRequest)(nil), // 5: cms.KeywordRequest
|
||||
(*protobuf.CmsCategoryItem)(nil), // 6: blocks.CmsCategoryItem
|
||||
(*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 8: blocks.StatusReply
|
||||
}
|
||||
var file_category_proto_depIdxs = []int32{
|
||||
6, // 0: cms.CategoryListReply.data:type_name -> cms.CategoryItem
|
||||
6, // 1: cms.AddCategoryRequest.data:type_name -> cms.CategoryItem
|
||||
6, // 2: cms.ModifyCategoryRequest.data:type_name -> cms.CategoryItem
|
||||
7, // 3: cms.Category.Fetch:input_type -> cms.IdentRequest
|
||||
6, // 4: cms.Category.Create:input_type -> cms.CategoryItem
|
||||
var file_module_base_cms_proto_category_proto_depIdxs = []int32{
|
||||
6, // 0: cms.CategoryListReply.data:type_name -> blocks.CmsCategoryItem
|
||||
6, // 1: cms.AddCategoryRequest.data:type_name -> blocks.CmsCategoryItem
|
||||
6, // 2: cms.ModifyCategoryRequest.data:type_name -> blocks.CmsCategoryItem
|
||||
7, // 3: cms.Category.Fetch:input_type -> blocks.IdentRequest
|
||||
6, // 4: cms.Category.Create:input_type -> blocks.CmsCategoryItem
|
||||
3, // 5: cms.Category.Modify:input_type -> cms.ModifyCategoryRequest
|
||||
4, // 6: cms.Category.Delete:input_type -> cms.DeleteCategoryRequest
|
||||
0, // 7: cms.Category.Fetch:output_type -> cms.CategoryListReply
|
||||
8, // 8: cms.Category.Create:output_type -> cms.StatusReply
|
||||
8, // 9: cms.Category.Modify:output_type -> cms.StatusReply
|
||||
8, // 10: cms.Category.Delete:output_type -> cms.StatusReply
|
||||
8, // 8: cms.Category.Create:output_type -> blocks.StatusReply
|
||||
8, // 9: cms.Category.Modify:output_type -> blocks.StatusReply
|
||||
8, // 10: cms.Category.Delete:output_type -> blocks.StatusReply
|
||||
7, // [7:11] is the sub-list for method output_type
|
||||
3, // [3:7] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
@@ -534,27 +535,26 @@ var file_category_proto_depIdxs = []int32{
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_category_proto_init() }
|
||||
func file_category_proto_init() {
|
||||
if File_category_proto != nil {
|
||||
func init() { file_module_base_cms_proto_category_proto_init() }
|
||||
func file_module_base_cms_proto_category_proto_init() {
|
||||
if File_module_base_cms_proto_category_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_category_proto_rawDesc), len(file_module_base_cms_proto_category_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_category_proto_goTypes,
|
||||
DependencyIndexes: file_category_proto_depIdxs,
|
||||
MessageInfos: file_category_proto_msgTypes,
|
||||
GoTypes: file_module_base_cms_proto_category_proto_goTypes,
|
||||
DependencyIndexes: file_module_base_cms_proto_category_proto_depIdxs,
|
||||
MessageInfos: file_module_base_cms_proto_category_proto_msgTypes,
|
||||
}.Build()
|
||||
File_category_proto = out.File
|
||||
file_category_proto_goTypes = nil
|
||||
file_category_proto_depIdxs = nil
|
||||
File_module_base_cms_proto_category_proto = out.File
|
||||
file_module_base_cms_proto_category_proto_goTypes = nil
|
||||
file_module_base_cms_proto_category_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: category.proto
|
||||
// source: module/base/cms/proto/category.proto
|
||||
|
||||
/*
|
||||
Package cms is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryItem
|
||||
protoReq blocks.CmsCategoryItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryItem
|
||||
protoReq blocks.CmsCategoryItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: category.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cms/proto/category.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -32,13 +33,13 @@ const (
|
||||
// CMS - 分类
|
||||
type CategoryClient interface {
|
||||
// 分类列表
|
||||
Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error)
|
||||
Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error)
|
||||
// 添加分类
|
||||
Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *protobuf.CmsCategoryItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改分类
|
||||
Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除分类
|
||||
Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type categoryClient struct {
|
||||
@@ -49,7 +50,7 @@ func NewCategoryClient(cc grpc.ClientConnInterface) CategoryClient {
|
||||
return &categoryClient{cc}
|
||||
}
|
||||
|
||||
func (c *categoryClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) {
|
||||
func (c *categoryClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CategoryListReply)
|
||||
err := c.cc.Invoke(ctx, Category_Fetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -59,9 +60,9 @@ func (c *categoryClient) Fetch(ctx context.Context, in *IdentRequest, opts ...gr
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *categoryClient) Create(ctx context.Context, in *protobuf.CmsCategoryItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Category_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +70,9 @@ func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Category_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -79,9 +80,9 @@ func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Category_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -90,43 +91,41 @@ func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest,
|
||||
}
|
||||
|
||||
// CategoryServer is the server API for Category service.
|
||||
// All implementations must embed UnimplementedCategoryServer
|
||||
// All implementations should embed UnimplementedCategoryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// CMS - 分类
|
||||
type CategoryServer interface {
|
||||
// 分类列表
|
||||
Fetch(context.Context, *IdentRequest) (*CategoryListReply, error)
|
||||
Fetch(context.Context, *protobuf.IdentRequest) (*CategoryListReply, error)
|
||||
// 添加分类
|
||||
Create(context.Context, *CategoryItem) (*StatusReply, error)
|
||||
Create(context.Context, *protobuf.CmsCategoryItem) (*protobuf.StatusReply, error)
|
||||
// 修改分类
|
||||
Modify(context.Context, *ModifyCategoryRequest) (*StatusReply, error)
|
||||
Modify(context.Context, *ModifyCategoryRequest) (*protobuf.StatusReply, error)
|
||||
// 删除分类
|
||||
Delete(context.Context, *DeleteCategoryRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedCategoryServer()
|
||||
Delete(context.Context, *DeleteCategoryRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedCategoryServer must be embedded to have
|
||||
// UnimplementedCategoryServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedCategoryServer struct{}
|
||||
|
||||
func (UnimplementedCategoryServer) Fetch(context.Context, *IdentRequest) (*CategoryListReply, error) {
|
||||
func (UnimplementedCategoryServer) Fetch(context.Context, *protobuf.IdentRequest) (*CategoryListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*StatusReply, error) {
|
||||
func (UnimplementedCategoryServer) Create(context.Context, *protobuf.CmsCategoryItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedCategoryServer) Modify(context.Context, *ModifyCategoryRequest) (*StatusReply, error) {
|
||||
func (UnimplementedCategoryServer) Modify(context.Context, *ModifyCategoryRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedCategoryServer) Delete(context.Context, *DeleteCategoryRequest) (*StatusReply, error) {
|
||||
func (UnimplementedCategoryServer) Delete(context.Context, *DeleteCategoryRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedCategoryServer) mustEmbedUnimplementedCategoryServer() {}
|
||||
func (UnimplementedCategoryServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedCategoryServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeCategoryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CategoryServer will
|
||||
@@ -147,7 +146,7 @@ func RegisterCategoryServer(s grpc.ServiceRegistrar, srv CategoryServer) {
|
||||
}
|
||||
|
||||
func _Category_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -159,13 +158,13 @@ func _Category_Fetch_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Category_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CategoryServer).Fetch(ctx, req.(*IdentRequest))
|
||||
return srv.(CategoryServer).Fetch(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CategoryItem)
|
||||
in := new(protobuf.CmsCategoryItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -177,7 +176,7 @@ func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Category_Create_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CategoryServer).Create(ctx, req.(*CategoryItem))
|
||||
return srv.(CategoryServer).Create(ctx, req.(*protobuf.CmsCategoryItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -243,5 +242,5 @@ var Category_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "category.proto",
|
||||
Metadata: "module/base/cms/proto/category.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: pages.proto
|
||||
// protoc v7.35.0
|
||||
// source: module/base/cms/proto/pages.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -31,7 +32,7 @@ type GetPagesByKeyRequest struct {
|
||||
|
||||
func (x *GetPagesByKeyRequest) Reset() {
|
||||
*x = GetPagesByKeyRequest{}
|
||||
mi := &file_pages_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -43,7 +44,7 @@ func (x *GetPagesByKeyRequest) String() string {
|
||||
func (*GetPagesByKeyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPagesByKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pages_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -56,7 +57,7 @@ func (x *GetPagesByKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetPagesByKeyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPagesByKeyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pages_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetPagesByKeyRequest) GetKey() string {
|
||||
@@ -68,31 +69,31 @@ func (x *GetPagesByKeyRequest) GetKey() string {
|
||||
|
||||
// 文章
|
||||
type PagesItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识
|
||||
CreatedAt string `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,4,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间
|
||||
PostType int32 `protobuf:"varint,5,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型
|
||||
Rights string `protobuf:"bytes,6,opt,name=rights,proto3" json:"rights,omitempty"` //权限
|
||||
Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题
|
||||
Key string `protobuf:"bytes,8,opt,name=key,proto3" json:"key,omitempty"` //<必传> 内容页的key
|
||||
Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` //简介
|
||||
CoverPath string `protobuf:"bytes,10,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面
|
||||
Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容
|
||||
HasAccessory bool `protobuf:"varint,12,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有
|
||||
AccessoryIdentityArray []string `protobuf:"bytes,13,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表
|
||||
AccessoryData []*AccessoryItem `protobuf:"bytes,14,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据
|
||||
TagsData []*TagsItem `protobuf:"bytes,15,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据
|
||||
TagsIdentityArray []string `protobuf:"bytes,16,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表
|
||||
Hits int64 `protobuf:"varint,17,opt,name=hits,proto3" json:"hits,omitempty"` //点击量
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识
|
||||
CreatedAt string `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,4,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间
|
||||
PostType int32 `protobuf:"varint,5,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型
|
||||
Rights string `protobuf:"bytes,6,opt,name=rights,proto3" json:"rights,omitempty"` //权限
|
||||
Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题
|
||||
Key string `protobuf:"bytes,8,opt,name=key,proto3" json:"key,omitempty"` //<必传> 内容页的key
|
||||
Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` //简介
|
||||
CoverPath string `protobuf:"bytes,10,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面
|
||||
Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容
|
||||
HasAccessory bool `protobuf:"varint,12,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有
|
||||
AccessoryIdentityArray []string `protobuf:"bytes,13,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表
|
||||
AccessoryData []*protobuf.CmsAccessoryItem `protobuf:"bytes,14,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据
|
||||
TagsData []*protobuf.CmsTagsItem `protobuf:"bytes,15,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据
|
||||
TagsIdentityArray []string `protobuf:"bytes,16,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表
|
||||
Hits int64 `protobuf:"varint,17,opt,name=hits,proto3" json:"hits,omitempty"` //点击量
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PagesItem) Reset() {
|
||||
*x = PagesItem{}
|
||||
mi := &file_pages_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -104,7 +105,7 @@ func (x *PagesItem) String() string {
|
||||
func (*PagesItem) ProtoMessage() {}
|
||||
|
||||
func (x *PagesItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pages_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -117,7 +118,7 @@ func (x *PagesItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PagesItem.ProtoReflect.Descriptor instead.
|
||||
func (*PagesItem) Descriptor() ([]byte, []int) {
|
||||
return file_pages_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PagesItem) GetSiteIdentity() string {
|
||||
@@ -211,14 +212,14 @@ func (x *PagesItem) GetAccessoryIdentityArray() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PagesItem) GetAccessoryData() []*AccessoryItem {
|
||||
func (x *PagesItem) GetAccessoryData() []*protobuf.CmsAccessoryItem {
|
||||
if x != nil {
|
||||
return x.AccessoryData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PagesItem) GetTagsData() []*TagsItem {
|
||||
func (x *PagesItem) GetTagsData() []*protobuf.CmsTagsItem {
|
||||
if x != nil {
|
||||
return x.TagsData
|
||||
}
|
||||
@@ -252,7 +253,7 @@ type PagesListRequest struct {
|
||||
|
||||
func (x *PagesListRequest) Reset() {
|
||||
*x = PagesListRequest{}
|
||||
mi := &file_pages_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -264,7 +265,7 @@ func (x *PagesListRequest) String() string {
|
||||
func (*PagesListRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PagesListRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pages_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -277,7 +278,7 @@ func (x *PagesListRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PagesListRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PagesListRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pages_proto_rawDescGZIP(), []int{2}
|
||||
return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PagesListRequest) GetPage() int64 {
|
||||
@@ -319,7 +320,7 @@ type PagesListReply struct {
|
||||
|
||||
func (x *PagesListReply) Reset() {
|
||||
*x = PagesListReply{}
|
||||
mi := &file_pages_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -331,7 +332,7 @@ func (x *PagesListReply) String() string {
|
||||
func (*PagesListReply) ProtoMessage() {}
|
||||
|
||||
func (x *PagesListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pages_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -344,7 +345,7 @@ func (x *PagesListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PagesListReply.ProtoReflect.Descriptor instead.
|
||||
func (*PagesListReply) Descriptor() ([]byte, []int) {
|
||||
return file_pages_proto_rawDescGZIP(), []int{3}
|
||||
return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PagesListReply) GetData() []*PagesItem {
|
||||
@@ -371,7 +372,7 @@ type GetPagesRequest struct {
|
||||
|
||||
func (x *GetPagesRequest) Reset() {
|
||||
*x = GetPagesRequest{}
|
||||
mi := &file_pages_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -383,7 +384,7 @@ func (x *GetPagesRequest) String() string {
|
||||
func (*GetPagesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPagesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pages_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_pages_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -396,7 +397,7 @@ func (x *GetPagesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetPagesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPagesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pages_proto_rawDescGZIP(), []int{4}
|
||||
return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetPagesRequest) GetIdentity() string {
|
||||
@@ -406,13 +407,13 @@ func (x *GetPagesRequest) GetIdentity() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_pages_proto protoreflect.FileDescriptor
|
||||
var File_module_base_cms_proto_pages_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_pages_proto_rawDesc = "" +
|
||||
const file_module_base_cms_proto_pages_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x14base/cms/pages.proto\x12\x03cms\x1a\x10cms/blocks.proto\"(\n" +
|
||||
"!module/base/cms/proto/pages.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"(\n" +
|
||||
"\x14GetPagesByKeyRequest\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\"\xd8\x04\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\"\xe4\x04\n" +
|
||||
"\tPagesItem\x12$\n" +
|
||||
"\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1e\n" +
|
||||
@@ -433,9 +434,9 @@ const file_pages_proto_rawDesc = "" +
|
||||
"cover_path\x12\x18\n" +
|
||||
"\acontent\x18\v \x01(\tR\acontent\x12$\n" +
|
||||
"\rhas_accessory\x18\f \x01(\bR\rhas_accessory\x12:\n" +
|
||||
"\x18accessory_identity_array\x18\r \x03(\tR\x18accessory_identity_array\x12:\n" +
|
||||
"\x0eaccessory_data\x18\x0e \x03(\v2\x12.cms.AccessoryItemR\x0eaccessory_data\x12+\n" +
|
||||
"\ttags_data\x18\x0f \x03(\v2\r.cms.TagsItemR\ttags_data\x120\n" +
|
||||
"\x18accessory_identity_array\x18\r \x03(\tR\x18accessory_identity_array\x12@\n" +
|
||||
"\x0eaccessory_data\x18\x0e \x03(\v2\x18.blocks.CmsAccessoryItemR\x0eaccessory_data\x121\n" +
|
||||
"\ttags_data\x18\x0f \x03(\v2\x13.blocks.CmsTagsItemR\ttags_data\x120\n" +
|
||||
"\x13tags_identity_array\x18\x10 \x03(\tR\x13tags_identity_array\x12\x12\n" +
|
||||
"\x04hits\x18\x11 \x01(\x03R\x04hits\"h\n" +
|
||||
"\x10PagesListRequest\x12\x12\n" +
|
||||
@@ -447,55 +448,55 @@ const file_pages_proto_rawDesc = "" +
|
||||
"\x04data\x18\x01 \x03(\v2\x0e.cms.PagesItemR\x04data\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x03R\x05count\"-\n" +
|
||||
"\x0fGetPagesRequest\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity2\xbd\x02\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity2\xc9\x02\n" +
|
||||
"\x05Pages\x125\n" +
|
||||
"\x05Fetch\x12\x15.cms.PagesListRequest\x1a\x13.cms.PagesListReply\"\x00\x127\n" +
|
||||
"\rGetByIdentity\x12\x14.cms.GetPagesRequest\x1a\x0e.cms.PagesItem\"\x00\x127\n" +
|
||||
"\bGetByKey\x12\x19.cms.GetPagesByKeyRequest\x1a\x0e.cms.PagesItem\"\x00\x12,\n" +
|
||||
"\x06Create\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12,\n" +
|
||||
"\x06Modify\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" +
|
||||
"\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
||||
"\bGetByKey\x12\x19.cms.GetPagesByKeyRequest\x1a\x0e.cms.PagesItem\"\x00\x12/\n" +
|
||||
"\x06Create\x12\x0e.cms.PagesItem\x1a\x13.blocks.StatusReply\"\x00\x12/\n" +
|
||||
"\x06Modify\x12\x0e.cms.PagesItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" +
|
||||
"\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_pages_proto_rawDescOnce sync.Once
|
||||
file_pages_proto_rawDescData []byte
|
||||
file_module_base_cms_proto_pages_proto_rawDescOnce sync.Once
|
||||
file_module_base_cms_proto_pages_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_pages_proto_rawDescGZIP() []byte {
|
||||
file_pages_proto_rawDescOnce.Do(func() {
|
||||
file_pages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc)))
|
||||
func file_module_base_cms_proto_pages_proto_rawDescGZIP() []byte {
|
||||
file_module_base_cms_proto_pages_proto_rawDescOnce.Do(func() {
|
||||
file_module_base_cms_proto_pages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_pages_proto_rawDesc), len(file_module_base_cms_proto_pages_proto_rawDesc)))
|
||||
})
|
||||
return file_pages_proto_rawDescData
|
||||
return file_module_base_cms_proto_pages_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pages_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_pages_proto_goTypes = []any{
|
||||
(*GetPagesByKeyRequest)(nil), // 0: cms.GetPagesByKeyRequest
|
||||
(*PagesItem)(nil), // 1: cms.PagesItem
|
||||
(*PagesListRequest)(nil), // 2: cms.PagesListRequest
|
||||
(*PagesListReply)(nil), // 3: cms.PagesListReply
|
||||
(*GetPagesRequest)(nil), // 4: cms.GetPagesRequest
|
||||
(*AccessoryItem)(nil), // 5: cms.AccessoryItem
|
||||
(*TagsItem)(nil), // 6: cms.TagsItem
|
||||
(*IdentRequest)(nil), // 7: cms.IdentRequest
|
||||
(*StatusReply)(nil), // 8: cms.StatusReply
|
||||
var file_module_base_cms_proto_pages_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_module_base_cms_proto_pages_proto_goTypes = []any{
|
||||
(*GetPagesByKeyRequest)(nil), // 0: cms.GetPagesByKeyRequest
|
||||
(*PagesItem)(nil), // 1: cms.PagesItem
|
||||
(*PagesListRequest)(nil), // 2: cms.PagesListRequest
|
||||
(*PagesListReply)(nil), // 3: cms.PagesListReply
|
||||
(*GetPagesRequest)(nil), // 4: cms.GetPagesRequest
|
||||
(*protobuf.CmsAccessoryItem)(nil), // 5: blocks.CmsAccessoryItem
|
||||
(*protobuf.CmsTagsItem)(nil), // 6: blocks.CmsTagsItem
|
||||
(*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 8: blocks.StatusReply
|
||||
}
|
||||
var file_pages_proto_depIdxs = []int32{
|
||||
5, // 0: cms.PagesItem.accessory_data:type_name -> cms.AccessoryItem
|
||||
6, // 1: cms.PagesItem.tags_data:type_name -> cms.TagsItem
|
||||
var file_module_base_cms_proto_pages_proto_depIdxs = []int32{
|
||||
5, // 0: cms.PagesItem.accessory_data:type_name -> blocks.CmsAccessoryItem
|
||||
6, // 1: cms.PagesItem.tags_data:type_name -> blocks.CmsTagsItem
|
||||
1, // 2: cms.PagesListReply.data:type_name -> cms.PagesItem
|
||||
2, // 3: cms.Pages.Fetch:input_type -> cms.PagesListRequest
|
||||
4, // 4: cms.Pages.GetByIdentity:input_type -> cms.GetPagesRequest
|
||||
0, // 5: cms.Pages.GetByKey:input_type -> cms.GetPagesByKeyRequest
|
||||
1, // 6: cms.Pages.Create:input_type -> cms.PagesItem
|
||||
1, // 7: cms.Pages.Modify:input_type -> cms.PagesItem
|
||||
7, // 8: cms.Pages.Delete:input_type -> cms.IdentRequest
|
||||
7, // 8: cms.Pages.Delete:input_type -> blocks.IdentRequest
|
||||
3, // 9: cms.Pages.Fetch:output_type -> cms.PagesListReply
|
||||
1, // 10: cms.Pages.GetByIdentity:output_type -> cms.PagesItem
|
||||
1, // 11: cms.Pages.GetByKey:output_type -> cms.PagesItem
|
||||
8, // 12: cms.Pages.Create:output_type -> cms.StatusReply
|
||||
8, // 13: cms.Pages.Modify:output_type -> cms.StatusReply
|
||||
8, // 14: cms.Pages.Delete:output_type -> cms.StatusReply
|
||||
8, // 12: cms.Pages.Create:output_type -> blocks.StatusReply
|
||||
8, // 13: cms.Pages.Modify:output_type -> blocks.StatusReply
|
||||
8, // 14: cms.Pages.Delete:output_type -> blocks.StatusReply
|
||||
9, // [9:15] is the sub-list for method output_type
|
||||
3, // [3:9] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
@@ -503,27 +504,26 @@ var file_pages_proto_depIdxs = []int32{
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pages_proto_init() }
|
||||
func file_pages_proto_init() {
|
||||
if File_pages_proto != nil {
|
||||
func init() { file_module_base_cms_proto_pages_proto_init() }
|
||||
func file_module_base_cms_proto_pages_proto_init() {
|
||||
if File_module_base_cms_proto_pages_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_pages_proto_rawDesc), len(file_module_base_cms_proto_pages_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_pages_proto_goTypes,
|
||||
DependencyIndexes: file_pages_proto_depIdxs,
|
||||
MessageInfos: file_pages_proto_msgTypes,
|
||||
GoTypes: file_module_base_cms_proto_pages_proto_goTypes,
|
||||
DependencyIndexes: file_module_base_cms_proto_pages_proto_depIdxs,
|
||||
MessageInfos: file_module_base_cms_proto_pages_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pages_proto = out.File
|
||||
file_pages_proto_goTypes = nil
|
||||
file_pages_proto_depIdxs = nil
|
||||
File_module_base_cms_proto_pages_proto = out.File
|
||||
file_module_base_cms_proto_pages_proto_goTypes = nil
|
||||
file_module_base_cms_proto_pages_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: pages.proto
|
||||
// source: module/base/cms/proto/pages.proto
|
||||
|
||||
/*
|
||||
Package cms is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -172,7 +173,7 @@ func local_request_Pages_Modify_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client PagesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -187,7 +188,7 @@ func request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server PagesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: pages.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cms/proto/pages.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -40,11 +41,11 @@ type PagesClient interface {
|
||||
// 获取单页详情 By Key
|
||||
GetByKey(ctx context.Context, in *GetPagesByKeyRequest, opts ...grpc.CallOption) (*PagesItem, error)
|
||||
// 发布单页
|
||||
Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改单页
|
||||
Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除单页
|
||||
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type pagesClient struct {
|
||||
@@ -85,9 +86,9 @@ func (c *pagesClient) GetByKey(ctx context.Context, in *GetPagesByKeyRequest, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Pages_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -95,9 +96,9 @@ func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.Ca
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Pages_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -105,9 +106,9 @@ func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.Ca
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *pagesClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *pagesClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Pages_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -116,7 +117,7 @@ func (c *pagesClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc
|
||||
}
|
||||
|
||||
// PagesServer is the server API for Pages service.
|
||||
// All implementations must embed UnimplementedPagesServer
|
||||
// All implementations should embed UnimplementedPagesServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 单页管理
|
||||
@@ -128,15 +129,14 @@ type PagesServer interface {
|
||||
// 获取单页详情 By Key
|
||||
GetByKey(context.Context, *GetPagesByKeyRequest) (*PagesItem, error)
|
||||
// 发布单页
|
||||
Create(context.Context, *PagesItem) (*StatusReply, error)
|
||||
Create(context.Context, *PagesItem) (*protobuf.StatusReply, error)
|
||||
// 修改单页
|
||||
Modify(context.Context, *PagesItem) (*StatusReply, error)
|
||||
Modify(context.Context, *PagesItem) (*protobuf.StatusReply, error)
|
||||
// 删除单页
|
||||
Delete(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedPagesServer()
|
||||
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedPagesServer must be embedded to have
|
||||
// UnimplementedPagesServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
@@ -152,17 +152,16 @@ func (UnimplementedPagesServer) GetByIdentity(context.Context, *GetPagesRequest)
|
||||
func (UnimplementedPagesServer) GetByKey(context.Context, *GetPagesByKeyRequest) (*PagesItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetByKey not implemented")
|
||||
}
|
||||
func (UnimplementedPagesServer) Create(context.Context, *PagesItem) (*StatusReply, error) {
|
||||
func (UnimplementedPagesServer) Create(context.Context, *PagesItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedPagesServer) Modify(context.Context, *PagesItem) (*StatusReply, error) {
|
||||
func (UnimplementedPagesServer) Modify(context.Context, *PagesItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedPagesServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPagesServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedPagesServer) mustEmbedUnimplementedPagesServer() {}
|
||||
func (UnimplementedPagesServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedPagesServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePagesServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PagesServer will
|
||||
@@ -273,7 +272,7 @@ func _Pages_Modify_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
|
||||
func _Pages_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -285,7 +284,7 @@ func _Pages_Delete_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Pages_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PagesServer).Delete(ctx, req.(*IdentRequest))
|
||||
return srv.(PagesServer).Delete(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -323,5 +322,5 @@ var Pages_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pages.proto",
|
||||
Metadata: "module/base/cms/proto/pages.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: post.proto
|
||||
// protoc v7.35.0
|
||||
// source: module/base/cms/proto/post.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -32,7 +33,7 @@ type DeleteCommentRequest struct {
|
||||
|
||||
func (x *DeleteCommentRequest) Reset() {
|
||||
*x = DeleteCommentRequest{}
|
||||
mi := &file_post_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -44,7 +45,7 @@ func (x *DeleteCommentRequest) String() string {
|
||||
func (*DeleteCommentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -57,7 +58,7 @@ func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteCommentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DeleteCommentRequest) GetIdentity() string {
|
||||
@@ -84,7 +85,7 @@ type GetPostByKeyRequest struct {
|
||||
|
||||
func (x *GetPostByKeyRequest) Reset() {
|
||||
*x = GetPostByKeyRequest{}
|
||||
mi := &file_post_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -96,7 +97,7 @@ func (x *GetPostByKeyRequest) String() string {
|
||||
func (*GetPostByKeyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPostByKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -109,7 +110,7 @@ func (x *GetPostByKeyRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetPostByKeyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPostByKeyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetPostByKeyRequest) GetKey() string {
|
||||
@@ -121,43 +122,41 @@ func (x *GetPostByKeyRequest) GetKey() string {
|
||||
|
||||
// 文章
|
||||
type PostItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识
|
||||
OwnerId int64 `protobuf:"varint,3,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 作者ID
|
||||
OwnerIdentity string `protobuf:"bytes,4,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 作者唯一标识
|
||||
CategoryIdentityArray []string `protobuf:"bytes,5,rep,name=category_identity_array,proto3" json:"category_identity_array,omitempty"` // <必传>,所属分类Identity 列表
|
||||
TagsIdentityArray []string `protobuf:"bytes,6,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表
|
||||
Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题
|
||||
CoverPath string `protobuf:"bytes,8,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面
|
||||
Author string `protobuf:"bytes,9,opt,name=author,proto3" json:"author,omitempty"` // 作者
|
||||
AuthorIdentity string `protobuf:"bytes,10,opt,name=author_identity,proto3" json:"author_identity,omitempty"`
|
||||
Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容
|
||||
TargetUrl string `protobuf:"bytes,12,opt,name=target_url,proto3" json:"target_url,omitempty"` // 跳转目标地址
|
||||
SourceUrl string `protobuf:"bytes,13,opt,name=source_url,proto3" json:"source_url,omitempty"` // 文章来源地址
|
||||
Hits int64 `protobuf:"varint,14,opt,name=hits,proto3" json:"hits,omitempty"` //点击量
|
||||
AccessoryIdentityArray []string `protobuf:"bytes,15,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表
|
||||
HasAccessory bool `protobuf:"varint,16,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有
|
||||
CreatedAt string `protobuf:"bytes,17,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,18,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间
|
||||
Description string `protobuf:"bytes,19,opt,name=description,proto3" json:"description,omitempty"` //简介
|
||||
LikeHits int64 `protobuf:"varint,20,opt,name=like_hits,proto3" json:"like_hits,omitempty"` //点赞量
|
||||
UnlikeHits int64 `protobuf:"varint,21,opt,name=unlike_hits,proto3" json:"unlike_hits,omitempty"` //点踩量
|
||||
CommentHits int64 `protobuf:"varint,22,opt,name=comment_hits,proto3" json:"comment_hits,omitempty"` //评论量
|
||||
PostType int32 `protobuf:"varint,23,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型
|
||||
Rights string `protobuf:"bytes,24,opt,name=rights,proto3" json:"rights,omitempty"` //权限
|
||||
Key string `protobuf:"bytes,25,opt,name=key,proto3" json:"key,omitempty"` // <必传>,文章key
|
||||
CategoryData []*CategoryItem `protobuf:"bytes,26,rep,name=category_data,proto3" json:"category_data,omitempty"` // 分类数据
|
||||
TagsData []*TagsItem `protobuf:"bytes,27,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据
|
||||
AccessoryData []*AccessoryItem `protobuf:"bytes,28,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据
|
||||
// ---- 以下字段来自 models.CmsPost(为兼容保留旧字段号,统一新增在末尾)----
|
||||
Lang string `protobuf:"bytes,29,opt,name=lang,proto3" json:"lang,omitempty"` // 语言
|
||||
SourceOrigin string `protobuf:"bytes,30,opt,name=source_origin,proto3" json:"source_origin,omitempty"` // 来源方简称
|
||||
ExtendUrl string `protobuf:"bytes,31,opt,name=extend_url,proto3" json:"extend_url,omitempty"` // 扩展:URL
|
||||
ExtendData string `protobuf:"bytes,32,opt,name=extend_data,proto3" json:"extend_data,omitempty"` // 扩展:数据
|
||||
ExtendImg string `protobuf:"bytes,33,opt,name=extend_img,proto3" json:"extend_img,omitempty"` // 扩展:图片
|
||||
ExtendDesc string `protobuf:"bytes,34,opt,name=extend_desc,proto3" json:"extend_desc,omitempty"` // 扩展:描述
|
||||
Published string `protobuf:"bytes,35,opt,name=published,proto3" json:"published,omitempty"` // 事件发生时间
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识
|
||||
OwnerId int64 `protobuf:"varint,3,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 作者ID
|
||||
OwnerIdentity string `protobuf:"bytes,4,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 作者唯一标识
|
||||
CategoryIdentityArray []string `protobuf:"bytes,5,rep,name=category_identity_array,proto3" json:"category_identity_array,omitempty"` // <必传>,所属分类Identity 列表
|
||||
TagsIdentityArray []string `protobuf:"bytes,6,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表
|
||||
Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题
|
||||
CoverPath string `protobuf:"bytes,8,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面
|
||||
Author string `protobuf:"bytes,9,opt,name=author,proto3" json:"author,omitempty"` // 作者
|
||||
AuthorIdentity string `protobuf:"bytes,10,opt,name=author_identity,proto3" json:"author_identity,omitempty"`
|
||||
Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容
|
||||
TargetUrl string `protobuf:"bytes,12,opt,name=target_url,proto3" json:"target_url,omitempty"` // 跳转目标地址
|
||||
SourceUrl string `protobuf:"bytes,13,opt,name=source_url,proto3" json:"source_url,omitempty"` // 文章来源地址
|
||||
Hits int64 `protobuf:"varint,14,opt,name=hits,proto3" json:"hits,omitempty"` //点击量
|
||||
AccessoryIdentityArray []string `protobuf:"bytes,15,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表
|
||||
HasAccessory bool `protobuf:"varint,16,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有
|
||||
CreatedAt string `protobuf:"bytes,17,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
UpdatedAt string `protobuf:"bytes,18,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间
|
||||
Description string `protobuf:"bytes,19,opt,name=description,proto3" json:"description,omitempty"` //简介
|
||||
LikeHits int64 `protobuf:"varint,20,opt,name=like_hits,proto3" json:"like_hits,omitempty"` //点赞量
|
||||
UnlikeHits int64 `protobuf:"varint,21,opt,name=unlike_hits,proto3" json:"unlike_hits,omitempty"` //点踩量
|
||||
CommentHits int64 `protobuf:"varint,22,opt,name=comment_hits,proto3" json:"comment_hits,omitempty"` //评论量
|
||||
PostType int32 `protobuf:"varint,23,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型
|
||||
Rights string `protobuf:"bytes,24,opt,name=rights,proto3" json:"rights,omitempty"` //权限
|
||||
CategoryData []*protobuf.CmsCategoryItem `protobuf:"bytes,26,rep,name=category_data,proto3" json:"category_data,omitempty"` // 分类数据
|
||||
TagsData []*protobuf.CmsTagsItem `protobuf:"bytes,27,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据
|
||||
AccessoryData []*protobuf.CmsAccessoryItem `protobuf:"bytes,28,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据
|
||||
Lang string `protobuf:"bytes,29,opt,name=lang,proto3" json:"lang,omitempty"` // 语言
|
||||
SourceOrigin string `protobuf:"bytes,30,opt,name=source_origin,proto3" json:"source_origin,omitempty"` // 来源方简称
|
||||
ExtendUrl string `protobuf:"bytes,31,opt,name=extend_url,proto3" json:"extend_url,omitempty"` // 扩展:URL
|
||||
ExtendData string `protobuf:"bytes,32,opt,name=extend_data,proto3" json:"extend_data,omitempty"` // 扩展:数据
|
||||
ExtendImg string `protobuf:"bytes,33,opt,name=extend_img,proto3" json:"extend_img,omitempty"` // 扩展:图片
|
||||
ExtendDesc string `protobuf:"bytes,34,opt,name=extend_desc,proto3" json:"extend_desc,omitempty"` // 扩展:描述
|
||||
Published string `protobuf:"bytes,35,opt,name=published,proto3" json:"published,omitempty"` // 事件发生时间
|
||||
// 扩展:文章唯一键值(用于URL等)
|
||||
Hash string `protobuf:"bytes,36,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -166,7 +165,7 @@ type PostItem struct {
|
||||
|
||||
func (x *PostItem) Reset() {
|
||||
*x = PostItem{}
|
||||
mi := &file_post_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -178,7 +177,7 @@ func (x *PostItem) String() string {
|
||||
func (*PostItem) ProtoMessage() {}
|
||||
|
||||
func (x *PostItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[2]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -191,7 +190,7 @@ func (x *PostItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PostItem.ProtoReflect.Descriptor instead.
|
||||
func (*PostItem) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{2}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PostItem) GetSiteIdentity() string {
|
||||
@@ -362,28 +361,21 @@ func (x *PostItem) GetRights() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PostItem) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PostItem) GetCategoryData() []*CategoryItem {
|
||||
func (x *PostItem) GetCategoryData() []*protobuf.CmsCategoryItem {
|
||||
if x != nil {
|
||||
return x.CategoryData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PostItem) GetTagsData() []*TagsItem {
|
||||
func (x *PostItem) GetTagsData() []*protobuf.CmsTagsItem {
|
||||
if x != nil {
|
||||
return x.TagsData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PostItem) GetAccessoryData() []*AccessoryItem {
|
||||
func (x *PostItem) GetAccessoryData() []*protobuf.CmsAccessoryItem {
|
||||
if x != nil {
|
||||
return x.AccessoryData
|
||||
}
|
||||
@@ -461,7 +453,7 @@ type PostListRequest struct {
|
||||
|
||||
func (x *PostListRequest) Reset() {
|
||||
*x = PostListRequest{}
|
||||
mi := &file_post_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -473,7 +465,7 @@ func (x *PostListRequest) String() string {
|
||||
func (*PostListRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PostListRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[3]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -486,7 +478,7 @@ func (x *PostListRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PostListRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PostListRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{3}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PostListRequest) GetPage() int64 {
|
||||
@@ -542,7 +534,7 @@ type PostListReply struct {
|
||||
|
||||
func (x *PostListReply) Reset() {
|
||||
*x = PostListReply{}
|
||||
mi := &file_post_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -554,7 +546,7 @@ func (x *PostListReply) String() string {
|
||||
func (*PostListReply) ProtoMessage() {}
|
||||
|
||||
func (x *PostListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[4]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -567,7 +559,7 @@ func (x *PostListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PostListReply.ProtoReflect.Descriptor instead.
|
||||
func (*PostListReply) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{4}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *PostListReply) GetData() []*PostItem {
|
||||
@@ -595,7 +587,7 @@ type GetPostRequest struct {
|
||||
|
||||
func (x *GetPostRequest) Reset() {
|
||||
*x = GetPostRequest{}
|
||||
mi := &file_post_proto_msgTypes[5]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -607,7 +599,7 @@ func (x *GetPostRequest) String() string {
|
||||
func (*GetPostRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[5]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -620,7 +612,7 @@ func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPostRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{5}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetPostRequest) GetIdentity() string {
|
||||
@@ -660,7 +652,7 @@ type CommentItem struct {
|
||||
|
||||
func (x *CommentItem) Reset() {
|
||||
*x = CommentItem{}
|
||||
mi := &file_post_proto_msgTypes[6]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -672,7 +664,7 @@ func (x *CommentItem) String() string {
|
||||
func (*CommentItem) ProtoMessage() {}
|
||||
|
||||
func (x *CommentItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[6]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -685,7 +677,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentItem.ProtoReflect.Descriptor instead.
|
||||
func (*CommentItem) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{6}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *CommentItem) GetIdentity() string {
|
||||
@@ -798,7 +790,7 @@ type CommentListRequest struct {
|
||||
|
||||
func (x *CommentListRequest) Reset() {
|
||||
*x = CommentListRequest{}
|
||||
mi := &file_post_proto_msgTypes[7]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -810,7 +802,7 @@ func (x *CommentListRequest) String() string {
|
||||
func (*CommentListRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CommentListRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[7]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -823,7 +815,7 @@ func (x *CommentListRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentListRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CommentListRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{7}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CommentListRequest) GetPostIdentity() string {
|
||||
@@ -858,7 +850,7 @@ type CommentListResponse struct {
|
||||
|
||||
func (x *CommentListResponse) Reset() {
|
||||
*x = CommentListResponse{}
|
||||
mi := &file_post_proto_msgTypes[8]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -870,7 +862,7 @@ func (x *CommentListResponse) String() string {
|
||||
func (*CommentListResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CommentListResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[8]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -883,7 +875,7 @@ func (x *CommentListResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentListResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CommentListResponse) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{8}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *CommentListResponse) GetList() []*CommentItem {
|
||||
@@ -911,7 +903,7 @@ type PostOpIdentityRequest struct {
|
||||
|
||||
func (x *PostOpIdentityRequest) Reset() {
|
||||
*x = PostOpIdentityRequest{}
|
||||
mi := &file_post_proto_msgTypes[9]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -923,7 +915,7 @@ func (x *PostOpIdentityRequest) String() string {
|
||||
func (*PostOpIdentityRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PostOpIdentityRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[9]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -936,7 +928,7 @@ func (x *PostOpIdentityRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PostOpIdentityRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PostOpIdentityRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{9}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *PostOpIdentityRequest) GetPostIdentity() string {
|
||||
@@ -964,7 +956,7 @@ type CommentOpIdentityRequest struct {
|
||||
|
||||
func (x *CommentOpIdentityRequest) Reset() {
|
||||
*x = CommentOpIdentityRequest{}
|
||||
mi := &file_post_proto_msgTypes[10]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -976,7 +968,7 @@ func (x *CommentOpIdentityRequest) String() string {
|
||||
func (*CommentOpIdentityRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CommentOpIdentityRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[10]
|
||||
mi := &file_module_base_cms_proto_post_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -989,7 +981,7 @@ func (x *CommentOpIdentityRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentOpIdentityRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CommentOpIdentityRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{10}
|
||||
return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *CommentOpIdentityRequest) GetCommentIdentity() string {
|
||||
@@ -1006,12 +998,11 @@ func (x *CommentOpIdentityRequest) GetOpIdentity() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_post_proto protoreflect.FileDescriptor
|
||||
var File_module_base_cms_proto_post_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_post_proto_rawDesc = "" +
|
||||
const file_module_base_cms_proto_post_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13" +
|
||||
"base/cms/post.proto\x12\x03cms\x1a\x10cms/blocks.proto\"X\n" +
|
||||
" module/base/cms/proto/post.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"X\n" +
|
||||
"\x14DeleteCommentRequest\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12$\n" +
|
||||
"\rpost_identity\x18\x02 \x01(\tR\rpost_identity\"'\n" +
|
||||
@@ -1052,11 +1043,10 @@ const file_post_proto_rawDesc = "" +
|
||||
"\vunlike_hits\x18\x15 \x01(\x03R\vunlike_hits\x12\"\n" +
|
||||
"\fcomment_hits\x18\x16 \x01(\x03R\fcomment_hits\x12\x1c\n" +
|
||||
"\tpost_type\x18\x17 \x01(\x05R\tpost_type\x12\x16\n" +
|
||||
"\x06rights\x18\x18 \x01(\tR\x06rights\x12\x10\n" +
|
||||
"\x03key\x18\x19 \x01(\tR\x03key\x127\n" +
|
||||
"\rcategory_data\x18\x1a \x03(\v2\x11.cms.CategoryItemR\rcategory_data\x12+\n" +
|
||||
"\ttags_data\x18\x1b \x03(\v2\r.cms.TagsItemR\ttags_data\x12:\n" +
|
||||
"\x0eaccessory_data\x18\x1c \x03(\v2\x12.cms.AccessoryItemR\x0eaccessory_data\x12\x12\n" +
|
||||
"\x06rights\x18\x18 \x01(\tR\x06rights\x12=\n" +
|
||||
"\rcategory_data\x18\x1a \x03(\v2\x17.blocks.CmsCategoryItemR\rcategory_data\x121\n" +
|
||||
"\ttags_data\x18\x1b \x03(\v2\x13.blocks.CmsTagsItemR\ttags_data\x12@\n" +
|
||||
"\x0eaccessory_data\x18\x1c \x03(\v2\x18.blocks.CmsAccessoryItemR\x0eaccessory_data\x12\x12\n" +
|
||||
"\x04lang\x18\x1d \x01(\tR\x04lang\x12$\n" +
|
||||
"\rsource_origin\x18\x1e \x01(\tR\rsource_origin\x12\x1e\n" +
|
||||
"\n" +
|
||||
@@ -1116,75 +1106,75 @@ const file_post_proto_rawDesc = "" +
|
||||
"\vop_identity\x18\x02 \x01(\tR\vop_identity\"h\n" +
|
||||
"\x18CommentOpIdentityRequest\x12*\n" +
|
||||
"\x10comment_identity\x18\x01 \x01(\tR\x10comment_identity\x12 \n" +
|
||||
"\vop_identity\x18\x02 \x01(\tR\vop_identity2\xf7\b\n" +
|
||||
"\vop_identity\x18\x02 \x01(\tR\vop_identity2\xaa\t\n" +
|
||||
"\x04Post\x123\n" +
|
||||
"\x05Fetch\x12\x14.cms.PostListRequest\x1a\x12.cms.PostListReply\"\x00\x125\n" +
|
||||
"\rGetByIdentity\x12\x13.cms.GetPostRequest\x1a\r.cms.PostItem\"\x00\x125\n" +
|
||||
"\bGetByKey\x12\x18.cms.GetPostByKeyRequest\x1a\r.cms.PostItem\"\x00\x122\n" +
|
||||
"\x06Search\x12\x12.cms.SearchRequest\x1a\x12.cms.PostListReply\"\x00\x12+\n" +
|
||||
"\x06Create\x12\r.cms.PostItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" +
|
||||
"\x06Modify\x12\r.cms.PostItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" +
|
||||
"\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00\x12>\n" +
|
||||
"\fIncrPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12>\n" +
|
||||
"\fDescPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12@\n" +
|
||||
"\x0eIncrPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12@\n" +
|
||||
"\x0eDescPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12B\n" +
|
||||
"\vCommentList\x12\x17.cms.CommentListRequest\x1a\x18.cms.CommentListResponse\"\x00\x122\n" +
|
||||
"\bGetByKey\x12\x18.cms.GetPostByKeyRequest\x1a\r.cms.PostItem\"\x00\x128\n" +
|
||||
"\x06Search\x12\x18.blocks.CmsSearchRequest\x1a\x12.cms.PostListReply\"\x00\x12.\n" +
|
||||
"\x06Create\x12\r.cms.PostItem\x1a\x13.blocks.StatusReply\"\x00\x12.\n" +
|
||||
"\x06Modify\x12\r.cms.PostItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" +
|
||||
"\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00\x12A\n" +
|
||||
"\fIncrPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12A\n" +
|
||||
"\fDescPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12C\n" +
|
||||
"\x0eIncrPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12C\n" +
|
||||
"\x0eDescPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12B\n" +
|
||||
"\vCommentList\x12\x17.cms.CommentListRequest\x1a\x18.cms.CommentListResponse\"\x00\x125\n" +
|
||||
"\n" +
|
||||
"AddComment\x12\x10.cms.CommentItem\x1a\x10.cms.StatusReply\"\x00\x125\n" +
|
||||
"\rModifyComment\x12\x10.cms.CommentItem\x1a\x10.cms.StatusReply\"\x00\x12>\n" +
|
||||
"\rDeleteComment\x12\x19.cms.DeleteCommentRequest\x1a\x10.cms.StatusReply\"\x00\x12D\n" +
|
||||
"\x0fIncrCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12D\n" +
|
||||
"\x0fDescCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12F\n" +
|
||||
"\x11IncrCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12F\n" +
|
||||
"\x11DescCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
||||
"AddComment\x12\x10.cms.CommentItem\x1a\x13.blocks.StatusReply\"\x00\x128\n" +
|
||||
"\rModifyComment\x12\x10.cms.CommentItem\x1a\x13.blocks.StatusReply\"\x00\x12A\n" +
|
||||
"\rDeleteComment\x12\x19.cms.DeleteCommentRequest\x1a\x13.blocks.StatusReply\"\x00\x12G\n" +
|
||||
"\x0fIncrCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12G\n" +
|
||||
"\x0fDescCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12I\n" +
|
||||
"\x11IncrCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12I\n" +
|
||||
"\x11DescCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_post_proto_rawDescOnce sync.Once
|
||||
file_post_proto_rawDescData []byte
|
||||
file_module_base_cms_proto_post_proto_rawDescOnce sync.Once
|
||||
file_module_base_cms_proto_post_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_post_proto_rawDescGZIP() []byte {
|
||||
file_post_proto_rawDescOnce.Do(func() {
|
||||
file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)))
|
||||
func file_module_base_cms_proto_post_proto_rawDescGZIP() []byte {
|
||||
file_module_base_cms_proto_post_proto_rawDescOnce.Do(func() {
|
||||
file_module_base_cms_proto_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_post_proto_rawDesc), len(file_module_base_cms_proto_post_proto_rawDesc)))
|
||||
})
|
||||
return file_post_proto_rawDescData
|
||||
return file_module_base_cms_proto_post_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_post_proto_goTypes = []any{
|
||||
(*DeleteCommentRequest)(nil), // 0: cms.DeleteCommentRequest
|
||||
(*GetPostByKeyRequest)(nil), // 1: cms.GetPostByKeyRequest
|
||||
(*PostItem)(nil), // 2: cms.PostItem
|
||||
(*PostListRequest)(nil), // 3: cms.PostListRequest
|
||||
(*PostListReply)(nil), // 4: cms.PostListReply
|
||||
(*GetPostRequest)(nil), // 5: cms.GetPostRequest
|
||||
(*CommentItem)(nil), // 6: cms.CommentItem
|
||||
(*CommentListRequest)(nil), // 7: cms.CommentListRequest
|
||||
(*CommentListResponse)(nil), // 8: cms.CommentListResponse
|
||||
(*PostOpIdentityRequest)(nil), // 9: cms.PostOpIdentityRequest
|
||||
(*CommentOpIdentityRequest)(nil), // 10: cms.CommentOpIdentityRequest
|
||||
(*CategoryItem)(nil), // 11: cms.CategoryItem
|
||||
(*TagsItem)(nil), // 12: cms.TagsItem
|
||||
(*AccessoryItem)(nil), // 13: cms.AccessoryItem
|
||||
(*SearchRequest)(nil), // 14: cms.SearchRequest
|
||||
(*IdentRequest)(nil), // 15: cms.IdentRequest
|
||||
(*StatusReply)(nil), // 16: cms.StatusReply
|
||||
var file_module_base_cms_proto_post_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_module_base_cms_proto_post_proto_goTypes = []any{
|
||||
(*DeleteCommentRequest)(nil), // 0: cms.DeleteCommentRequest
|
||||
(*GetPostByKeyRequest)(nil), // 1: cms.GetPostByKeyRequest
|
||||
(*PostItem)(nil), // 2: cms.PostItem
|
||||
(*PostListRequest)(nil), // 3: cms.PostListRequest
|
||||
(*PostListReply)(nil), // 4: cms.PostListReply
|
||||
(*GetPostRequest)(nil), // 5: cms.GetPostRequest
|
||||
(*CommentItem)(nil), // 6: cms.CommentItem
|
||||
(*CommentListRequest)(nil), // 7: cms.CommentListRequest
|
||||
(*CommentListResponse)(nil), // 8: cms.CommentListResponse
|
||||
(*PostOpIdentityRequest)(nil), // 9: cms.PostOpIdentityRequest
|
||||
(*CommentOpIdentityRequest)(nil), // 10: cms.CommentOpIdentityRequest
|
||||
(*protobuf.CmsCategoryItem)(nil), // 11: blocks.CmsCategoryItem
|
||||
(*protobuf.CmsTagsItem)(nil), // 12: blocks.CmsTagsItem
|
||||
(*protobuf.CmsAccessoryItem)(nil), // 13: blocks.CmsAccessoryItem
|
||||
(*protobuf.CmsSearchRequest)(nil), // 14: blocks.CmsSearchRequest
|
||||
(*protobuf.IdentRequest)(nil), // 15: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 16: blocks.StatusReply
|
||||
}
|
||||
var file_post_proto_depIdxs = []int32{
|
||||
11, // 0: cms.PostItem.category_data:type_name -> cms.CategoryItem
|
||||
12, // 1: cms.PostItem.tags_data:type_name -> cms.TagsItem
|
||||
13, // 2: cms.PostItem.accessory_data:type_name -> cms.AccessoryItem
|
||||
var file_module_base_cms_proto_post_proto_depIdxs = []int32{
|
||||
11, // 0: cms.PostItem.category_data:type_name -> blocks.CmsCategoryItem
|
||||
12, // 1: cms.PostItem.tags_data:type_name -> blocks.CmsTagsItem
|
||||
13, // 2: cms.PostItem.accessory_data:type_name -> blocks.CmsAccessoryItem
|
||||
2, // 3: cms.PostListReply.data:type_name -> cms.PostItem
|
||||
6, // 4: cms.CommentItem.list:type_name -> cms.CommentItem
|
||||
6, // 5: cms.CommentListResponse.list:type_name -> cms.CommentItem
|
||||
3, // 6: cms.Post.Fetch:input_type -> cms.PostListRequest
|
||||
5, // 7: cms.Post.GetByIdentity:input_type -> cms.GetPostRequest
|
||||
1, // 8: cms.Post.GetByKey:input_type -> cms.GetPostByKeyRequest
|
||||
14, // 9: cms.Post.Search:input_type -> cms.SearchRequest
|
||||
14, // 9: cms.Post.Search:input_type -> blocks.CmsSearchRequest
|
||||
2, // 10: cms.Post.Create:input_type -> cms.PostItem
|
||||
2, // 11: cms.Post.Modify:input_type -> cms.PostItem
|
||||
15, // 12: cms.Post.Delete:input_type -> cms.IdentRequest
|
||||
15, // 12: cms.Post.Delete:input_type -> blocks.IdentRequest
|
||||
9, // 13: cms.Post.IncrPostLike:input_type -> cms.PostOpIdentityRequest
|
||||
9, // 14: cms.Post.DescPostLike:input_type -> cms.PostOpIdentityRequest
|
||||
9, // 15: cms.Post.IncrPostUnlike:input_type -> cms.PostOpIdentityRequest
|
||||
@@ -1201,21 +1191,21 @@ var file_post_proto_depIdxs = []int32{
|
||||
2, // 26: cms.Post.GetByIdentity:output_type -> cms.PostItem
|
||||
2, // 27: cms.Post.GetByKey:output_type -> cms.PostItem
|
||||
4, // 28: cms.Post.Search:output_type -> cms.PostListReply
|
||||
16, // 29: cms.Post.Create:output_type -> cms.StatusReply
|
||||
16, // 30: cms.Post.Modify:output_type -> cms.StatusReply
|
||||
16, // 31: cms.Post.Delete:output_type -> cms.StatusReply
|
||||
16, // 32: cms.Post.IncrPostLike:output_type -> cms.StatusReply
|
||||
16, // 33: cms.Post.DescPostLike:output_type -> cms.StatusReply
|
||||
16, // 34: cms.Post.IncrPostUnlike:output_type -> cms.StatusReply
|
||||
16, // 35: cms.Post.DescPostUnlike:output_type -> cms.StatusReply
|
||||
16, // 29: cms.Post.Create:output_type -> blocks.StatusReply
|
||||
16, // 30: cms.Post.Modify:output_type -> blocks.StatusReply
|
||||
16, // 31: cms.Post.Delete:output_type -> blocks.StatusReply
|
||||
16, // 32: cms.Post.IncrPostLike:output_type -> blocks.StatusReply
|
||||
16, // 33: cms.Post.DescPostLike:output_type -> blocks.StatusReply
|
||||
16, // 34: cms.Post.IncrPostUnlike:output_type -> blocks.StatusReply
|
||||
16, // 35: cms.Post.DescPostUnlike:output_type -> blocks.StatusReply
|
||||
8, // 36: cms.Post.CommentList:output_type -> cms.CommentListResponse
|
||||
16, // 37: cms.Post.AddComment:output_type -> cms.StatusReply
|
||||
16, // 38: cms.Post.ModifyComment:output_type -> cms.StatusReply
|
||||
16, // 39: cms.Post.DeleteComment:output_type -> cms.StatusReply
|
||||
16, // 40: cms.Post.IncrCommentLike:output_type -> cms.StatusReply
|
||||
16, // 41: cms.Post.DescCommentLike:output_type -> cms.StatusReply
|
||||
16, // 42: cms.Post.IncrCommentUnlike:output_type -> cms.StatusReply
|
||||
16, // 43: cms.Post.DescCommentUnlike:output_type -> cms.StatusReply
|
||||
16, // 37: cms.Post.AddComment:output_type -> blocks.StatusReply
|
||||
16, // 38: cms.Post.ModifyComment:output_type -> blocks.StatusReply
|
||||
16, // 39: cms.Post.DeleteComment:output_type -> blocks.StatusReply
|
||||
16, // 40: cms.Post.IncrCommentLike:output_type -> blocks.StatusReply
|
||||
16, // 41: cms.Post.DescCommentLike:output_type -> blocks.StatusReply
|
||||
16, // 42: cms.Post.IncrCommentUnlike:output_type -> blocks.StatusReply
|
||||
16, // 43: cms.Post.DescCommentUnlike:output_type -> blocks.StatusReply
|
||||
25, // [25:44] is the sub-list for method output_type
|
||||
6, // [6:25] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
@@ -1223,27 +1213,26 @@ var file_post_proto_depIdxs = []int32{
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_post_proto_init() }
|
||||
func file_post_proto_init() {
|
||||
if File_post_proto != nil {
|
||||
func init() { file_module_base_cms_proto_post_proto_init() }
|
||||
func file_module_base_cms_proto_post_proto_init() {
|
||||
if File_module_base_cms_proto_post_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_post_proto_rawDesc), len(file_module_base_cms_proto_post_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_post_proto_goTypes,
|
||||
DependencyIndexes: file_post_proto_depIdxs,
|
||||
MessageInfos: file_post_proto_msgTypes,
|
||||
GoTypes: file_module_base_cms_proto_post_proto_goTypes,
|
||||
DependencyIndexes: file_module_base_cms_proto_post_proto_depIdxs,
|
||||
MessageInfos: file_module_base_cms_proto_post_proto_msgTypes,
|
||||
}.Build()
|
||||
File_post_proto = out.File
|
||||
file_post_proto_goTypes = nil
|
||||
file_post_proto_depIdxs = nil
|
||||
File_module_base_cms_proto_post_proto = out.File
|
||||
file_module_base_cms_proto_post_proto_goTypes = nil
|
||||
file_module_base_cms_proto_post_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: post.proto
|
||||
// source: module/base/cms/proto/post.proto
|
||||
|
||||
/*
|
||||
Package cms is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -118,7 +119,7 @@ func local_request_Post_GetByKey_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq SearchRequest
|
||||
protoReq blocks.CmsSearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -133,7 +134,7 @@ func request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq SearchRequest
|
||||
protoReq blocks.CmsSearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -199,7 +200,7 @@ func local_request_Post_Modify_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -214,7 +215,7 @@ func request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: post.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cms/proto/post.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -53,37 +54,37 @@ type PostClient interface {
|
||||
// 获取文章详情 By Key
|
||||
GetByKey(ctx context.Context, in *GetPostByKeyRequest, opts ...grpc.CallOption) (*PostItem, error)
|
||||
// 搜索文章
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Search(ctx context.Context, in *protobuf.CmsSearchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
// 发布文章
|
||||
Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改文章
|
||||
Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除文章
|
||||
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 文章点赞处理
|
||||
IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 文章点赞取消处理
|
||||
DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 文章点踩处理
|
||||
IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 文章点踩取消处理
|
||||
DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 评论列表
|
||||
CommentList(ctx context.Context, in *CommentListRequest, opts ...grpc.CallOption) (*CommentListResponse, error)
|
||||
// 发布评论
|
||||
AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改评论
|
||||
ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除评论
|
||||
DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 评论点赞处理
|
||||
IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 评论点赞取消处理
|
||||
DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 评论点踩处理
|
||||
IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 评论点踩取消处理
|
||||
DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type postClient struct {
|
||||
@@ -124,7 +125,7 @@ func (c *postClient) GetByKey(ctx context.Context, in *GetPostByKeyRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *postClient) Search(ctx context.Context, in *protobuf.CmsSearchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
err := c.cc.Invoke(ctx, Post_Search_FullMethodName, in, out, cOpts...)
|
||||
@@ -134,9 +135,9 @@ func (c *postClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -144,9 +145,9 @@ func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -154,9 +155,9 @@ func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -164,9 +165,9 @@ func (c *postClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_IncrPostLike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -174,9 +175,9 @@ func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DescPostLike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -184,9 +185,9 @@ func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_IncrPostUnlike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -194,9 +195,9 @@ func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityReque
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DescPostUnlike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -214,9 +215,9 @@ func (c *postClient) CommentList(ctx context.Context, in *CommentListRequest, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_AddComment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -224,9 +225,9 @@ func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...gr
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_ModifyComment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -234,9 +235,9 @@ func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ..
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DeleteComment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -244,9 +245,9 @@ func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_IncrCommentLike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -254,9 +255,9 @@ func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityR
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DescCommentLike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -264,9 +265,9 @@ func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityR
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_IncrCommentUnlike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -274,9 +275,9 @@ func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentit
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DescCommentUnlike_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -285,7 +286,7 @@ func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentit
|
||||
}
|
||||
|
||||
// PostServer is the server API for Post service.
|
||||
// All implementations must embed UnimplementedPostServer
|
||||
// All implementations should embed UnimplementedPostServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 正文
|
||||
@@ -297,41 +298,40 @@ type PostServer interface {
|
||||
// 获取文章详情 By Key
|
||||
GetByKey(context.Context, *GetPostByKeyRequest) (*PostItem, error)
|
||||
// 搜索文章
|
||||
Search(context.Context, *SearchRequest) (*PostListReply, error)
|
||||
Search(context.Context, *protobuf.CmsSearchRequest) (*PostListReply, error)
|
||||
// 发布文章
|
||||
Create(context.Context, *PostItem) (*StatusReply, error)
|
||||
Create(context.Context, *PostItem) (*protobuf.StatusReply, error)
|
||||
// 修改文章
|
||||
Modify(context.Context, *PostItem) (*StatusReply, error)
|
||||
Modify(context.Context, *PostItem) (*protobuf.StatusReply, error)
|
||||
// 删除文章
|
||||
Delete(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
// 文章点赞处理
|
||||
IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
||||
IncrPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 文章点赞取消处理
|
||||
DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
||||
DescPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 文章点踩处理
|
||||
IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
||||
IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 文章点踩取消处理
|
||||
DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
||||
DescPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 评论列表
|
||||
CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error)
|
||||
// 发布评论
|
||||
AddComment(context.Context, *CommentItem) (*StatusReply, error)
|
||||
AddComment(context.Context, *CommentItem) (*protobuf.StatusReply, error)
|
||||
// 修改评论
|
||||
ModifyComment(context.Context, *CommentItem) (*StatusReply, error)
|
||||
ModifyComment(context.Context, *CommentItem) (*protobuf.StatusReply, error)
|
||||
// 删除评论
|
||||
DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error)
|
||||
DeleteComment(context.Context, *DeleteCommentRequest) (*protobuf.StatusReply, error)
|
||||
// 评论点赞处理
|
||||
IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
||||
IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 评论点赞取消处理
|
||||
DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
||||
DescCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 评论点踩处理
|
||||
IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
||||
IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
// 评论点踩取消处理
|
||||
DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedPostServer()
|
||||
DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedPostServer must be embedded to have
|
||||
// UnimplementedPostServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
@@ -347,56 +347,55 @@ func (UnimplementedPostServer) GetByIdentity(context.Context, *GetPostRequest) (
|
||||
func (UnimplementedPostServer) GetByKey(context.Context, *GetPostByKeyRequest) (*PostItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetByKey not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Search(context.Context, *SearchRequest) (*PostListReply, error) {
|
||||
func (UnimplementedPostServer) Search(context.Context, *protobuf.CmsSearchRequest) (*PostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Create(context.Context, *PostItem) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) Create(context.Context, *PostItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Modify(context.Context, *PostItem) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) Modify(context.Context, *PostItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) IncrPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IncrPostLike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) DescPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DescPostLike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IncrPostUnlike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) DescPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DescPostUnlike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CommentList not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddComment not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) ModifyComment(context.Context, *CommentItem) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) ModifyComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ModifyComment not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) DeleteComment(context.Context, *DeleteCommentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteComment not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IncrCommentLike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) DescCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DescCommentLike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IncrCommentUnlike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
||||
func (UnimplementedPostServer) DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DescCommentUnlike not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) mustEmbedUnimplementedPostServer() {}
|
||||
func (UnimplementedPostServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedPostServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePostServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PostServer will
|
||||
@@ -471,7 +470,7 @@ func _Post_GetByKey_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
}
|
||||
|
||||
func _Post_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchRequest)
|
||||
in := new(protobuf.CmsSearchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -483,7 +482,7 @@ func _Post_Search_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Post_Search_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Search(ctx, req.(*SearchRequest))
|
||||
return srv.(PostServer).Search(ctx, req.(*protobuf.CmsSearchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -525,7 +524,7 @@ func _Post_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
}
|
||||
|
||||
func _Post_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -537,7 +536,7 @@ func _Post_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Post_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Delete(ctx, req.(*IdentRequest))
|
||||
return srv.(PostServer).Delete(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -843,5 +842,5 @@ var Post_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "post.proto",
|
||||
Metadata: "module/base/cms/proto/post.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: site.proto
|
||||
// protoc v7.35.0
|
||||
// source: module/base/cms/proto/site.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -34,7 +35,7 @@ type SiteListReply struct {
|
||||
|
||||
func (x *SiteListReply) Reset() {
|
||||
*x = SiteListReply{}
|
||||
mi := &file_site_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_site_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -46,7 +47,7 @@ func (x *SiteListReply) String() string {
|
||||
func (*SiteListReply) ProtoMessage() {}
|
||||
|
||||
func (x *SiteListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_site_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_site_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -59,7 +60,7 @@ func (x *SiteListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SiteListReply.ProtoReflect.Descriptor instead.
|
||||
func (*SiteListReply) Descriptor() ([]byte, []int) {
|
||||
return file_site_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_base_cms_proto_site_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SiteListReply) GetData() []*SiteItem {
|
||||
@@ -95,7 +96,7 @@ type SiteItem struct {
|
||||
|
||||
func (x *SiteItem) Reset() {
|
||||
*x = SiteItem{}
|
||||
mi := &file_site_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_site_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -107,7 +108,7 @@ func (x *SiteItem) String() string {
|
||||
func (*SiteItem) ProtoMessage() {}
|
||||
|
||||
func (x *SiteItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_site_proto_msgTypes[1]
|
||||
mi := &file_module_base_cms_proto_site_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -120,7 +121,7 @@ func (x *SiteItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SiteItem.ProtoReflect.Descriptor instead.
|
||||
func (*SiteItem) Descriptor() ([]byte, []int) {
|
||||
return file_site_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_base_cms_proto_site_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SiteItem) GetId() int64 {
|
||||
@@ -193,12 +194,11 @@ func (x *SiteItem) GetConfigs() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_site_proto protoreflect.FileDescriptor
|
||||
var File_module_base_cms_proto_site_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_site_proto_rawDesc = "" +
|
||||
const file_module_base_cms_proto_site_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13" +
|
||||
"base/cms/site.proto\x12\x03cms\x1a\x10cms/blocks.proto\"H\n" +
|
||||
" module/base/cms/proto/site.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"H\n" +
|
||||
"\rSiteListReply\x12!\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\r.cms.SiteItemR\x04data\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x03R\x05count\"\x82\x02\n" +
|
||||
@@ -213,47 +213,46 @@ const file_site_proto_rawDesc = "" +
|
||||
"\x03seo\x18\b \x01(\tR\x03seo\x12\x14\n" +
|
||||
"\x05theme\x18\t \x01(\tR\x05theme\x12\x18\n" +
|
||||
"\aconfigs\x18\n" +
|
||||
" \x01(\tR\aconfigs2\xe7\x01\n" +
|
||||
"\x04Site\x12)\n" +
|
||||
"\x05Fetch\x12\n" +
|
||||
".cms.Empty\x1a\x12.cms.SiteListReply\"\x00\x12)\n" +
|
||||
"\x03Get\x12\x11.cms.IdentRequest\x1a\r.cms.SiteItem\"\x00\x12+\n" +
|
||||
"\x06Create\x12\r.cms.SiteItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" +
|
||||
"\x06Modify\x12\r.cms.SiteItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" +
|
||||
"\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
||||
" \x01(\tR\aconfigs2\xf9\x01\n" +
|
||||
"\x04Site\x12,\n" +
|
||||
"\x05Fetch\x12\r.blocks.Empty\x1a\x12.cms.SiteListReply\"\x00\x12,\n" +
|
||||
"\x03Get\x12\x14.blocks.IdentRequest\x1a\r.cms.SiteItem\"\x00\x12.\n" +
|
||||
"\x06Create\x12\r.cms.SiteItem\x1a\x13.blocks.StatusReply\"\x00\x12.\n" +
|
||||
"\x06Modify\x12\r.cms.SiteItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" +
|
||||
"\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_site_proto_rawDescOnce sync.Once
|
||||
file_site_proto_rawDescData []byte
|
||||
file_module_base_cms_proto_site_proto_rawDescOnce sync.Once
|
||||
file_module_base_cms_proto_site_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_site_proto_rawDescGZIP() []byte {
|
||||
file_site_proto_rawDescOnce.Do(func() {
|
||||
file_site_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_site_proto_rawDesc), len(file_site_proto_rawDesc)))
|
||||
func file_module_base_cms_proto_site_proto_rawDescGZIP() []byte {
|
||||
file_module_base_cms_proto_site_proto_rawDescOnce.Do(func() {
|
||||
file_module_base_cms_proto_site_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_site_proto_rawDesc), len(file_module_base_cms_proto_site_proto_rawDesc)))
|
||||
})
|
||||
return file_site_proto_rawDescData
|
||||
return file_module_base_cms_proto_site_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_site_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_site_proto_goTypes = []any{
|
||||
(*SiteListReply)(nil), // 0: cms.SiteListReply
|
||||
(*SiteItem)(nil), // 1: cms.SiteItem
|
||||
(*Empty)(nil), // 2: cms.Empty
|
||||
(*IdentRequest)(nil), // 3: cms.IdentRequest
|
||||
(*StatusReply)(nil), // 4: cms.StatusReply
|
||||
var file_module_base_cms_proto_site_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_module_base_cms_proto_site_proto_goTypes = []any{
|
||||
(*SiteListReply)(nil), // 0: cms.SiteListReply
|
||||
(*SiteItem)(nil), // 1: cms.SiteItem
|
||||
(*protobuf.Empty)(nil), // 2: blocks.Empty
|
||||
(*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 4: blocks.StatusReply
|
||||
}
|
||||
var file_site_proto_depIdxs = []int32{
|
||||
var file_module_base_cms_proto_site_proto_depIdxs = []int32{
|
||||
1, // 0: cms.SiteListReply.data:type_name -> cms.SiteItem
|
||||
2, // 1: cms.Site.Fetch:input_type -> cms.Empty
|
||||
3, // 2: cms.Site.Get:input_type -> cms.IdentRequest
|
||||
2, // 1: cms.Site.Fetch:input_type -> blocks.Empty
|
||||
3, // 2: cms.Site.Get:input_type -> blocks.IdentRequest
|
||||
1, // 3: cms.Site.Create:input_type -> cms.SiteItem
|
||||
1, // 4: cms.Site.Modify:input_type -> cms.SiteItem
|
||||
3, // 5: cms.Site.Delete:input_type -> cms.IdentRequest
|
||||
3, // 5: cms.Site.Delete:input_type -> blocks.IdentRequest
|
||||
0, // 6: cms.Site.Fetch:output_type -> cms.SiteListReply
|
||||
1, // 7: cms.Site.Get:output_type -> cms.SiteItem
|
||||
4, // 8: cms.Site.Create:output_type -> cms.StatusReply
|
||||
4, // 9: cms.Site.Modify:output_type -> cms.StatusReply
|
||||
4, // 10: cms.Site.Delete:output_type -> cms.StatusReply
|
||||
4, // 8: cms.Site.Create:output_type -> blocks.StatusReply
|
||||
4, // 9: cms.Site.Modify:output_type -> blocks.StatusReply
|
||||
4, // 10: cms.Site.Delete:output_type -> blocks.StatusReply
|
||||
6, // [6:11] is the sub-list for method output_type
|
||||
1, // [1:6] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@@ -261,27 +260,26 @@ var file_site_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_site_proto_init() }
|
||||
func file_site_proto_init() {
|
||||
if File_site_proto != nil {
|
||||
func init() { file_module_base_cms_proto_site_proto_init() }
|
||||
func file_module_base_cms_proto_site_proto_init() {
|
||||
if File_module_base_cms_proto_site_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_site_proto_rawDesc), len(file_site_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_site_proto_rawDesc), len(file_module_base_cms_proto_site_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_site_proto_goTypes,
|
||||
DependencyIndexes: file_site_proto_depIdxs,
|
||||
MessageInfos: file_site_proto_msgTypes,
|
||||
GoTypes: file_module_base_cms_proto_site_proto_goTypes,
|
||||
DependencyIndexes: file_module_base_cms_proto_site_proto_depIdxs,
|
||||
MessageInfos: file_module_base_cms_proto_site_proto_msgTypes,
|
||||
}.Build()
|
||||
File_site_proto = out.File
|
||||
file_site_proto_goTypes = nil
|
||||
file_site_proto_depIdxs = nil
|
||||
File_module_base_cms_proto_site_proto = out.File
|
||||
file_module_base_cms_proto_site_proto_goTypes = nil
|
||||
file_module_base_cms_proto_site_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: site.proto
|
||||
// source: module/base/cms/proto/site.proto
|
||||
|
||||
/*
|
||||
Package cms is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie
|
||||
|
||||
func local_request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, client
|
||||
|
||||
func local_request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -145,7 +146,7 @@ func local_request_Site_Modify_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -160,7 +161,7 @@ func request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: site.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cms/proto/site.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -33,15 +34,15 @@ const (
|
||||
// CMS - 站点
|
||||
type SiteClient interface {
|
||||
// 站点列表
|
||||
Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SiteListReply, error)
|
||||
Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*SiteListReply, error)
|
||||
// 站点详情
|
||||
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SiteItem, error)
|
||||
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SiteItem, error)
|
||||
// 添加站点
|
||||
Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改站点
|
||||
Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除站点
|
||||
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type siteClient struct {
|
||||
@@ -52,7 +53,7 @@ func NewSiteClient(cc grpc.ClientConnInterface) SiteClient {
|
||||
return &siteClient{cc}
|
||||
}
|
||||
|
||||
func (c *siteClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SiteListReply, error) {
|
||||
func (c *siteClient) Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*SiteListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SiteListReply)
|
||||
err := c.cc.Invoke(ctx, Site_Fetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -62,7 +63,7 @@ func (c *siteClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOpti
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *siteClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) {
|
||||
func (c *siteClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SiteItem)
|
||||
err := c.cc.Invoke(ctx, Site_Get_FullMethodName, in, out, cOpts...)
|
||||
@@ -72,9 +73,9 @@ func (c *siteClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Cal
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Site_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -82,9 +83,9 @@ func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Site_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -92,9 +93,9 @@ func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *siteClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *siteClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Site_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -103,48 +104,46 @@ func (c *siteClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.
|
||||
}
|
||||
|
||||
// SiteServer is the server API for Site service.
|
||||
// All implementations must embed UnimplementedSiteServer
|
||||
// All implementations should embed UnimplementedSiteServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// CMS - 站点
|
||||
type SiteServer interface {
|
||||
// 站点列表
|
||||
Fetch(context.Context, *Empty) (*SiteListReply, error)
|
||||
Fetch(context.Context, *protobuf.Empty) (*SiteListReply, error)
|
||||
// 站点详情
|
||||
Get(context.Context, *IdentRequest) (*SiteItem, error)
|
||||
Get(context.Context, *protobuf.IdentRequest) (*SiteItem, error)
|
||||
// 添加站点
|
||||
Create(context.Context, *SiteItem) (*StatusReply, error)
|
||||
Create(context.Context, *SiteItem) (*protobuf.StatusReply, error)
|
||||
// 修改站点
|
||||
Modify(context.Context, *SiteItem) (*StatusReply, error)
|
||||
Modify(context.Context, *SiteItem) (*protobuf.StatusReply, error)
|
||||
// 删除站点
|
||||
Delete(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedSiteServer()
|
||||
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedSiteServer must be embedded to have
|
||||
// UnimplementedSiteServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSiteServer struct{}
|
||||
|
||||
func (UnimplementedSiteServer) Fetch(context.Context, *Empty) (*SiteListReply, error) {
|
||||
func (UnimplementedSiteServer) Fetch(context.Context, *protobuf.Empty) (*SiteListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedSiteServer) Get(context.Context, *IdentRequest) (*SiteItem, error) {
|
||||
func (UnimplementedSiteServer) Get(context.Context, *protobuf.IdentRequest) (*SiteItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedSiteServer) Create(context.Context, *SiteItem) (*StatusReply, error) {
|
||||
func (UnimplementedSiteServer) Create(context.Context, *SiteItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedSiteServer) Modify(context.Context, *SiteItem) (*StatusReply, error) {
|
||||
func (UnimplementedSiteServer) Modify(context.Context, *SiteItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedSiteServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
func (UnimplementedSiteServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedSiteServer) mustEmbedUnimplementedSiteServer() {}
|
||||
func (UnimplementedSiteServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedSiteServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSiteServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SiteServer will
|
||||
@@ -165,7 +164,7 @@ func RegisterSiteServer(s grpc.ServiceRegistrar, srv SiteServer) {
|
||||
}
|
||||
|
||||
func _Site_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
in := new(protobuf.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -177,13 +176,13 @@ func _Site_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
FullMethod: Site_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SiteServer).Fetch(ctx, req.(*Empty))
|
||||
return srv.(SiteServer).Fetch(ctx, req.(*protobuf.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Site_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -195,7 +194,7 @@ func _Site_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{
|
||||
FullMethod: Site_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SiteServer).Get(ctx, req.(*IdentRequest))
|
||||
return srv.(SiteServer).Get(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -237,7 +236,7 @@ func _Site_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
}
|
||||
|
||||
func _Site_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -249,7 +248,7 @@ func _Site_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Site_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SiteServer).Delete(ctx, req.(*IdentRequest))
|
||||
return srv.(SiteServer).Delete(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -283,5 +282,5 @@ var Site_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "site.proto",
|
||||
Metadata: "module/base/cms/proto/site.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: tags.proto
|
||||
// protoc v7.35.0
|
||||
// source: module/base/cms/proto/tags.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -23,16 +24,16 @@ const (
|
||||
|
||||
// 标签列表
|
||||
type TagsListReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*TagsItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 数据
|
||||
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 总数
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*protobuf.CmsTagsItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 数据
|
||||
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 总数
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TagsListReply) Reset() {
|
||||
*x = TagsListReply{}
|
||||
mi := &file_tags_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_tags_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -44,7 +45,7 @@ func (x *TagsListReply) String() string {
|
||||
func (*TagsListReply) ProtoMessage() {}
|
||||
|
||||
func (x *TagsListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tags_proto_msgTypes[0]
|
||||
mi := &file_module_base_cms_proto_tags_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -57,10 +58,10 @@ func (x *TagsListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TagsListReply.ProtoReflect.Descriptor instead.
|
||||
func (*TagsListReply) Descriptor() ([]byte, []int) {
|
||||
return file_tags_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_base_cms_proto_tags_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TagsListReply) GetData() []*TagsItem {
|
||||
func (x *TagsListReply) GetData() []*protobuf.CmsTagsItem {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@@ -74,50 +75,49 @@ func (x *TagsListReply) GetCount() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_tags_proto protoreflect.FileDescriptor
|
||||
var File_module_base_cms_proto_tags_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_tags_proto_rawDesc = "" +
|
||||
const file_module_base_cms_proto_tags_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13" +
|
||||
"base/cms/tags.proto\x12\x03cms\x1a\x10cms/blocks.proto\"H\n" +
|
||||
"\rTagsListReply\x12!\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\r.cms.TagsItemR\x04data\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x03R\x05count2\xc3\x01\n" +
|
||||
"\x04Tags\x120\n" +
|
||||
"\x05Fetch\x12\x11.cms.IdentRequest\x1a\x12.cms.TagsListReply\"\x00\x12+\n" +
|
||||
"\x06Create\x12\r.cms.TagsItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" +
|
||||
"\x06Modify\x12\r.cms.TagsItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" +
|
||||
"\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
||||
" module/base/cms/proto/tags.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"N\n" +
|
||||
"\rTagsListReply\x12'\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x13.blocks.CmsTagsItemR\x04data\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x03R\x05count2\xde\x01\n" +
|
||||
"\x04Tags\x123\n" +
|
||||
"\x05Fetch\x12\x14.blocks.IdentRequest\x1a\x12.cms.TagsListReply\"\x00\x124\n" +
|
||||
"\x06Create\x12\x13.blocks.CmsTagsItem\x1a\x13.blocks.StatusReply\"\x00\x124\n" +
|
||||
"\x06Modify\x12\x13.blocks.CmsTagsItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" +
|
||||
"\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_tags_proto_rawDescOnce sync.Once
|
||||
file_tags_proto_rawDescData []byte
|
||||
file_module_base_cms_proto_tags_proto_rawDescOnce sync.Once
|
||||
file_module_base_cms_proto_tags_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tags_proto_rawDescGZIP() []byte {
|
||||
file_tags_proto_rawDescOnce.Do(func() {
|
||||
file_tags_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tags_proto_rawDesc), len(file_tags_proto_rawDesc)))
|
||||
func file_module_base_cms_proto_tags_proto_rawDescGZIP() []byte {
|
||||
file_module_base_cms_proto_tags_proto_rawDescOnce.Do(func() {
|
||||
file_module_base_cms_proto_tags_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_tags_proto_rawDesc), len(file_module_base_cms_proto_tags_proto_rawDesc)))
|
||||
})
|
||||
return file_tags_proto_rawDescData
|
||||
return file_module_base_cms_proto_tags_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_tags_proto_goTypes = []any{
|
||||
(*TagsListReply)(nil), // 0: cms.TagsListReply
|
||||
(*TagsItem)(nil), // 1: cms.TagsItem
|
||||
(*IdentRequest)(nil), // 2: cms.IdentRequest
|
||||
(*StatusReply)(nil), // 3: cms.StatusReply
|
||||
var file_module_base_cms_proto_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_module_base_cms_proto_tags_proto_goTypes = []any{
|
||||
(*TagsListReply)(nil), // 0: cms.TagsListReply
|
||||
(*protobuf.CmsTagsItem)(nil), // 1: blocks.CmsTagsItem
|
||||
(*protobuf.IdentRequest)(nil), // 2: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 3: blocks.StatusReply
|
||||
}
|
||||
var file_tags_proto_depIdxs = []int32{
|
||||
1, // 0: cms.TagsListReply.data:type_name -> cms.TagsItem
|
||||
2, // 1: cms.Tags.Fetch:input_type -> cms.IdentRequest
|
||||
1, // 2: cms.Tags.Create:input_type -> cms.TagsItem
|
||||
1, // 3: cms.Tags.Modify:input_type -> cms.TagsItem
|
||||
2, // 4: cms.Tags.Delete:input_type -> cms.IdentRequest
|
||||
var file_module_base_cms_proto_tags_proto_depIdxs = []int32{
|
||||
1, // 0: cms.TagsListReply.data:type_name -> blocks.CmsTagsItem
|
||||
2, // 1: cms.Tags.Fetch:input_type -> blocks.IdentRequest
|
||||
1, // 2: cms.Tags.Create:input_type -> blocks.CmsTagsItem
|
||||
1, // 3: cms.Tags.Modify:input_type -> blocks.CmsTagsItem
|
||||
2, // 4: cms.Tags.Delete:input_type -> blocks.IdentRequest
|
||||
0, // 5: cms.Tags.Fetch:output_type -> cms.TagsListReply
|
||||
3, // 6: cms.Tags.Create:output_type -> cms.StatusReply
|
||||
3, // 7: cms.Tags.Modify:output_type -> cms.StatusReply
|
||||
3, // 8: cms.Tags.Delete:output_type -> cms.StatusReply
|
||||
3, // 6: cms.Tags.Create:output_type -> blocks.StatusReply
|
||||
3, // 7: cms.Tags.Modify:output_type -> blocks.StatusReply
|
||||
3, // 8: cms.Tags.Delete:output_type -> blocks.StatusReply
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@@ -125,27 +125,26 @@ var file_tags_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_tags_proto_init() }
|
||||
func file_tags_proto_init() {
|
||||
if File_tags_proto != nil {
|
||||
func init() { file_module_base_cms_proto_tags_proto_init() }
|
||||
func file_module_base_cms_proto_tags_proto_init() {
|
||||
if File_module_base_cms_proto_tags_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tags_proto_rawDesc), len(file_tags_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_tags_proto_rawDesc), len(file_module_base_cms_proto_tags_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tags_proto_goTypes,
|
||||
DependencyIndexes: file_tags_proto_depIdxs,
|
||||
MessageInfos: file_tags_proto_msgTypes,
|
||||
GoTypes: file_module_base_cms_proto_tags_proto_goTypes,
|
||||
DependencyIndexes: file_module_base_cms_proto_tags_proto_depIdxs,
|
||||
MessageInfos: file_module_base_cms_proto_tags_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tags_proto = out.File
|
||||
file_tags_proto_goTypes = nil
|
||||
file_tags_proto_depIdxs = nil
|
||||
File_module_base_cms_proto_tags_proto = out.File
|
||||
file_module_base_cms_proto_tags_proto_goTypes = nil
|
||||
file_module_base_cms_proto_tags_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: tags.proto
|
||||
// source: module/base/cms/proto/tags.proto
|
||||
|
||||
/*
|
||||
Package cms is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie
|
||||
|
||||
func local_request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq TagsItem
|
||||
protoReq blocks.CmsTagsItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq TagsItem
|
||||
protoReq blocks.CmsTagsItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -91,7 +92,7 @@ func local_request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq TagsItem
|
||||
protoReq blocks.CmsTagsItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -106,7 +107,7 @@ func request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq TagsItem
|
||||
protoReq blocks.CmsTagsItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -118,7 +119,7 @@ func local_request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -133,7 +134,7 @@ func request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: tags.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/base/cms/proto/tags.proto
|
||||
|
||||
package cms
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -32,13 +33,13 @@ const (
|
||||
// 标签
|
||||
type TagsClient interface {
|
||||
// 标签列表
|
||||
Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error)
|
||||
Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error)
|
||||
// 创建标签
|
||||
Create(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 修改标签
|
||||
Modify(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Modify(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 删除标签
|
||||
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type tagsClient struct {
|
||||
@@ -49,7 +50,7 @@ func NewTagsClient(cc grpc.ClientConnInterface) TagsClient {
|
||||
return &tagsClient{cc}
|
||||
}
|
||||
|
||||
func (c *tagsClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) {
|
||||
func (c *tagsClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TagsListReply)
|
||||
err := c.cc.Invoke(ctx, Tags_Fetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -59,9 +60,9 @@ func (c *tagsClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.C
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tagsClient) Create(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *tagsClient) Create(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Tags_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +70,9 @@ func (c *tagsClient) Create(ctx context.Context, in *TagsItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tagsClient) Modify(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *tagsClient) Modify(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Tags_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -79,9 +80,9 @@ func (c *tagsClient) Modify(ctx context.Context, in *TagsItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tagsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *tagsClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.StatusReply)
|
||||
err := c.cc.Invoke(ctx, Tags_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -90,43 +91,41 @@ func (c *tagsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.
|
||||
}
|
||||
|
||||
// TagsServer is the server API for Tags service.
|
||||
// All implementations must embed UnimplementedTagsServer
|
||||
// All implementations should embed UnimplementedTagsServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 标签
|
||||
type TagsServer interface {
|
||||
// 标签列表
|
||||
Fetch(context.Context, *IdentRequest) (*TagsListReply, error)
|
||||
Fetch(context.Context, *protobuf.IdentRequest) (*TagsListReply, error)
|
||||
// 创建标签
|
||||
Create(context.Context, *TagsItem) (*StatusReply, error)
|
||||
Create(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error)
|
||||
// 修改标签
|
||||
Modify(context.Context, *TagsItem) (*StatusReply, error)
|
||||
Modify(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error)
|
||||
// 删除标签
|
||||
Delete(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedTagsServer()
|
||||
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedTagsServer must be embedded to have
|
||||
// UnimplementedTagsServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTagsServer struct{}
|
||||
|
||||
func (UnimplementedTagsServer) Fetch(context.Context, *IdentRequest) (*TagsListReply, error) {
|
||||
func (UnimplementedTagsServer) Fetch(context.Context, *protobuf.IdentRequest) (*TagsListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedTagsServer) Create(context.Context, *TagsItem) (*StatusReply, error) {
|
||||
func (UnimplementedTagsServer) Create(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedTagsServer) Modify(context.Context, *TagsItem) (*StatusReply, error) {
|
||||
func (UnimplementedTagsServer) Modify(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedTagsServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
func (UnimplementedTagsServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedTagsServer) mustEmbedUnimplementedTagsServer() {}
|
||||
func (UnimplementedTagsServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedTagsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTagsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TagsServer will
|
||||
@@ -147,7 +146,7 @@ func RegisterTagsServer(s grpc.ServiceRegistrar, srv TagsServer) {
|
||||
}
|
||||
|
||||
func _Tags_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -159,13 +158,13 @@ func _Tags_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
FullMethod: Tags_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagsServer).Fetch(ctx, req.(*IdentRequest))
|
||||
return srv.(TagsServer).Fetch(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Tags_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TagsItem)
|
||||
in := new(protobuf.CmsTagsItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -177,13 +176,13 @@ func _Tags_Create_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Tags_Create_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagsServer).Create(ctx, req.(*TagsItem))
|
||||
return srv.(TagsServer).Create(ctx, req.(*protobuf.CmsTagsItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Tags_Modify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TagsItem)
|
||||
in := new(protobuf.CmsTagsItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -195,13 +194,13 @@ func _Tags_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Tags_Modify_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagsServer).Modify(ctx, req.(*TagsItem))
|
||||
return srv.(TagsServer).Modify(ctx, req.(*protobuf.CmsTagsItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Tags_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -213,7 +212,7 @@ func _Tags_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Tags_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagsServer).Delete(ctx, req.(*IdentRequest))
|
||||
return srv.(TagsServer).Delete(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -243,5 +242,5 @@ var Tags_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "tags.proto",
|
||||
Metadata: "module/base/cms/proto/tags.proto",
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
|
||||
// 列表请求参数
|
||||
message FetchRequest {
|
||||
int64 page_no = 1 [json_name = "page_no"]; // 页数
|
||||
int64 page_size = 2 [json_name = "page_size"]; // 每页记录数
|
||||
map<string,string> params = 3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
}
|
||||
|
||||
// 唯一标识请求参数
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一标识
|
||||
}
|
||||
|
||||
// 时序版本号请求参数
|
||||
message VersionRequest {
|
||||
int64 version = 1; // 时序版本号
|
||||
}
|
||||
|
||||
// 搜索请求参数
|
||||
message SearchRequest {
|
||||
string keyword = 1; //<必传>, 关键词
|
||||
int64 page_no = 2 [json_name = "page_no"]; // 页数
|
||||
int64 page_size = 3 [json_name = "page_size"]; // 每页记录数
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
int32 code = 1; // 状态码
|
||||
string message = 2; // 状态说明
|
||||
string details = 3; // 数据
|
||||
int64 timeseq = 4; // 响应时间序列
|
||||
}
|
||||
|
||||
// 空结构请求
|
||||
message Empty{
|
||||
}
|
||||
|
||||
// 分类
|
||||
message CategoryItem{
|
||||
string site_identity = 1 [json_name = "site_identity"];
|
||||
int64 id = 2;
|
||||
string identity = 3; // 唯一标识
|
||||
int64 parent_id = 4 [json_name = "parent_id"]; // 为空表示顶级分类
|
||||
string title = 5; // 标题
|
||||
string cover_path = 6 [json_name = "cover_path"]; // 封面图片
|
||||
string intro = 7; // 简介
|
||||
string created_at = 8 [json_name = "created_at"]; // 创建时间
|
||||
string updated_at = 9 [json_name = "updated_at"]; // 更新时间
|
||||
repeated CategoryItem child = 10; // 子集
|
||||
string category_key = 11 [json_name = "category_key"];// 分类标识
|
||||
|
||||
}
|
||||
|
||||
// 标签
|
||||
message TagsItem{
|
||||
int64 id = 1;
|
||||
string identity = 2; // 唯一标识
|
||||
string title = 3; // 标题
|
||||
string cover_path = 4 [json_name = "cover_path"]; // 封面图片
|
||||
string intro = 5; // 简介
|
||||
string created_at = 6 [json_name = "created_at"]; //创建时间
|
||||
}
|
||||
|
||||
// 附件
|
||||
message AccessoryItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string title = 2; // 附件标题
|
||||
string file_path = 3 [json_name = "file_path"]; // 附件文件路径
|
||||
string created_at = 4 [json_name = "created_at"]; //创建时间
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// CMS - 分类
|
||||
service Category {
|
||||
// 分类列表
|
||||
rpc Fetch (IdentRequest) returns (CategoryListReply) {};
|
||||
rpc Fetch (blocks.IdentRequest) returns (CategoryListReply) {};
|
||||
|
||||
// 添加分类
|
||||
rpc Create (CategoryItem) returns (StatusReply) {};
|
||||
rpc Create (blocks.CmsCategoryItem) returns (blocks.StatusReply) {};
|
||||
|
||||
// 修改分类
|
||||
rpc Modify (ModifyCategoryRequest) returns (StatusReply) {};
|
||||
rpc Modify (ModifyCategoryRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 删除分类
|
||||
rpc Delete (DeleteCategoryRequest) returns (StatusReply) {};
|
||||
rpc Delete (DeleteCategoryRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 分类列表
|
||||
message CategoryListReply {
|
||||
// 数据
|
||||
repeated CategoryItem data = 1;
|
||||
repeated blocks.CmsCategoryItem data = 1;
|
||||
// 总数
|
||||
int64 count = 2;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ message AddCategoryRequest{
|
||||
string intro = 6; // 简介
|
||||
string created_at = 7 [json_name = "created_at"]; // 创建时间
|
||||
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
|
||||
repeated CategoryItem data = 9; // 子集
|
||||
repeated blocks.CmsCategoryItem data = 9; // 子集
|
||||
}
|
||||
|
||||
// 修改分类请求
|
||||
@@ -54,7 +54,7 @@ message ModifyCategoryRequest{
|
||||
string intro = 6; // 简介
|
||||
string created_at = 7 [json_name = "created_at"]; // 创建时间
|
||||
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
|
||||
repeated CategoryItem data = 9; // 子集
|
||||
repeated blocks.CmsCategoryItem data = 9; // 子集
|
||||
string category_key = 10[json_name = "category_key"]; // 分类标识
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 单页管理
|
||||
service Pages{
|
||||
@@ -15,13 +15,13 @@ service Pages{
|
||||
rpc GetByKey (GetPagesByKeyRequest) returns (PagesItem) {};
|
||||
|
||||
//发布单页
|
||||
rpc Create(PagesItem) returns (StatusReply) {};
|
||||
rpc Create(PagesItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//修改单页
|
||||
rpc Modify(PagesItem) returns (StatusReply) {};
|
||||
rpc Modify(PagesItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//删除单页
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {};
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 根据KEY获取内容请求
|
||||
@@ -45,8 +45,8 @@ message PagesItem{
|
||||
bool has_accessory = 12 [json_name = "has_accessory"]; //是否有附件,默认没有
|
||||
|
||||
repeated string accessory_identity_array = 13 [json_name = "accessory_identity_array"]; //附件Identity 列表
|
||||
repeated AccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据
|
||||
repeated TagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据
|
||||
repeated blocks.CmsAccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据
|
||||
repeated blocks.CmsTagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据
|
||||
repeated string tags_identity_array = 16 [json_name = "tags_identity_array"]; // 标签集Identity 列表
|
||||
int64 hits = 17; //点击量
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 正文
|
||||
service Post{
|
||||
@@ -15,52 +15,52 @@ service Post{
|
||||
rpc GetByKey (GetPostByKeyRequest) returns (PostItem) {};
|
||||
|
||||
//搜索文章
|
||||
rpc Search (SearchRequest) returns (PostListReply) {};
|
||||
rpc Search (blocks.CmsSearchRequest) returns (PostListReply) {};
|
||||
|
||||
//发布文章
|
||||
rpc Create(PostItem) returns (StatusReply) {};
|
||||
rpc Create(PostItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//修改文章
|
||||
rpc Modify(PostItem) returns (StatusReply) {};
|
||||
rpc Modify(PostItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//删除文章
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {};
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 文章点赞处理
|
||||
rpc IncrPostLike(PostOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc IncrPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 文章点赞取消处理
|
||||
rpc DescPostLike(PostOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc DescPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 文章点踩处理
|
||||
rpc IncrPostUnlike(PostOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc IncrPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 文章点踩取消处理
|
||||
rpc DescPostUnlike(PostOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc DescPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
//评论列表
|
||||
rpc CommentList(CommentListRequest) returns (CommentListResponse) {};
|
||||
|
||||
//发布评论
|
||||
rpc AddComment(CommentItem) returns (StatusReply) {};
|
||||
rpc AddComment(CommentItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//修改评论
|
||||
rpc ModifyComment(CommentItem) returns (StatusReply) {};
|
||||
rpc ModifyComment(CommentItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//删除评论
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (StatusReply) {};
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 评论点赞处理
|
||||
rpc IncrCommentLike(CommentOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc IncrCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 评论点赞取消处理
|
||||
rpc DescCommentLike(CommentOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc DescCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 评论点踩处理
|
||||
rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
// 评论点踩取消处理
|
||||
rpc DescCommentUnlike(CommentOpIdentityRequest) returns (StatusReply) {};
|
||||
rpc DescCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 删除评论
|
||||
@@ -101,9 +101,9 @@ message PostItem{
|
||||
int32 post_type = 23 [json_name = "post_type"]; // 用户自定义文章类型
|
||||
string rights = 24; //权限
|
||||
|
||||
repeated CategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据
|
||||
repeated TagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据
|
||||
repeated AccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据
|
||||
repeated blocks.CmsCategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据
|
||||
repeated blocks.CmsTagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据
|
||||
repeated blocks.CmsAccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据
|
||||
|
||||
string lang = 29 [json_name = "lang"]; // 语言
|
||||
string source_origin = 30 [json_name = "source_origin"]; // 来源方简称
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// CMS - 站点
|
||||
service Site {
|
||||
// 站点列表
|
||||
rpc Fetch (Empty) returns (SiteListReply) {};
|
||||
rpc Fetch (blocks.Empty) returns (SiteListReply) {};
|
||||
|
||||
// 站点详情
|
||||
rpc Get (IdentRequest) returns (SiteItem) {};
|
||||
rpc Get (blocks.IdentRequest) returns (SiteItem) {};
|
||||
|
||||
// 添加站点
|
||||
rpc Create (SiteItem) returns (StatusReply) {};
|
||||
rpc Create (SiteItem) returns (blocks.StatusReply) {};
|
||||
|
||||
// 修改站点
|
||||
rpc Modify (SiteItem) returns (StatusReply) {};
|
||||
rpc Modify (SiteItem) returns (blocks.StatusReply) {};
|
||||
|
||||
// 删除站点
|
||||
rpc Delete (IdentRequest) returns (StatusReply) {};
|
||||
rpc Delete (blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 站点列表
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
syntax = "proto3";
|
||||
package cms;
|
||||
option go_package = ".;cms";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 标签
|
||||
service Tags {
|
||||
//标签列表
|
||||
rpc Fetch (IdentRequest) returns (TagsListReply) {};
|
||||
rpc Fetch (blocks.IdentRequest) returns (TagsListReply) {};
|
||||
|
||||
//创建标签
|
||||
rpc Create(TagsItem) returns (StatusReply) {};
|
||||
rpc Create(blocks.CmsTagsItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//修改标签
|
||||
rpc Modify(TagsItem) returns (StatusReply) {};
|
||||
rpc Modify(blocks.CmsTagsItem) returns (blocks.StatusReply) {};
|
||||
|
||||
//删除标签
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {};
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 标签列表
|
||||
message TagsListReply {
|
||||
repeated TagsItem data = 1; // 数据
|
||||
repeated blocks.CmsTagsItem data = 1; // 数据
|
||||
int64 count = 2; // 总数
|
||||
}
|
||||
Reference in New Issue
Block a user