Skip to content

Commit 5bdc69b

Browse files
committed
new
0 parents  commit 5bdc69b

28 files changed

+3267
-0
lines changed

apidoc/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 公共模块
2+
3+
此目录主要存放服务接口定义模块
4+
5+
proto --- 存放proto文件(根据微服务相关相对目录)
6+
rpc --- 存放grpc/gmsec 相关build协议文件
7+
8+
----- example 微服务存放路径
9+
----- Makefile 服务生成文件
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
syntax = "proto3"; // 指定proto版本
2+
3+
package common; // 指定包名
4+
5+
// import "google/protobuf/descriptor.proto";
6+
7+
// option go_package = "common;common"; // 指定路径
8+
// option go_package = "gmsec/rpc/common";
9+
option go_package = "rpc/common"; // 指定包路径
10+
11+
message ResultResp {
12+
// bool status = 1;
13+
string msg = 1;
14+
}

apidoc/proto/example/hello.proto

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
syntax = "proto3"; // 指定proto版本
2+
3+
package example; // 指定包名
4+
import "common/common_public.proto";
5+
6+
option go_package = "rpc/example"; // 指定路径
7+
8+
// 定义Hello服务
9+
service Hello {
10+
// 定义SayHello方法
11+
rpc SayHello(HelloRequest) returns (HelloReply) {}
12+
}
13+
14+
// HelloRequest 请求结构
15+
message HelloRequest {
16+
string name = 1; // 名字
17+
}
18+
19+
// HelloReply 响应结构
20+
message HelloReply {
21+
string message = 1; // 消息
22+
common.ResultResp result = 2;// 多proto 文件样例
23+
}

cmsec.sln

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30717.126
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsec_windows", "cmsec_windows\cmsec_windows.vcxproj", "{762B6C5B-50F1-49EE-8218-299B63D8CE6E}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsec_linux", "cmsec_linux\cmsec_linux.vcxproj", "{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|ARM = Debug|ARM
13+
Debug|ARM64 = Debug|ARM64
14+
Debug|x64 = Debug|x64
15+
Debug|x86 = Debug|x86
16+
Release|ARM = Release|ARM
17+
Release|ARM64 = Release|ARM64
18+
Release|x64 = Release|x64
19+
Release|x86 = Release|x86
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|ARM.ActiveCfg = Debug|Win32
23+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|ARM64.ActiveCfg = Debug|Win32
24+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|x64.ActiveCfg = Debug|x64
25+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|x64.Build.0 = Debug|x64
26+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|x86.ActiveCfg = Debug|Win32
27+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Debug|x86.Build.0 = Debug|Win32
28+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|ARM.ActiveCfg = Release|Win32
29+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|ARM64.ActiveCfg = Release|Win32
30+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|x64.ActiveCfg = Release|x64
31+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|x64.Build.0 = Release|x64
32+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|x86.ActiveCfg = Release|Win32
33+
{762B6C5B-50F1-49EE-8218-299B63D8CE6E}.Release|x86.Build.0 = Release|Win32
34+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM.ActiveCfg = Debug|ARM
35+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM.Build.0 = Debug|ARM
36+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM.Deploy.0 = Debug|ARM
37+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM64.ActiveCfg = Debug|ARM64
38+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM64.Build.0 = Debug|ARM64
39+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|ARM64.Deploy.0 = Debug|ARM64
40+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x64.ActiveCfg = Debug|x64
41+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x64.Build.0 = Debug|x64
42+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x64.Deploy.0 = Debug|x64
43+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x86.ActiveCfg = Debug|x86
44+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x86.Build.0 = Debug|x86
45+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Debug|x86.Deploy.0 = Debug|x86
46+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM.ActiveCfg = Release|ARM
47+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM.Build.0 = Release|ARM
48+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM.Deploy.0 = Release|ARM
49+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM64.ActiveCfg = Release|ARM64
50+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM64.Build.0 = Release|ARM64
51+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|ARM64.Deploy.0 = Release|ARM64
52+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x64.ActiveCfg = Release|x64
53+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x64.Build.0 = Release|x64
54+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x64.Deploy.0 = Release|x64
55+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x86.ActiveCfg = Release|x86
56+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x86.Build.0 = Release|x86
57+
{8A451976-EC2B-4FC9-865C-A88F71FF1BD2}.Release|x86.Deploy.0 = Release|x86
58+
EndGlobalSection
59+
GlobalSection(SolutionProperties) = preSolution
60+
HideSolutionNode = FALSE
61+
EndGlobalSection
62+
GlobalSection(ExtensibilityGlobals) = postSolution
63+
SolutionGuid = {A667E5C4-609D-4C70-AFF9-A78313BEC30D}
64+
EndGlobalSection
65+
EndGlobal

cmsec/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CMakeList.txt: 顶层 CMake 项目文件,在此处执行全局配置
2+
# 并包含子项目。
3+
#
4+
cmake_minimum_required (VERSION 3.8)
5+
6+
project ("cmsec")
7+
8+
# 包含子项目。
9+
add_subdirectory ("src")

cmsec/CMakeSettings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug (默认值)",
5+
"generator": "Ninja",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": ""
13+
}
14+
]
15+
}

cmsec/src/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CMakeList.txt: cmsec 的 CMake 项目,在此处包括源代码并定义
2+
# 项目特定的逻辑。
3+
#
4+
cmake_minimum_required (VERSION 3.8)
5+
6+
# 将源代码添加到此项目的可执行文件。
7+
add_executable (cmsec "cmsec.cpp" "cmsec.h")
8+
9+
# TODO: 如有需要,请添加测试并安装目标。

cmsec/src/cmsec.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// cmsec.cpp: 定义应用程序的入口点。
2+
//
3+
4+
#include "cmsec.h"
5+
6+
using namespace std;
7+
8+
int main()
9+
{
10+
cout << "Hello CMake." << endl;
11+
return 0;
12+
}

cmsec/src/cmsec.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// cmsec.h: 标准系统包含文件的包含文件
2+
// 或项目特定的包含文件。
3+
4+
#pragma once
5+
6+
#include <iostream>
7+
8+
// TODO: 在此处引用程序需要的其他标头。

cmsec_linux/cmsec_linux.vcxproj

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|ARM">
9+
<Configuration>Release</Configuration>
10+
<Platform>ARM</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|ARM64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>ARM64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|ARM64">
17+
<Configuration>Release</Configuration>
18+
<Platform>ARM64</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Debug|x86">
21+
<Configuration>Debug</Configuration>
22+
<Platform>x86</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x86">
25+
<Configuration>Release</Configuration>
26+
<Platform>x86</Platform>
27+
</ProjectConfiguration>
28+
<ProjectConfiguration Include="Debug|x64">
29+
<Configuration>Debug</Configuration>
30+
<Platform>x64</Platform>
31+
</ProjectConfiguration>
32+
<ProjectConfiguration Include="Release|x64">
33+
<Configuration>Release</Configuration>
34+
<Platform>x64</Platform>
35+
</ProjectConfiguration>
36+
</ItemGroup>
37+
<PropertyGroup Label="Globals">
38+
<ProjectGuid>{8a451976-ec2b-4fc9-865c-a88f71ff1bd2}</ProjectGuid>
39+
<Keyword>Linux</Keyword>
40+
<RootNamespace>cmsec_linux</RootNamespace>
41+
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
42+
<ApplicationType>Linux</ApplicationType>
43+
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
44+
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
45+
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
46+
</PropertyGroup>
47+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
49+
<UseDebugLibraries>true</UseDebugLibraries>
50+
</PropertyGroup>
51+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
52+
<UseDebugLibraries>false</UseDebugLibraries>
53+
</PropertyGroup>
54+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
55+
<UseDebugLibraries>true</UseDebugLibraries>
56+
</PropertyGroup>
57+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
58+
<UseDebugLibraries>false</UseDebugLibraries>
59+
</PropertyGroup>
60+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
61+
<UseDebugLibraries>true</UseDebugLibraries>
62+
</PropertyGroup>
63+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
64+
<UseDebugLibraries>false</UseDebugLibraries>
65+
</PropertyGroup>
66+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
67+
<UseDebugLibraries>false</UseDebugLibraries>
68+
</PropertyGroup>
69+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
70+
<UseDebugLibraries>true</UseDebugLibraries>
71+
</PropertyGroup>
72+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
73+
<ImportGroup Label="ExtensionSettings" />
74+
<ImportGroup Label="Shared" />
75+
<ImportGroup Label="PropertySheets" />
76+
<PropertyGroup Label="UserMacros" />
77+
<ItemGroup>
78+
<ClCompile Include="main.cpp" />
79+
</ItemGroup>
80+
<ItemGroup>
81+
</ItemGroup>
82+
<ItemDefinitionGroup />
83+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
84+
<ImportGroup Label="ExtensionTargets" />
85+
</Project>

0 commit comments

Comments
 (0)