Browse Source

整合后台服务

pull/1/head
cKey 6 years ago
commit
82d5db9ecf
  1. 30
      .gitignore
  2. 244
      README.en.md
  3. 289
      README.md
  4. 1
      aspnet-core/.gitignore
  5. 26
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj
  6. 27
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayApplicationContractsModule.cs
  7. 55
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayPermissionDefinitionProvider.cs
  8. 56
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayPermissions.cs
  9. 15
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Localization/ApplicationContracts/en.json
  10. 16
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Localization/ApplicationContracts/zh-Hans.json
  11. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/AggregateRouteGetByAppIdInputDto.cs
  12. 14
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/AggregateRouteGetByPagedInputDto.cs
  13. 24
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/AggregateReRouteDtoBase.cs
  14. 17
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/DynamicReRouteDtoBase.cs
  15. 35
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/GlobalConfigurationDtoBase.cs
  16. 64
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/ReRouteDtoBase.cs
  17. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/DynamicRouteGetByAppIdInputDto.cs
  18. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalCreateDto.cs
  19. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalGetByAppIdInputDto.cs
  20. 9
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalGetByPagedInputDto.cs
  21. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalUpdateDto.cs
  22. 15
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteCreateDto.cs
  23. 11
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByAppIdInputDto.cs
  24. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByIdInputDto.cs
  25. 11
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByNameInputDto.cs
  26. 14
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByPagedInputDto.cs
  27. 17
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteUpdateDto.cs
  28. 12
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AggregateReRouteConfigDto.cs
  29. 16
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AggregateReRouteDto.cs
  30. 16
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AuthenticationOptionsDto.cs
  31. 11
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/CacheOptionsDto.cs
  32. 12
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/DynamicReRouteDto.cs
  33. 17
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/GlobalConfigurationDto.cs
  34. 11
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/HostAndPortDto.cs
  35. 18
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/HttpHandlerOptionsDto.cs
  36. 12
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/LoadBalancerOptionsDto.cs
  37. 14
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/QosOptionsDto.cs
  38. 14
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/RateLimitOptionsDto.cs
  39. 23
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/RateLimitRuleDto.cs
  40. 20
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/ReRouteDto.cs
  41. 18
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/SecurityOptionsDto.cs
  42. 17
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/ServiceDiscoveryProviderDto.cs
  43. 13
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupAppIdsDto.cs
  44. 27
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupCreateDto.cs
  45. 15
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupDto.cs
  46. 10
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupGetByAppIdInputDto.cs
  47. 9
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupGetByPagedInputDto.cs
  48. 19
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupUpdateDto.cs
  49. 13
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IAggregateReRouteAppService.cs
  50. 11
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IDynamicReRouteAppService.cs
  51. 19
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IGlobalConfigurationAppService.cs
  52. 25
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IReRouteAppService.cs
  53. 20
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IRouteGroupAppService.cs
  54. 1780
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.deps.json
  55. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll
  56. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb
  57. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll
  58. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.pdb
  59. 23
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.AssemblyInfo.cs
  60. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.AssemblyInfoInputs.cache
  61. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.assets.cache
  62. 0
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CopyComplete
  63. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache
  64. 23
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.FileListAbsolute.txt
  65. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache
  66. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll
  67. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb
  68. 5
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.cache
  69. 142
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.dgspec.json
  70. 15
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.props
  71. 9
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.targets
  72. 4166
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/project.assets.json
  73. 103
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/project.nuget.cache
  74. 17
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj
  75. 206
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationAutoMapperProfile.cs
  76. 26
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationModule.cs
  77. 13
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationServiceBase.cs
  78. 38
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/AggregateReRouteAppService.cs
  79. 25
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/DynamicReRouteAppService.cs
  80. 127
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/GlobalConfigurationAppService.cs
  81. 166
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/ReRouteAppService.cs
  82. 89
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/RouteGroupAppService.cs
  83. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll
  84. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb
  85. 2005
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.deps.json
  86. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.dll
  87. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.pdb
  88. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll
  89. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.pdb
  90. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.dll
  91. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.pdb
  92. 23
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.AssemblyInfo.cs
  93. 1
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.AssemblyInfoInputs.cache
  94. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.assets.cache
  95. 0
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csproj.CopyComplete
  96. 30
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csproj.FileListAbsolute.txt
  97. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache
  98. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.dll
  99. BIN
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.pdb
  100. 5
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/LINGYUN.ApiGateway.Application.csproj.nuget.cache

30
.gitignore

@ -0,0 +1,30 @@
.DS_Store
node_modules
/dist
vue.config.js
.env.production
task
/tests/e2e/videos/
/tests/e2e/screenshots/
/tests/**/coverage/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
.history
.ionide
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

244
README.en.md

@ -0,0 +1,244 @@
<p align="center">
<img width="120" src="public/img/icons/android-chrome-512x512.png">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.12.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://circleci.com/gh/Armour/vue-typescript-admin-template/tree/master">
<img src="https://circleci.com/gh/Armour/vue-typescript-admin-template/tree/master.svg?style=shield" alt="CircleCI">
</a>
<a href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs Welcome">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT">
</a>
<a href="https://github.com/Armour/Jarvis">
<img src="https://img.shields.io/badge/Hi-Jarvis-ff69b4.svg" alt="Template from jarvis">
</a>
</p>
English | [简体中文](./README.md)
## Overview
[vue-typescript-admin-template](http://armour.github.io/vue-typescript-admin-template) is a production-ready front-end solution for admin interfaces based on [vue](https://github.com/vuejs/vue), [typescript](https://www.typescriptlang.org/) and UI Toolkit [element-ui](https://github.com/ElemeFE/element). The original Javascript version code [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin/) was written by [PanJiaChen](https://github.com/PanJiaChen), many thanks to him for the awesome open source project! :)
If you want to get started with a minimal template code instead of integration solution, you can take a look at the [minimal](https://github.com/Armour/vue-typescript-admin-template/tree/minimal) branch.
## Documentation
[Docs](https://armour.github.io/vue-typescript-admin-docs)
## Live demo
[Demo](https://armour.github.io/vue-typescript-admin-template)
## Screenshots
![dashboard](./demo/dashboard.png)
## Related Projects
[Armour/vue-typescript-admin-mock-server](https://github.com/armour/vue-typescript-admin-mock-server) (mock server for this project)
[Armour/vue-typescript-admin-docs](https://github.com/armour/vue-typescript-admin-docs) (documentation source for this project)
Javascript version:
[PanJiaChen/vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) (a vue2.0 minimal admin template)
[PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) (full features supported vue admin)
[PanJiaChen/electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) (a vue electron admin project)
## Features
```txt
- Login / Logout
- Permission Authentication
- Page permission
- Directive permission
- Permission configuration page
- Two-step login
- Multi-environment build
- Dev / Stage / Prod
- Global Features
- I18n
- Dynamic themes
- Dynamic sidebar (supports multi-level routing)
- Dynamic breadcrumb
- Tags-view (supports right-click operation)
- Clipboard
- Svg icons
- Search
- Screenfull
- Settings
- Mock data / Mock server
- PWA support
- Components
- Editors
- Rich Text Editor
- Markdown Editor
- JSON Editor
- Avatar Upload
- Back To Top
- CountTo
- Dropzone
- Draggable Dialog
- Draggable Kanban
- Draggable List
- Draggable Select
- ECharts
- Mixin
- SplitPane
- Sticky
- Table
- Dynamic Table
- Draggable Table
- Inline Edit Table
- Complex Table
- Excel
- Export Excel
- Upload Excel
- Excel Visualization
- Zip
- Export zip
- PDF
- Download pdf
- Dashboard
- Guide Page
- Advanced Example Page
- Error Log
- Error Page
- 401
- 404
```
## Preparation
You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [typescript](https://www.typescriptlang.org/), [vue](https://vuejs.org/index.html), [vuex](https://vuex.vuejs.org/), [vue-router](https://router.vuejs.org/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [faker.js](https://github.com/Marak/Faker.js).
Understanding and learning these knowledge in advance will greatly help you on using this project.
## Project Structure
```bash
├── mock/ # mock server & mock data
├── public # public static assets (directly copied)
│ │── favicon.ico # favicon
│ │── manifest.json # PWA config file
│ └── index.html # index.html template
├── src # main source code
│ ├── api # api service
│ ├── assets # module assets like fonts, images (processed by webpack)
│ ├── components # global components
│ ├── directives # global directives
│ ├── filters # global filter
│ ├── icons # svg icons
│ ├── lang # i18n language
│ ├── layout # global layout
│ ├── pwa # PWA service worker related files
│ ├── router # router
│ ├── store # store
│ ├── styles # global css
│ ├── utils # global utils
│ ├── views # views
│ ├── App.vue # main app component
│ ├── main.ts # app entry file
│ ├── permission.ts # permission authentication
│ ├── settings.ts # setting file
│ └── shims.d.ts # type definition shims
├── tests/ # tests
├── .circleci/ # automated CI configuration
├── .browserslistrc # browserslist config file (to support Autoprefixer)
├── .editorconfig # editor code format consistency config
├── .env.xxx # env variable configuration
├── .eslintrc.js # eslint config
├── babel.config.js # babel config
├── cypress.json # e2e test config
├── jest.config.js # jest unit test config
├── package.json # package.json
├── postcss.config.js # postcss config
├── tsconfig.json # typescript config
└── vue.config.js # vue-cli config
```
## Project setup
With [yarn](https://yarnpkg.com/lang/en/) or [npm](https://www.npmjs.com/get-npm)
#### Install dependencies
```bash
yarn install
```
#### Compiles and hot-reloads for development
```bash
yarn run serve
```
#### Compiles and minifies for production
```bash
yarn run build:prod
```
#### Lints and fixes files
```bash
yarn run lint
```
#### Run your unit tests
```bash
yarn run test:unit
```
#### Run your end-to-end tests
```bash
yarn run test:e2e
```
#### Generate all svg components
```bash
yarn run svg
```
#### Customize Vue configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## Contributing
See [CONTRIBUTING.md](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/CONTRIBUTING.md)
## License
[MIT License](https://github.com/Armour/vue-typescript-admin-template/blob/master/LICENSE)

289
README.md

@ -0,0 +1,289 @@
[English](./README.en.md) | 简体中文
## 总览
[vue-typescript-admin-template](http://armour.github.io/vue-typescript-admin-template) 是一个后台前端解决方案,它基于 [vue](https://github.com/vuejs/vue), [typescript](https://www.typescriptlang.org/) 和 [element-ui](https://github.com/ElemeFE/element)实现。原始的 Javascript 版本的代码是由 [PanJiaChen](https://github.com/PanJiaChen) 开发维护的 [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin/), 十分感谢大佬对开源社区做出的贡献 :)
如果你想从一个十分简单的基础模版开始,而不是直接使用这个功能丰富的集成方案的话,你可以看一看本项目的 [minimal](https://github.com/Armour/vue-typescript-admin-template/tree/minimal) 分支.
通过这个前端框架,作者尝试集成后台abp框架,提供管理页面的支持
## 线上文档
[文档](https://armour.github.io/vue-typescript-admin-docs/zh)
## 线上地址
[示例](https://armour.github.io/vue-typescript-admin-template)
## 截图
![登录页](./images/userLogin.png)
![角色页](./images/userRoles.png)
![权限页](./images/userPermissions.png)
## 相关项目
后端项目
[abpframework/abp](https://github.com/abpframework/abp) (abp vNext)
Typescript 版本:
[Armour/vue-typescript-admin-mock-server](https://github.com/armour/vue-typescript-admin-mock-server) (mock server for this project)
[Armour/vue-typescript-admin-docs](https://github.com/armour/vue-typescript-admin-docs) (documentation source for this project)
Javascript 版本:
[PanJiaChen/vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) (a vue2.0 minimal admin template)
[PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) (full features supported vue admin)
[PanJiaChen/electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) (a vue electron admin project)
## 功能
```txt
- 登录 / 注销
- 权限验证
- 页面权限
- 指令权限
- 权限配置
- 二步登录
- 多环境发布
- Dev / Stage / Prod
- 全局功能
- 国际化多语言
- 动态换肤
- 动态侧边栏(支持多级路由嵌套)
- 动态面包屑
- 快捷导航(支持右键操作)
- 粘贴板
- Svg 图标
- 搜索
- 全屏
- 设置
- Mock 数据 / Mock 服务器
- 支持 PWA
- 组件
- 编辑器
- 富文本编辑器
- Markdown 编辑器
- JSON 编辑器
- 头像上传
- 返回顶部
- CountTo
- 拖放区
- 拖拽弹窗
- 拖拽看板
- 拖拽列表
- 拖拽选择
- ECharts 图表
- Mixin
- 拆分窗格
- 黏性组件
- 表格
- 动态表格
- 拖拽表格
- 内联编辑表格
- 复杂表格
- Excel
- 导出excel
- 导入excel
- 前端可视化excel
- Zip
- 导出zip
- PDF
- 下载 pdf
- 控制台
- 引导页
- 综合实例
- 错误日志
- 错误页面
- 401
- 404
```
## 前序准备
你需要在本地安装 [node](http://nodejs.org/) 和 [git](https://git-scm.com/)。本项目技术栈基于 [typescript](https://www.typescriptlang.org/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element),所有的请求数据都使用[faker.js](https://github.com/Marak/Faker.js)进行模拟,提前了解和学习这些知识会对使用本项目有很大的帮助。
## 目录结构
本项目已经为你生成了一个完整的开发框架,提供了涵盖后台开发的各类功能和坑位,下面是整个项目的目录结构。
```bash
├── mock # mock 服务器 与 模拟数据
├── public # 静态资源 (会被直接复制)
│ │── favicon.ico # favicon图标
│ │── manifest.json # PWA 配置文件
│   └── index.html # html模板
├── src # 源代码
│   ├── api # 所有请求
│   ├── assets # 主题 字体等静态资源 (由 webpack 处理加载)
│   ├── components # 全局组件
│   ├── directive # 全局指令
│   ├── filters # 全局过滤函数
│   ├── icons # svg 图标
│   ├── lang # 国际化
│   ├── layout # 全局布局
│ ├── pwa # PWA service worker 相关的文件
│   ├── router # 路由
│   ├── store # 全局 vuex store
│   ├── styles # 全局样式
│   ├── utils # 全局方法
│   ├── views # 所有页面
│   ├── App.vue # 入口页面
│   ├── main.js # 入口文件 加载组件 初始化等
│ ├── permission.ts # 权限管理
│ ├── settings.ts # 设置文件
│ └── shims.d.ts # 模块注入
├── tests # 测试
├── .circleci/ # 自动化 CI 配置
├── .browserslistrc # browserslistrc 配置文件 (用于支持 Autoprefixer)
├── .editorconfig # 编辑相关配置
├── .env.xxx # 环境变量配置
├── .eslintrc.js # eslint 配置
├── babel.config.js # babel-loader 配置
├── cypress.json # e2e 测试配置
├── jest.config.js # jest 单元测试配置
├── package.json # package.json 依赖
├── postcss.config.js # postcss 配置
├── tsconfig.json # typescript 配置
└── vue.config.js # vue-cli 配置
```
## 如何设置以及启动项目
### 安装依赖
```bash
yarn install
```
### 更改配置文件名称
[.env.Github.production](./.env.Github.production) 变更为 .env.production
</br>
[vue.config.github.js ](./vue.config.github.js ) 变更为 vue.config.js
修改开发环境用于代理的服务器地址,以下提供了三个分别为IdentityService、IdentityServer、ApiService地址,如果有网关的话可以只需要一个网关地址即可
```bash
proxy: {
[process.env.VUE_APP_BASE_IDENTITY_SERVER]: {
target: '你的identityService地址',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_IDENTITY_SERVER]: ''
}
},
[process.env.VUE_APP_BASE_IDENTITY_SERVICE]: {
target: '你的identityServer服务器地址',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_IDENTITY_SERVICE]: ''
}
},
[process.env.VUE_APP_BASE_API]: {
target: '你的api网关地址',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
}
```
修改生产环境真实地址,如上
```bash
# Base api
# Remeber to change this to your production server address
# Here I used my mock server for this project
# VUE_APP_BASE_API = 'https://vue-typescript-admin-mock-server.armour.now.sh/mock-api/v1/'
VUE_APP_BASE_API = '你的api网关服务器地址'
VUE_APP_BASE_IDENTITY_SERVICE = '你的identityService服务器地址'
VUE_APP_BASE_IDENTITY_SERVER = '你的identityServer服务器地址'
# 客户端标识
VUE_APP_CLIENT_ID = 'vue-admin-element'
# 客户端密钥
VUE_APP_CLIENT_SECRET = '1q2w3e*'
```
### 启动本地开发环境(自带热启动)
```bash
yarn serve
```
### 构建生产环境 (自带压缩)
```bash
yarn build:prod
```
### 代码格式检查以及自动修复
```bash
yarn lint
```
### 运行单元测试
```bash
yarn test:unit
```
### 运行端对端测试
```bash
yarn test:e2e
```
### 自动生成 svg 组件
```bash
yarn run svg
```
### 自定义 Vue 配置
请看 [Configuration Reference](https://cli.vuejs.org/config/).
## 浏览器支持
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## 参与贡献
请看 [CONTRIBUTING.md](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/CONTRIBUTING.md)
## License
[MIT License](https://github.com/Armour/vue-typescript-admin-template/blob/master/LICENSE)

1
aspnet-core/.gitignore

@ -0,0 +1 @@
.vs

26
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\ApiGateway\Localization\ApplicationContracts\en.json" />
<None Remove="LINGYUN\ApiGateway\Localization\ApplicationContracts\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\ApiGateway\Localization\ApplicationContracts\en.json" />
<EmbeddedResource Include="LINGYUN\ApiGateway\Localization\ApplicationContracts\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.ApiGateway.Domain.Shared\LINGYUN.ApiGateway.Domain.Shared.csproj" />
</ItemGroup>
</Project>

27
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayApplicationContractsModule.cs

@ -0,0 +1,27 @@
using LINGYUN.ApiGateway.Localization;
using Volo.Abp.Application;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.ApiGateway
{
[DependsOn(typeof(ApiGatewayDomainSharedModule), typeof(AbpDddApplicationModule))]
public class ApiGatewayApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ApiGatewayApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<ApiGatewayResource>()
.AddVirtualJson("/LINGYUN/ApiGateway/Localization/ApplicationContracts");
});
}
}
}

55
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayPermissionDefinitionProvider.cs

@ -0,0 +1,55 @@
using LINGYUN.ApiGateway.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
namespace LINGYUN.ApiGateway
{
public class ApiGatewayPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var group = context.AddGroup(ApiGatewayPermissions.GroupName, L("Permissions:ApiGateway"), MultiTenancySides.Host);
var router = group.AddPermission(ApiGatewayPermissions.RouteGroup.Default, L("Permissions:RouteGroup"), MultiTenancySides.Host);
router.AddChild(ApiGatewayPermissions.RouteGroup.Create, L("Permissions:Create"), MultiTenancySides.Host);
router.AddChild(ApiGatewayPermissions.RouteGroup.Update, L("Permissions:Update"), MultiTenancySides.Host);
router.AddChild(ApiGatewayPermissions.RouteGroup.Export, L("Permissions:Export"), MultiTenancySides.Host);
router.AddChild(ApiGatewayPermissions.RouteGroup.Import, L("Permissions:Import"), MultiTenancySides.Host);
router.AddChild(ApiGatewayPermissions.RouteGroup.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
var global = group.AddPermission(ApiGatewayPermissions.Global.Default, L("Permissions:Global"), MultiTenancySides.Host);
global.AddChild(ApiGatewayPermissions.Global.Create, L("Permissions:Create"), MultiTenancySides.Host);
global.AddChild(ApiGatewayPermissions.Global.Update, L("Permissions:Update"), MultiTenancySides.Host);
global.AddChild(ApiGatewayPermissions.Global.Export, L("Permissions:Export"), MultiTenancySides.Host);
global.AddChild(ApiGatewayPermissions.Global.Import, L("Permissions:Import"), MultiTenancySides.Host);
global.AddChild(ApiGatewayPermissions.Global.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
var route = group.AddPermission(ApiGatewayPermissions.Route.Default, L("Permissions:Route"), MultiTenancySides.Host);
route.AddChild(ApiGatewayPermissions.Route.Create, L("Permissions:Create"), MultiTenancySides.Host);
route.AddChild(ApiGatewayPermissions.Route.Update, L("Permissions:Update"), MultiTenancySides.Host);
route.AddChild(ApiGatewayPermissions.Route.Export, L("Permissions:Export"), MultiTenancySides.Host);
route.AddChild(ApiGatewayPermissions.Route.Import, L("Permissions:Import"), MultiTenancySides.Host);
route.AddChild(ApiGatewayPermissions.Route.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
var dynamicRoute = group.AddPermission(ApiGatewayPermissions.DynamicRoute.Default, L("Permissions:DynamicRoute"), MultiTenancySides.Host);
dynamicRoute.AddChild(ApiGatewayPermissions.DynamicRoute.Create, L("Permissions:Create"), MultiTenancySides.Host);
dynamicRoute.AddChild(ApiGatewayPermissions.DynamicRoute.Update, L("Permissions:Update"), MultiTenancySides.Host);
dynamicRoute.AddChild(ApiGatewayPermissions.DynamicRoute.Export, L("Permissions:Export"), MultiTenancySides.Host);
dynamicRoute.AddChild(ApiGatewayPermissions.DynamicRoute.Import, L("Permissions:Import"), MultiTenancySides.Host);
dynamicRoute.AddChild(ApiGatewayPermissions.DynamicRoute.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
var aggregateRoute = group.AddPermission(ApiGatewayPermissions.AggregateRoute.Default, L("Permissions:AggregateRoute"), MultiTenancySides.Host);
aggregateRoute.AddChild(ApiGatewayPermissions.AggregateRoute.Create, L("Permissions:Create"), MultiTenancySides.Host);
aggregateRoute.AddChild(ApiGatewayPermissions.AggregateRoute.Update, L("Permissions:Update"), MultiTenancySides.Host);
aggregateRoute.AddChild(ApiGatewayPermissions.AggregateRoute.Export, L("Permissions:Export"), MultiTenancySides.Host);
aggregateRoute.AddChild(ApiGatewayPermissions.AggregateRoute.Import, L("Permissions:Import"), MultiTenancySides.Host);
aggregateRoute.AddChild(ApiGatewayPermissions.AggregateRoute.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
}
protected virtual LocalizableString L(string name)
{
return LocalizableString.Create<ApiGatewayResource>(name);
}
}
}

56
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/ApiGatewayPermissions.cs

@ -0,0 +1,56 @@
namespace LINGYUN.ApiGateway
{
public static class ApiGatewayPermissions
{
public const string GroupName = "ApiGateway";
public static class RouteGroup
{
public const string Default = GroupName + ".RouteGroup";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
public static class Global
{
public const string Default = GroupName + ".Global";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
public static class Route
{
public const string Default = GroupName + ".Route";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
public static class DynamicRoute
{
public const string Default = GroupName + ".DynamicRoute";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
public static class AggregateRoute
{
public const string Default = GroupName + ".AggregateRoute";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
}
}

15
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Localization/ApplicationContracts/en.json

@ -0,0 +1,15 @@
{
"culture": "en",
"texts": {
"Permissions:ApiGateway": "Apigateway",
"Permissions:RouteGroup": "Route group",
"Permissions:Global": "Global",
"Permissions:Route": "Route",
"Permissions:DynamicRoute": "Dynamic",
"Permissions:AggregateRoute": "Aggregate",
"Permissions:Update": "Update",
"Permissions:Export": "Export",
"Permissions:Import": "Import",
"Permissions:Delete": "Delete"
}
}

16
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Localization/ApplicationContracts/zh-Hans.json

@ -0,0 +1,16 @@
{
"culture": "zh-Hans",
"texts": {
"Permissions:ApiGateway": "网关管理",
"Permissions:RouteGroup": "路由组",
"Permissions:Global": "基础配置",
"Permissions:Route": "路由配置",
"Permissions:DynamicRoute": "动态路由",
"Permissions:AggregateRoute": "路由聚合",
"Permissions:Create": "新增",
"Permissions:Update": "编辑",
"Permissions:Export": "导出",
"Permissions:Import": "导入",
"Permissions:Delete": "删除"
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/AggregateRouteGetByAppIdInputDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class AggregateRouteGetByAppIdInputDto
{
[Required]
public string AppId { get; set; }
}
}

14
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/AggregateRouteGetByPagedInputDto.cs

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public class AggregateRouteGetByPagedInputDto : PagedAndSortedResultRequestDto
{
[Required]
[StringLength(50)]
public string AppId { get; set; }
public string Filter { get; set; }
}
}

24
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/AggregateReRouteDtoBase.cs

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class AggregateReRouteDtoBase
{
public List<string> ReRouteKeys { get; set; }
public List<AggregateReRouteConfigDto> ReRouteKeysConfig { get; set; }
public string UpstreamPathTemplate { get; set; }
public string UpstreamHost { get; set; }
public bool ReRouteIsCaseSensitive { get; set; }
public string Aggregator { get; set; }
public int Priority { get; set; }
public List<string> UpstreamHttpMethod { get; set; }
public AggregateReRouteDtoBase()
{
ReRouteKeys = new List<string>();
UpstreamHttpMethod = new List<string>();
ReRouteKeysConfig = new List<AggregateReRouteConfigDto>();
}
}
}

17
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/DynamicReRouteDtoBase.cs

@ -0,0 +1,17 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class DynamicReRouteDtoBase
{
public string ServiceName { get; set; }
public string DownstreamHttpVersion { get; set; }
public RateLimitRuleDto RateLimitRule { get; set; }
public DynamicReRouteDtoBase()
{
RateLimitRule = new RateLimitRuleDto();
}
}
}

35
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/GlobalConfigurationDtoBase.cs

@ -0,0 +1,35 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class GlobalConfigurationDtoBase
{
public string RequestIdKey { get; set; }
public ServiceDiscoveryProviderDto ServiceDiscoveryProvider { get; set; }
public RateLimitOptionsDto RateLimitOptions { get; set; }
public QosOptionsDto QoSOptions { get; set; }
public string BaseUrl { get; set; }
public LoadBalancerOptionsDto LoadBalancerOptions { get; set; }
public string DownstreamScheme { get; set; }
public HttpHandlerOptionsDto HttpHandlerOptions { get; set; }
public string DownstreamHttpVersion { get; set; }
public GlobalConfigurationDtoBase()
{
ServiceDiscoveryProvider = new ServiceDiscoveryProviderDto();
RateLimitOptions = new RateLimitOptionsDto();
QoSOptions = new QosOptionsDto();
LoadBalancerOptions = new LoadBalancerOptionsDto();
HttpHandlerOptions = new HttpHandlerOptionsDto();
}
}
}

64
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Base/ReRouteDtoBase.cs

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class ReRouteDtoBase
{
public string DownstreamPathTemplate { get; set; }
public Dictionary<string, string> ChangeDownstreamPathTemplate { get; set; }
public string UpstreamPathTemplate { get; set; }
public List<string> UpstreamHttpMethod { get; set; }
public Dictionary<string, string> AddHeadersToRequest { get; set; }
public Dictionary<string, string> UpstreamHeaderTransform { get; set; }
public Dictionary<string, string> DownstreamHeaderTransform { get; set; }
public Dictionary<string, string> AddClaimsToRequest { get; set; }
public Dictionary<string, string> RouteClaimsRequirement { get; set; }
public Dictionary<string, string> AddQueriesToRequest { get; set; }
public string RequestIdKey { get; set; }
public CacheOptionsDto FileCacheOptions { get; set; }
public bool ReRouteIsCaseSensitive { get; set; }
public string ServiceName { get; set; }
public string ServiceNamespace { get; set; }
public string DownstreamScheme { get; set; }
public QosOptionsDto QoSOptions { get; set; }
public LoadBalancerOptionsDto LoadBalancerOptions { get; set; }
public RateLimitRuleDto RateLimitOptions { get; set; }
public AuthenticationOptionsDto AuthenticationOptions { get; set; }
public HttpHandlerOptionsDto HttpHandlerOptions { get; set; }
public List<HostAndPortDto> DownstreamHostAndPorts { get; set; }
public string UpstreamHost { get; set; }
public string Key { get; set; }
public List<string> DelegatingHandlers { get; set; }
public int? Priority { get; set; }
public int? Timeout { get; set; }
public bool DangerousAcceptAnyServerCertificateValidator { get; set; }
public string DownstreamHttpVersion { get; set; }
public string DownstreamHttpMethod { get; set; }
public SecurityOptionsDto SecurityOptions { get; set; }
public ReRouteDtoBase()
{
ChangeDownstreamPathTemplate = new Dictionary<string, string>();
AddHeadersToRequest = new Dictionary<string, string>();
UpstreamHeaderTransform = new Dictionary<string, string>();
DownstreamHeaderTransform = new Dictionary<string, string>();
AddClaimsToRequest = new Dictionary<string, string>();
RouteClaimsRequirement = new Dictionary<string, string>();
AddQueriesToRequest = new Dictionary<string, string>();
DownstreamHostAndPorts = new List<HostAndPortDto>();
UpstreamHttpMethod = new List<string>();
DelegatingHandlers = new List<string>();
FileCacheOptions = new CacheOptionsDto();
QoSOptions = new QosOptionsDto();
LoadBalancerOptions = new LoadBalancerOptionsDto();
RateLimitOptions = new RateLimitRuleDto();
AuthenticationOptions = new AuthenticationOptionsDto();
HttpHandlerOptions = new HttpHandlerOptionsDto();
SecurityOptions = new SecurityOptionsDto();
}
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/DynamicRouteGetByAppIdInputDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class DynamicRouteGetByAppIdInputDto
{
[Required]
public string AppId { get; set; }
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalCreateDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class GlobalCreateDto : GlobalConfigurationDtoBase
{
[Required]
public string AppId { get; set; }
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalGetByAppIdInputDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class GlobalGetByAppIdInputDto
{
[Required]
public string AppId { get; set; }
}
}

9
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalGetByPagedInputDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public class GlobalGetByPagedInputDto : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/GlobalUpdateDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class GlobalUpdateDto : GlobalConfigurationDtoBase
{
[Required]
public long ItemId { get; set; }
}
}

15
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteCreateDto.cs

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteCreateDto : ReRouteDtoBase
{
[Required]
[StringLength(50)]
public string ReRouteName { get; set; }
[Required]
[StringLength(50)]
public string AppId { get; set; }
}
}

11
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByAppIdInputDto.cs

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteGetByAppIdInputDto
{
[Required]
[StringLength(50)]
public string AppId { get; set; }
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByIdInputDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteGetByIdInputDto
{
[Required]
public long RouteId { get; set; }
}
}

11
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByNameInputDto.cs

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteGetByNameInputDto
{
[Required]
[StringLength(50)]
public string RouteName { get; set; }
}
}

14
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteGetByPagedInputDto.cs

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteGetByPagedInputDto : PagedAndSortedResultRequestDto
{
[Required]
[StringLength(50)]
public string AppId { get; set; }
public string Filter { get; set; }
}
}

17
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/ReRouteUpdateDto.cs

@ -0,0 +1,17 @@
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class ReRouteUpdateDto : ReRouteDtoBase
{
[Required]
public string ReRouteId { get; set; }
[Required]
public string ConcurrencyStamp { get; set; }
[StringLength(50)]
public string ReRouteName { get; set; }
}
}

12
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AggregateReRouteConfigDto.cs

@ -0,0 +1,12 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class AggregateReRouteConfigDto
{
public string ReRouteKey { get; set; }
public string Parameter { get; set; }
public string JsonPath { get; set; }
}
}

16
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AggregateReRouteDto.cs

@ -0,0 +1,16 @@
using Newtonsoft.Json;
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class AggregateReRouteDto : AggregateReRouteDtoBase
{
[JsonConverter(typeof(HexLongConverter))]
public long ReRouteId { get; set; }
public AggregateReRouteDto()
{
}
}
}

16
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/AuthenticationOptionsDto.cs

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class AuthenticationOptionsDto
{
public string AuthenticationProviderKey { get; set; }
public List<string> AllowedScopes { get; set; }
public AuthenticationOptionsDto()
{
AllowedScopes = new List<string>();
}
}
}

11
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/CacheOptionsDto.cs

@ -0,0 +1,11 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class CacheOptionsDto
{
public int? TtlSeconds { get; set; }
public string Region { get; set; }
}
}

12
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/DynamicReRouteDto.cs

@ -0,0 +1,12 @@
using Newtonsoft.Json;
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class DynamicReRouteDto : DynamicReRouteDtoBase
{
[JsonConverter(typeof(HexLongConverter))]
public virtual long DynamicReRouteId { get; set; }
}
}

17
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/GlobalConfigurationDto.cs

@ -0,0 +1,17 @@
using Newtonsoft.Json;
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class GlobalConfigurationDto : GlobalConfigurationDtoBase
{
[JsonConverter(typeof(HexLongConverter))]
public long ItemId { get; set; }
public string AppId { get; set; }
public GlobalConfigurationDto()
{
}
}
}

11
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/HostAndPortDto.cs

@ -0,0 +1,11 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class HostAndPortDto
{
public string Host { get; set; }
public int? Port { get; set; }
}
}

18
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/HttpHandlerOptionsDto.cs

@ -0,0 +1,18 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class HttpHandlerOptionsDto
{
public bool AllowAutoRedirect { get; set; }
public bool UseCookieContainer { get; set; }
public bool UseTracing { get; set; }
public bool UseProxy { get; set; }
public int? MaxConnectionsPerServer { get; set; }
}
}

12
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/LoadBalancerOptionsDto.cs

@ -0,0 +1,12 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class LoadBalancerOptionsDto
{
public string Type { get; set; }
public string Key { get; set; }
public int? Expiry { get; set; }
}
}

14
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/QosOptionsDto.cs

@ -0,0 +1,14 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class QosOptionsDto
{
public int? ExceptionsAllowedBeforeBreaking { get; set; }
public int? DurationOfBreak { get; set; }
public int? TimeoutValue { get; set; }
}
}

14
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/RateLimitOptionsDto.cs

@ -0,0 +1,14 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class RateLimitOptionsDto
{
public string ClientIdHeader { get; set; }
public string QuotaExceededMessage { get; set; }
public string RateLimitCounterPrefix { get; set; }
public bool DisableRateLimitHeaders { get; set; }
public int? HttpStatusCode { get; set; }
}
}

23
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/RateLimitRuleDto.cs

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class RateLimitRuleDto
{
public List<string> ClientWhitelist { get; set; }
public bool EnableRateLimiting { get; set; }
public string Period { get; set; }
public double? PeriodTimespan { get; set; }
public long? Limit { get; set; }
public RateLimitRuleDto()
{
ClientWhitelist = new List<string>();
}
}
}

20
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/ReRouteDto.cs

@ -0,0 +1,20 @@
using Newtonsoft.Json;
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class ReRouteDto : ReRouteDtoBase
{
public int Id { get; set; }
[JsonConverter(typeof(HexLongConverter))]
public long ReRouteId { get; set; }
public string ConcurrencyStamp { get; set; }
public string ReRouteName { get; set; }
public string AppId { get; set; }
public ReRouteDto()
{
}
}
}

18
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/SecurityOptionsDto.cs

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class SecurityOptionsDto
{
public List<string> IPAllowedList { get; set; }
public List<string> IPBlockedList { get; set; }
public SecurityOptionsDto()
{
IPAllowedList = new List<string>();
IPBlockedList = new List<string>();
}
}
}

17
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/Result/ServiceDiscoveryProviderDto.cs

@ -0,0 +1,17 @@
using System;
namespace LINGYUN.ApiGateway.Ocelot
{
[Serializable]
public class ServiceDiscoveryProviderDto
{
public string Host { get; set; }
public int? Port { get; set; }
public string Type { get; set; }
public string Token { get; set; }
public string ConfigurationKey { get; set; }
public int? PollingInterval { get; set; }
public string Namespace { get; set; }
public string Scheme { get; set; }
}
}

13
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupAppIdsDto.cs

@ -0,0 +1,13 @@
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupAppIdsDto
{
public string AppId { get; }
public string AppName { get; }
public RouteGroupAppIdsDto(string appId, string appName)
{
AppId = appId;
AppName = appName;
}
}
}

27
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupCreateDto.cs

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupCreateDto
{
[Required]
[StringLength(50)]
public string Name { get; set; }
[Required]
[StringLength(50)]
public string AppId { get; set; }
[Required]
[StringLength(100)]
public string AppName { get; set; }
[StringLength(256)]
public string AppIpAddress { get; set; }
[StringLength(256)]
public string Description { get; set; }
public bool IsActive { get; set; }
}
}

15
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupDto.cs

@ -0,0 +1,15 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupDto : FullAuditedEntityDto<Guid>
{
public string Name { get; set; }
public string AppId { get; set; }
public string AppName { get; set; }
public string AppIpAddress { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
}
}

10
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupGetByAppIdInputDto.cs

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupGetByAppIdInputDto
{
[Required]
public string AppId { get; set; }
}
}

9
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupGetByPagedInputDto.cs

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupGetByPagedInputDto : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}
}

19
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupUpdateDto.cs

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.ApiGateway.Ocelot
{
public class RouteGroupUpdateDto
{
[Required]
[StringLength(50)]
public string AppId { get; set; }
[StringLength(50)]
public string Name { get; set; }
[StringLength(256)]
public string Description { get; set; }
public bool IsActive { get; set; }
}
}

13
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IAggregateReRouteAppService.cs

@ -0,0 +1,13 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.ApiGateway.Ocelot
{
public interface IAggregateReRouteAppService : IApplicationService
{
Task<ListResultDto<AggregateReRouteDto>> GetAsync(AggregateRouteGetByAppIdInputDto aggregateRouteGetByAppId);
Task<PagedResultDto<AggregateReRouteDto>> GetPagedListAsync(AggregateRouteGetByPagedInputDto aggregateRouteGetByPaged);
}
}

11
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IDynamicReRouteAppService.cs

@ -0,0 +1,11 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.ApiGateway.Ocelot
{
public interface IDynamicReRouteAppService : IApplicationService
{
Task<ListResultDto<DynamicReRouteDto>> GetAsync(DynamicRouteGetByAppIdInputDto dynamicRouteGetByAppId);
}
}

19
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IGlobalConfigurationAppService.cs

@ -0,0 +1,19 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.ApiGateway.Ocelot
{
public interface IGlobalConfigurationAppService : IApplicationService
{
Task<GlobalConfigurationDto> GetAsync(GlobalGetByAppIdInputDto globalGetByAppId);
Task<GlobalConfigurationDto> CreateAsync(GlobalCreateDto globalCreateDto);
Task<GlobalConfigurationDto> UpdateAsync(GlobalUpdateDto globalUpdateDto);
Task<PagedResultDto<GlobalConfigurationDto>> GetAsync(GlobalGetByPagedInputDto globalGetPaged);
Task DeleteAsync(GlobalGetByAppIdInputDto globalGetByAppId);
}
}

25
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IReRouteAppService.cs

@ -0,0 +1,25 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.ApiGateway.Ocelot
{
public interface IReRouteAppService : IApplicationService
{
Task<ListResultDto<ReRouteDto>> GetAsync(ReRouteGetByAppIdInputDto routeGetByAppId);
Task<PagedResultDto<ReRouteDto>> GetPagedListAsync(ReRouteGetByPagedInputDto routeGetByPaged);
Task<ReRouteDto> GetByRouteNameAsync(ReRouteGetByNameInputDto routeGetByName);
Task<ReRouteDto> GetAsync(ReRouteGetByIdInputDto routeGetById);
Task<ReRouteDto> CreateAsync(ReRouteCreateDto routeCreateDto);
Task<ReRouteDto> UpdateAsync(ReRouteUpdateDto routeUpdateDto);
Task DeleteAsync(ReRouteGetByIdInputDto routeGetById);
Task RemoveAsync(ReRouteGetByAppIdInputDto routeGetByAppId);
}
}

20
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/IRouteGroupAppService.cs

@ -0,0 +1,20 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
public interface IRouteGroupAppService
{
Task<ListResultDto<RouteGroupAppIdsDto>> GetActivedAsync();
Task<RouteGroupDto> GetAsync(RouteGroupGetByAppIdInputDto routerGetByAppId);
Task<PagedResultDto<RouteGroupDto>> GetAsync(RouteGroupGetByPagedInputDto routerGetByPagedInput);
Task<RouteGroupDto> CreateAsync(RouteGroupCreateDto routerCreateDto);
Task<RouteGroupDto> UpdateAsync(RouteGroupUpdateDto routerUpdateDto);
Task DeleteAsync(RouteGroupGetByAppIdInputDto routerGetByAppId);
}
}

1780
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.deps.json

File diff suppressed because it is too large

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.pdb

Binary file not shown.

23
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.AssemblyInfo.cs

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LINGYUN.ApiGateway.Application.Contracts")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LINGYUN.ApiGateway.Application.Contracts")]
[assembly: System.Reflection.AssemblyTitleAttribute("LINGYUN.ApiGateway.Application.Contracts")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.AssemblyInfoInputs.cache

@ -0,0 +1 @@
38563a23ff7b2ec39042ab8efd13a2b3e581a151

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.assets.cache

Binary file not shown.

0
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CopyComplete

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
05d2e1f53650cb86c4348471113d51741fb76ff0

23
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csproj.FileListAbsolute.txt

@ -0,0 +1,23 @@
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.deps.json
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csproj.CopyComplete
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.deps.json
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csproj.CopyComplete
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.csproj.CoreCompileInputs.cache

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.csprojAssemblyReference.cache

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb

Binary file not shown.

5
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.cache

@ -0,0 +1,5 @@
{
"version": 1,
"dgSpecHash": "bpGXe7Rd9lA3QR5pBR6P7HOvvpyhcVNuzhwEzgcwkkdGKaOr1i1Kqyd+nJXiTN3ul6YWEgU1sxyiEllniXCbkQ==",
"success": true
}

142
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.dgspec.json

@ -0,0 +1,142 @@
{
"format": 1,
"restore": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\LINGYUN.ApiGateway.Application.Contracts.csproj": {}
},
"projects": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\LINGYUN.ApiGateway.Application.Contracts.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\LINGYUN.ApiGateway.Application.Contracts.csproj",
"projectName": "LINGYUN.ApiGateway.Application.Contracts",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\LINGYUN.ApiGateway.Application.Contracts.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\LINGYUN.ApiGateway.Domain.Shared.csproj": {
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\LINGYUN.ApiGateway.Domain.Shared.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.Ddd.Application": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\LINGYUN.ApiGateway.Domain.Shared.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\LINGYUN.ApiGateway.Domain.Shared.csproj",
"projectName": "LINGYUN.ApiGateway.Domain.Shared",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\LINGYUN.ApiGateway.Domain.Shared.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Domain.Shared\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.Localization": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
}
}
}

15
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.props

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.4.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

9
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/LINGYUN.ApiGateway.Application.Contracts.csproj.nuget.g.targets

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
</ImportGroup>
</Project>

4166
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/project.assets.json

File diff suppressed because it is too large

103
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/obj/project.nuget.cache

@ -0,0 +1,103 @@
{
"version": 2,
"dgSpecHash": "bpGXe7Rd9lA3QR5pBR6P7HOvvpyhcVNuzhwEzgcwkkdGKaOr1i1Kqyd+nJXiTN3ul6YWEgU1sxyiEllniXCbkQ==",
"success": true,
"projectFilePath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\apigateway\\LINGYUN.ApiGateway.Application.Contracts\\LINGYUN.ApiGateway.Application.Contracts.csproj",
"expectedPackageFiles": [
"C:\\Users\\iVarKey\\.nuget\\packages\\configureawait.fody\\3.3.1\\configureawait.fody.3.3.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\fody\\6.0.2\\fody.6.0.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\jetbrains.annotations\\2019.1.3\\jetbrains.annotations.2019.1.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.authorization\\3.1.2\\microsoft.aspnetcore.authorization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.metadata\\3.1.2\\microsoft.aspnetcore.metadata.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.0\\microsoft.bcl.asyncinterfaces.1.1.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration\\3.1.2\\microsoft.extensions.configuration.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\3.1.2\\microsoft.extensions.configuration.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.binder\\3.1.2\\microsoft.extensions.configuration.binder.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.commandline\\3.1.2\\microsoft.extensions.configuration.commandline.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\3.1.2\\microsoft.extensions.configuration.environmentvariables.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\3.1.2\\microsoft.extensions.configuration.fileextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.json\\3.1.2\\microsoft.extensions.configuration.json.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.usersecrets\\3.1.2\\microsoft.extensions.configuration.usersecrets.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\3.1.2\\microsoft.extensions.dependencyinjection.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\3.1.2\\microsoft.extensions.dependencyinjection.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\3.1.2\\microsoft.extensions.fileproviders.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.composite\\3.1.2\\microsoft.extensions.fileproviders.composite.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\3.1.2\\microsoft.extensions.fileproviders.physical.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\3.1.2\\microsoft.extensions.filesystemglobbing.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.2\\microsoft.extensions.hosting.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization\\3.1.2\\microsoft.extensions.localization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization.abstractions\\3.1.2\\microsoft.extensions.localization.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging\\3.1.2\\microsoft.extensions.logging.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\3.1.2\\microsoft.extensions.logging.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options\\3.1.2\\microsoft.extensions.options.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\3.1.2\\microsoft.extensions.options.configurationextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.primitives\\3.1.2\\microsoft.extensions.primitives.3.1.2.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.context\\5.0.0\\nito.asyncex.context.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.coordination\\5.0.0\\nito.asyncex.coordination.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.tasks\\5.0.0\\nito.asyncex.tasks.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.collections.deque\\1.0.4\\nito.collections.deque.1.0.4.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.disposables\\2.0.0\\nito.disposables.2.0.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.buffers\\4.5.0\\system.buffers.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.collections.immutable\\1.7.0\\system.collections.immutable.1.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.componentmodel.annotations\\4.7.0\\system.componentmodel.annotations.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.dynamic.core\\1.0.19\\system.linq.dynamic.core.1.0.19.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.queryable\\4.3.0\\system.linq.queryable.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.memory\\4.5.3\\system.memory.4.5.3.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.numerics.vectors\\4.5.0\\system.numerics.vectors.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.7.0\\system.runtime.compilerservices.unsafe.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.encodings.web\\4.7.0\\system.text.encodings.web.4.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.json\\4.7.1\\system.text.json.4.7.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.2\\system.threading.tasks.extensions.4.5.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.auditing\\2.7.0\\volo.abp.auditing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.authorization\\2.7.0\\volo.abp.authorization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.core\\2.7.0\\volo.abp.core.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.data\\2.7.0\\volo.abp.data.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application\\2.7.0\\volo.abp.ddd.application.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application.contracts\\2.7.0\\volo.abp.ddd.application.contracts.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.domain\\2.7.0\\volo.abp.ddd.domain.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.eventbus\\2.7.0\\volo.abp.eventbus.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.features\\2.7.0\\volo.abp.features.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.guids\\2.7.0\\volo.abp.guids.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.http.abstractions\\2.7.0\\volo.abp.http.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.json\\2.7.0\\volo.abp.json.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization\\2.7.0\\volo.abp.localization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization.abstractions\\2.7.0\\volo.abp.localization.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.multitenancy\\2.7.0\\volo.abp.multitenancy.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectextending\\2.7.0\\volo.abp.objectextending.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectmapping\\2.7.0\\volo.abp.objectmapping.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.security\\2.7.0\\volo.abp.security.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.settings\\2.7.0\\volo.abp.settings.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.threading\\2.7.0\\volo.abp.threading.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.timing\\2.7.0\\volo.abp.timing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.uow\\2.7.0\\volo.abp.uow.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation\\2.7.0\\volo.abp.validation.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation.abstractions\\2.7.0\\volo.abp.validation.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.virtualfilesystem\\2.7.0\\volo.abp.virtualfilesystem.2.7.0.nupkg.sha512"
],
"logs": []
}

17
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.ApiGateway.Application.Contracts\LINGYUN.ApiGateway.Application.Contracts.csproj" />
<ProjectReference Include="..\LINGYUN.ApiGateway.Domain\LINGYUN.ApiGateway.Domain.csproj" />
</ItemGroup>
</Project>

206
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationAutoMapperProfile.cs

@ -0,0 +1,206 @@
using AutoMapper;
using LINGYUN.ApiGateway.Ocelot;
using LINGYUN.ApiGateway.Snowflake;
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.ApiGateway
{
public class ApiGatewayApplicationAutoMapperProfile : Profile, ISingletonDependency
{
public ApiGatewayApplicationAutoMapperProfile(ISnowflakeIdGenerator snowflakeIdGenerator)
{
//Configure your AutoMapper mapping configuration here...
CreateMap<CacheOptions, CacheOptionsDto>();
CreateMap<QoSOptions, QosOptionsDto>();
CreateMap<LoadBalancerOptions, LoadBalancerOptionsDto>();
CreateMap<RateLimitOptions, RateLimitOptionsDto>();
CreateMap<ServiceDiscoveryProvider, ServiceDiscoveryProviderDto>();
CreateMap<RateLimitRule, RateLimitRuleDto>()
.ForMember(dto => dto.ClientWhitelist, map => map.MapFrom((m, n) =>
{
if (!m.ClientWhitelist.IsNullOrWhiteSpace())
{
return m.ClientWhitelist.Split(',').ToList();
}
return new List<string>();
}));
CreateMap<AuthenticationOptions, AuthenticationOptionsDto>()
.ForMember(dto => dto.AllowedScopes, map => map.MapFrom(m => !string.IsNullOrWhiteSpace(m.AllowedScopes)
? m.AllowedScopes.Split(',').ToList()
: new List<string>()));
CreateMap<HttpHandlerOptions, HttpHandlerOptionsDto>();
CreateMap<HostAndPort, HostAndPortDto>();
CreateMap<SecurityOptions, SecurityOptionsDto>()
.ForMember(dto => dto.IPAllowedList, map => map.MapFrom((m, n) =>
{
if (!m.IPAllowedList.IsNullOrWhiteSpace())
{
return m.IPAllowedList.Split(',').ToList();
}
return new List<string>();
}))
.ForMember(dto => dto.IPBlockedList, map => map.MapFrom((m, n) =>
{
if (!m.IPBlockedList.IsNullOrWhiteSpace())
{
return m.IPBlockedList.Split(',').ToList();
}
return new List<string>();
}));
CreateMap<AggregateReRouteConfig, AggregateReRouteConfigDto>();
CreateMap<AggregateReRoute, AggregateReRouteDto>()
.ForMember(dto => dto.ReRouteKeys, map => map.MapFrom(m => !m.ReRouteKeys.IsNullOrWhiteSpace() && m.ReRouteKeys.Contains(",")
? m.ReRouteKeys.Split(',').ToList()
: new List<string>()))
.ForMember(dto => dto.UpstreamHttpMethod, map => map.MapFrom(m => !m.UpstreamHttpMethod.IsNullOrWhiteSpace() && m.UpstreamHttpMethod.Contains(",")
? m.UpstreamHttpMethod.Split(',').ToList()
: new List<string>()));
CreateMap<GlobalConfiguration, GlobalConfigurationDto>();
CreateMap<DynamicReRoute, DynamicReRouteDto>();
CreateMap<ReRoute, ReRouteDto>()
.ForMember(frr => frr.AddClaimsToRequest, map => map.MapFrom(m => MapperDictionary(m.AddClaimsToRequest)))
.ForMember(frr => frr.AddHeadersToRequest, map => map.MapFrom(m => MapperDictionary(m.AddHeadersToRequest)))
.ForMember(frr => frr.AddQueriesToRequest, map => map.MapFrom(m => MapperDictionary(m.AddQueriesToRequest)))
.ForMember(frr => frr.DelegatingHandlers, map => map.MapFrom(m => MapperList(m.DelegatingHandlers)))
.ForMember(frr => frr.DownstreamHeaderTransform, map => map.MapFrom(m => MapperDictionary(m.DownstreamHeaderTransform)))
.ForMember(frr => frr.RouteClaimsRequirement, map => map.MapFrom(m => MapperDictionary(m.RouteClaimsRequirement)))
.ForMember(frr => frr.UpstreamHeaderTransform, map => map.MapFrom(m => MapperDictionary(m.UpstreamHeaderTransform)))
.ForMember(frr => frr.ChangeDownstreamPathTemplate, map => map.MapFrom(m => MapperDictionary(m.ChangeDownstreamPathTemplate)))
.ForMember(frr => frr.UpstreamHttpMethod, map => map.MapFrom(m => MapperList(m.UpstreamHttpMethod)))
.ForMember(frr => frr.DownstreamHostAndPorts, map => map.MapFrom(m => MapperHostAndPortList(m.DownstreamHostAndPorts)));
CreateMap<ReRouteCreateDto, ReRoute>()
.ForCtorParam("rerouteId", x => x.MapFrom(m => snowflakeIdGenerator.NextId()))
.ForCtorParam("routeName", x => x.MapFrom(m => m.ReRouteName))
.ForCtorParam("appId", x => x.MapFrom(m => m.AppId))
.ForMember(s => s.DelegatingHandlers, d => d.MapFrom((dto, src) =>
{
src.SetDelegatingHandler(dto.DelegatingHandlers);
return src.DelegatingHandlers;
}))
.ForMember(s => s.DownstreamHeaderTransform, d => d.MapFrom((dto, src) =>
{
src.SetDownstreamHeader(dto.DownstreamHeaderTransform);
return src.DownstreamHeaderTransform;
}))
.ForMember(s => s.AddQueriesToRequest, d => d.MapFrom((dto, src) =>
{
src.SetQueriesParamter(dto.AddQueriesToRequest);
return src.AddQueriesToRequest;
}))
.ForMember(s => s.AddClaimsToRequest, d => d.MapFrom((dto, src) =>
{
src.SetRequestClaims(dto.AddClaimsToRequest);
return src.AddClaimsToRequest;
}))
.ForMember(s => s.AddHeadersToRequest, d => d.MapFrom((dto, src) =>
{
src.SetRequestHeader(dto.AddHeadersToRequest);
return src.AddHeadersToRequest;
}))
.ForMember(s => s.RouteClaimsRequirement, d => d.MapFrom((dto, src) =>
{
src.SetRouteClaims(dto.RouteClaimsRequirement);
return src.RouteClaimsRequirement;
}))
.ForMember(s => s.UpstreamHeaderTransform, d => d.MapFrom((dto, src) =>
{
src.SetUpstreamHeader(dto.UpstreamHeaderTransform);
return src.UpstreamHeaderTransform;
}))
.ForMember(s => s.ChangeDownstreamPathTemplate, d => d.MapFrom((dto, src) =>
{
src.SetChangeDownstreamPath(dto.ChangeDownstreamPathTemplate);
return src.ChangeDownstreamPathTemplate;
}))
.ForMember(map => map.QoSOptions, dto => dto.Ignore())
.ForMember(map => map.CacheOptions, dto => dto.Ignore())
.ForMember(map => map.LoadBalancerOptions, dto => dto.Ignore())
.ForMember(map => map.RateLimitOptions, dto => dto.Ignore())
.ForMember(map => map.AuthenticationOptions, dto => dto.Ignore())
.ForMember(map => map.HttpHandlerOptions, dto => dto.Ignore())
.ForMember(map => map.SecurityOptions, dto => dto.Ignore());
CreateMap<RouteGroup, RouteGroupDto>();
}
private Dictionary<string, string> MapperDictionary(string sourceString)
{
var dictionary = new Dictionary<string, string>();
if (!string.IsNullOrWhiteSpace(sourceString))
{
var headers = sourceString.Split(',').ToList();
if (headers != null && headers.Count > 0)
{
foreach (var header in headers)
{
var current = header.Split(':');
if (current != null && current.Length == 2)
{
dictionary.Add(current[0], current[1]);
}
}
}
}
return dictionary;
}
private List<string> MapperList(string sourceString)
{
var list = new List<string>();
if (!string.IsNullOrWhiteSpace(sourceString))
{
var srcList = sourceString.Split(',');
foreach (var src in srcList)
{
if (!src.IsNullOrWhiteSpace())
{
list.Add(src);
}
}
}
return list;
}
private List<HostAndPortDto> MapperHostAndPortList(string sourceString)
{
var list = new List<HostAndPortDto>();
if (!string.IsNullOrWhiteSpace(sourceString))
{
var sourceList = sourceString.Split(',').ToList();
foreach (var source in sourceList)
{
var current = source.Split(':');
if (current != null && current.Length == 2)
{
var hostAndPort = new HostAndPortDto();
hostAndPort.Host = current[0];
hostAndPort.Port = int.Parse(current[1]);
list.Add(hostAndPort);
}
}
}
return list;
}
}
}

26
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationModule.cs

@ -0,0 +1,26 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.ApiGateway
{
[DependsOn(
typeof(ApiGatewayDomainModule),
typeof(ApiGatewayApplicationContractsModule),
typeof(AbpAutoMapperModule)
)]
public class ApiGatewayApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.Configurators.Add(ctx =>
{
var mapperProfile = ctx.ServiceProvider.GetService<ApiGatewayApplicationAutoMapperProfile>();
ctx.MapperConfiguration.AddProfile(mapperProfile);
});
});
}
}
}

13
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/ApiGatewayApplicationServiceBase.cs

@ -0,0 +1,13 @@
using LINGYUN.ApiGateway.Localization;
using Volo.Abp.Application.Services;
namespace LINGYUN.ApiGateway
{
public class ApiGatewayApplicationServiceBase : ApplicationService
{
protected ApiGatewayApplicationServiceBase()
{
LocalizationResource = typeof(ApiGatewayResource);
}
}
}

38
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/AggregateReRouteAppService.cs

@ -0,0 +1,38 @@
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
[Authorize(ApiGatewayPermissions.AggregateRoute.Default)]
public class AggregateReRouteAppService : ApiGatewayApplicationServiceBase, IAggregateReRouteAppService
{
private readonly IAggregateReRouteRepository _aggregateReRouteRepository;
public AggregateReRouteAppService(
IAggregateReRouteRepository aggregateReRouteRepository)
{
_aggregateReRouteRepository = aggregateReRouteRepository;
}
[Authorize(ApiGatewayPermissions.AggregateRoute.Export)]
public async Task<ListResultDto<AggregateReRouteDto>> GetAsync(AggregateRouteGetByAppIdInputDto aggregateRouteGetByAppId)
{
var reroutes = await _aggregateReRouteRepository.GetByAppIdAsync(aggregateRouteGetByAppId.AppId);
return new ListResultDto<AggregateReRouteDto>(ObjectMapper.Map<List<AggregateReRoute>, List<AggregateReRouteDto>>(reroutes));
}
public async Task<PagedResultDto<AggregateReRouteDto>> GetPagedListAsync(AggregateRouteGetByPagedInputDto aggregateRouteGetByPaged)
{
var reroutesTuple = await _aggregateReRouteRepository
.GetPagedListAsync(aggregateRouteGetByPaged.AppId, aggregateRouteGetByPaged.Filter,
aggregateRouteGetByPaged.Sorting, aggregateRouteGetByPaged.SkipCount,
aggregateRouteGetByPaged.MaxResultCount);
return new PagedResultDto<AggregateReRouteDto>(reroutesTuple.total,
ObjectMapper.Map<List<AggregateReRoute>, List<AggregateReRouteDto>>(reroutesTuple.routes));
}
}
}

25
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/DynamicReRouteAppService.cs

@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
[Authorize(ApiGatewayPermissions.DynamicRoute.Default)]
public class DynamicReRouteAppService : ApiGatewayApplicationServiceBase, IDynamicReRouteAppService
{
private readonly IDynamicReRouteRepository _dynamicReRouteRepository;
public DynamicReRouteAppService(IDynamicReRouteRepository dynamicReRouteRepository)
{
_dynamicReRouteRepository = dynamicReRouteRepository;
}
[Authorize(ApiGatewayPermissions.DynamicRoute.Export)]
public async Task<ListResultDto<DynamicReRouteDto>> GetAsync(DynamicRouteGetByAppIdInputDto dynamicRouteGetByAppId)
{
var dynamicReRoutes = await _dynamicReRouteRepository.GetByAppIdAsync(dynamicRouteGetByAppId.AppId);
return new ListResultDto<DynamicReRouteDto>(ObjectMapper.Map<List<DynamicReRoute>, List<DynamicReRouteDto>>(dynamicReRoutes));
}
}
}

127
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/GlobalConfigurationAppService.cs

@ -0,0 +1,127 @@
using DotNetCore.CAP;
using LINGYUN.ApiGateway.EventBus;
using LINGYUN.ApiGateway.Snowflake;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
[Authorize(ApiGatewayPermissions.Global.Default)]
public class GlobalConfigurationAppService : ApiGatewayApplicationServiceBase, IGlobalConfigurationAppService
{
private readonly IRouteGroupChecker _routeGroupChecker;
private readonly IGlobalConfigRepository _globalConfigRepository;
private readonly ISnowflakeIdGenerator _snowflakeIdGenerator;
private readonly ICapPublisher _eventPublisher;
public GlobalConfigurationAppService(
ICapPublisher eventPublisher,
IRouteGroupChecker routeGroupChecker,
ISnowflakeIdGenerator snowflakeIdGenerator,
IGlobalConfigRepository globalConfigRepository
)
{
_eventPublisher = eventPublisher;
_routeGroupChecker = routeGroupChecker;
_snowflakeIdGenerator = snowflakeIdGenerator;
_globalConfigRepository = globalConfigRepository;
}
[Authorize(ApiGatewayPermissions.Global.Export)]
public virtual async Task<GlobalConfigurationDto> GetAsync(GlobalGetByAppIdInputDto globalGetByAppId)
{
await _routeGroupChecker.CheckActiveAsync(globalGetByAppId.AppId);
var globalConfig = await _globalConfigRepository.GetByAppIdAsync(globalGetByAppId.AppId);
var globalConfigDto = ObjectMapper.Map<GlobalConfiguration, GlobalConfigurationDto>(globalConfig);
return globalConfigDto;
}
[Authorize(ApiGatewayPermissions.Global.Create)]
public virtual async Task<GlobalConfigurationDto> CreateAsync(GlobalCreateDto globalCreateDto)
{
await _routeGroupChecker.CheckActiveAsync(globalCreateDto.AppId);
var globalConfiguration = new GlobalConfiguration(_snowflakeIdGenerator.NextId(),
globalCreateDto.BaseUrl, globalCreateDto.AppId);
globalConfiguration.RequestIdKey = globalCreateDto.RequestIdKey;
globalConfiguration.DownstreamScheme = globalCreateDto.DownstreamScheme;
globalConfiguration.DownstreamHttpVersion = globalCreateDto.DownstreamHttpVersion;
ApplyGlobalConfigurationOptions(globalConfiguration, globalCreateDto);
globalConfiguration = await _globalConfigRepository.InsertAsync(globalConfiguration, true);
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("Global", "Create"));
return ObjectMapper.Map<GlobalConfiguration, GlobalConfigurationDto>(globalConfiguration);
}
[Authorize(ApiGatewayPermissions.Global.Update)]
public async Task<GlobalConfigurationDto> UpdateAsync(GlobalUpdateDto globalUpdateDto)
{
var globalConfiguration = await _globalConfigRepository.GetByItemIdAsync(globalUpdateDto.ItemId);
globalConfiguration.BaseUrl = globalUpdateDto.BaseUrl;
globalConfiguration.RequestIdKey = globalUpdateDto.RequestIdKey;
globalConfiguration.DownstreamScheme = globalUpdateDto.DownstreamScheme;
globalConfiguration.DownstreamHttpVersion = globalUpdateDto.DownstreamHttpVersion;
ApplyGlobalConfigurationOptions(globalConfiguration, globalUpdateDto);
globalConfiguration = await _globalConfigRepository.UpdateAsync(globalConfiguration, true);
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("Global", "Modify"));
return ObjectMapper.Map<GlobalConfiguration, GlobalConfigurationDto>(globalConfiguration);
}
public virtual async Task<PagedResultDto<GlobalConfigurationDto>> GetAsync(GlobalGetByPagedInputDto globalGetPaged)
{
var globalsTupe = await _globalConfigRepository.GetPagedListAsync(globalGetPaged.Filter, globalGetPaged.Sorting,
globalGetPaged.SkipCount, globalGetPaged.MaxResultCount);
var globals = ObjectMapper.Map<List<GlobalConfiguration>, List<GlobalConfigurationDto>>(globalsTupe.Globals);
return new PagedResultDto<GlobalConfigurationDto>(globalsTupe.TotalCount, globals);
}
[Authorize(ApiGatewayPermissions.Global.Delete)]
public virtual async Task DeleteAsync(GlobalGetByAppIdInputDto globalGetByAppId)
{
var globalConfiguration = await _globalConfigRepository.GetByAppIdAsync(globalGetByAppId.AppId);
await _globalConfigRepository.DeleteAsync(globalConfiguration);
}
private void ApplyGlobalConfigurationOptions(GlobalConfiguration globalConfiguration, GlobalConfigurationDtoBase configurationDto)
{
globalConfiguration.ServiceDiscoveryProvider.Type = configurationDto.ServiceDiscoveryProvider.Type;
globalConfiguration.ServiceDiscoveryProvider.ConfigurationKey = configurationDto.ServiceDiscoveryProvider.ConfigurationKey;
globalConfiguration.ServiceDiscoveryProvider.Namespace = configurationDto.ServiceDiscoveryProvider.Namespace;
globalConfiguration.ServiceDiscoveryProvider.PollingInterval = configurationDto.ServiceDiscoveryProvider.PollingInterval;
globalConfiguration.ServiceDiscoveryProvider.Scheme = configurationDto.ServiceDiscoveryProvider.Scheme;
globalConfiguration.ServiceDiscoveryProvider.Token = configurationDto.ServiceDiscoveryProvider.Token;
globalConfiguration.ServiceDiscoveryProvider
.BindServiceRegister(configurationDto.ServiceDiscoveryProvider.Host, configurationDto.ServiceDiscoveryProvider.Port);
globalConfiguration.HttpHandlerOptions.ApplyAllowAutoRedirect(configurationDto.HttpHandlerOptions.AllowAutoRedirect);
globalConfiguration.HttpHandlerOptions.ApplyCookieContainer(configurationDto.HttpHandlerOptions.UseCookieContainer);
globalConfiguration.HttpHandlerOptions.ApplyHttpProxy(configurationDto.HttpHandlerOptions.UseProxy);
globalConfiguration.HttpHandlerOptions.ApplyHttpTracing(configurationDto.HttpHandlerOptions.UseTracing);
globalConfiguration.HttpHandlerOptions.SetMaxConnections(configurationDto.HttpHandlerOptions.MaxConnectionsPerServer);
globalConfiguration.QoSOptions.ApplyQosOptions(configurationDto.QoSOptions.ExceptionsAllowedBeforeBreaking, configurationDto.QoSOptions.DurationOfBreak,
configurationDto.QoSOptions.TimeoutValue);
globalConfiguration.RateLimitOptions.SetLimitHeadersStatus(configurationDto.RateLimitOptions.DisableRateLimitHeaders);
globalConfiguration.RateLimitOptions.ApplyRateLimitOptions(configurationDto.RateLimitOptions.ClientIdHeader, configurationDto.RateLimitOptions.QuotaExceededMessage,
configurationDto.RateLimitOptions.HttpStatusCode);
globalConfiguration.LoadBalancerOptions.ApplyLoadBalancerOptions(configurationDto.LoadBalancerOptions.Type, configurationDto.LoadBalancerOptions.Key,
configurationDto.LoadBalancerOptions.Expiry);
}
}
}

166
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/ReRouteAppService.cs

@ -0,0 +1,166 @@
using DotNetCore.CAP;
using LINGYUN.ApiGateway.EventBus;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.ApiGateway.Ocelot
{
[Authorize(ApiGatewayPermissions.Route.Default)]
public class ReRouteAppService : ApiGatewayApplicationServiceBase, IReRouteAppService
{
private readonly IRouteGroupChecker _routeGroupChecker;
private readonly IReRouteRepository _reRouteRepository;
private readonly ICapPublisher _eventPublisher;
public ReRouteAppService(
ICapPublisher eventPublisher,
IRouteGroupChecker routeGroupChecker,
IReRouteRepository reRouteRepository
)
{
_eventPublisher = eventPublisher;
_routeGroupChecker = routeGroupChecker;
_reRouteRepository = reRouteRepository;
}
[Authorize(ApiGatewayPermissions.Route.Create)]
public async Task<ReRouteDto> CreateAsync(ReRouteCreateDto routeCreateDto)
{
var reRoute = ObjectMapper.Map<ReRouteCreateDto, ReRoute>(routeCreateDto);
ApplyReRouteOptions(reRoute, routeCreateDto);
reRoute = await _reRouteRepository.InsertAsync(reRoute, true);
var reRouteDto = ObjectMapper.Map<ReRoute, ReRouteDto>(reRoute);
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("ReRoute", "Create"));
return reRouteDto;
}
[Authorize(ApiGatewayPermissions.Route.Update)]
public async Task<ReRouteDto> UpdateAsync(ReRouteUpdateDto routeUpdateDto)
{
var reRoute = await _reRouteRepository.GetByReRouteIdAsync(long.Parse(routeUpdateDto.ReRouteId));
reRoute.DangerousAcceptAnyServerCertificateValidator = routeUpdateDto.DangerousAcceptAnyServerCertificateValidator;
reRoute.DownstreamScheme = routeUpdateDto.DownstreamScheme;
reRoute.Key = routeUpdateDto.Key;
reRoute.Priority = routeUpdateDto.Priority;
reRoute.RequestIdKey = routeUpdateDto.RequestIdKey;
reRoute.ReRouteIsCaseSensitive = routeUpdateDto.ReRouteIsCaseSensitive;
reRoute.ServiceName = routeUpdateDto.ServiceName;
reRoute.ServiceNamespace = routeUpdateDto.ServiceNamespace;
reRoute.Timeout = routeUpdateDto.Timeout;
reRoute.UpstreamHost = routeUpdateDto.UpstreamHost;
reRoute.DownstreamHttpVersion = routeUpdateDto.DownstreamHttpVersion;
reRoute.SetDownstreamHeader(routeUpdateDto.DownstreamHeaderTransform);
reRoute.SetQueriesParamter(routeUpdateDto.AddQueriesToRequest);
reRoute.SetRequestClaims(routeUpdateDto.AddClaimsToRequest);
reRoute.SetRequestHeader(routeUpdateDto.AddHeadersToRequest);
reRoute.SetRouteClaims(routeUpdateDto.RouteClaimsRequirement);
reRoute.SetUpstreamHeader(routeUpdateDto.UpstreamHeaderTransform);
reRoute.SetChangeDownstreamPath(routeUpdateDto.ChangeDownstreamPathTemplate);
reRoute.SetDelegatingHandler(routeUpdateDto.DelegatingHandlers);
ApplyReRouteOptions(reRoute, routeUpdateDto);
reRoute = await _reRouteRepository.UpdateAsync(reRoute, true);
var reRouteDto = ObjectMapper.Map<ReRoute, ReRouteDto>(reRoute);
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("ReRoute", "Modify"));
return reRouteDto;
}
public async Task<ReRouteDto> GetAsync(ReRouteGetByIdInputDto routeGetById)
{
var reRoute = await _reRouteRepository.GetByReRouteIdAsync(routeGetById.RouteId);
return ObjectMapper.Map<ReRoute, ReRouteDto>(reRoute);
}
public async Task<ReRouteDto> GetByRouteNameAsync(ReRouteGetByNameInputDto routeGetByName)
{
var reRoute = await _reRouteRepository.GetByNameAsync(routeGetByName.RouteName);
return ObjectMapper.Map<ReRoute, ReRouteDto>(reRoute);
}
[Authorize(ApiGatewayPermissions.Route.Export)]
public async Task<ListResultDto<ReRouteDto>> GetAsync(ReRouteGetByAppIdInputDto routeGetByAppId)
{
await _routeGroupChecker.CheckActiveAsync(routeGetByAppId.AppId);
var routes = await _reRouteRepository.GetByAppIdAsync(routeGetByAppId.AppId);
return new ListResultDto<ReRouteDto>(ObjectMapper.Map<List<ReRoute>, List<ReRouteDto>>(routes));
}
public async Task<PagedResultDto<ReRouteDto>> GetPagedListAsync(ReRouteGetByPagedInputDto routeGetByPaged)
{
await _routeGroupChecker.CheckActiveAsync(routeGetByPaged.AppId);
var reroutesTuple = await _reRouteRepository
.GetPagedListAsync(routeGetByPaged.AppId, routeGetByPaged.Filter, routeGetByPaged.Sorting,
routeGetByPaged.SkipCount, routeGetByPaged.MaxResultCount);
return new PagedResultDto<ReRouteDto>(reroutesTuple.total, ObjectMapper.Map<List<ReRoute>, List<ReRouteDto>>(reroutesTuple.routes));
}
[Authorize(ApiGatewayPermissions.Route.Delete)]
public async Task DeleteAsync(ReRouteGetByIdInputDto routeGetById)
{
await _reRouteRepository.DeleteAsync(x => x.ReRouteId.Equals(routeGetById.RouteId));
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("ReRoute", "Delete"));
}
[Authorize(ApiGatewayPermissions.Route.Delete)]
public async Task RemoveAsync(ReRouteGetByAppIdInputDto routeGetByAppId)
{
await _routeGroupChecker.CheckActiveAsync(routeGetByAppId.AppId);
await _reRouteRepository.DeleteAsync(x => x.AppId.Equals(routeGetByAppId.AppId));
await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("ReRoute", "Clean"));
}
protected virtual void ApplyReRouteOptions(ReRoute reRoute, ReRouteDtoBase routeDto)
{
var downHostPorts = string.Empty;
routeDto.DownstreamHostAndPorts.ForEach(hp => downHostPorts += hp.Host + ":" + hp.Port + ",");
reRoute.SetDownstream(routeDto.DownstreamPathTemplate, downHostPorts, routeDto.DownstreamHttpMethod);
var upHttpMethods = string.Empty;
routeDto.UpstreamHttpMethod.ForEach(hm => upHttpMethods += hm + ",");
reRoute.SetUpstream(routeDto.UpstreamPathTemplate, upHttpMethods);
reRoute.AuthenticationOptions.ApplyAuthOptions(routeDto.AuthenticationOptions.AuthenticationProviderKey, routeDto.AuthenticationOptions.AllowedScopes);
reRoute.CacheOptions.ApplyCacheOption(routeDto.FileCacheOptions.TtlSeconds, routeDto.FileCacheOptions.Region);
reRoute.HttpHandlerOptions.ApplyAllowAutoRedirect(routeDto.HttpHandlerOptions.AllowAutoRedirect);
reRoute.HttpHandlerOptions.ApplyCookieContainer(routeDto.HttpHandlerOptions.UseCookieContainer);
reRoute.HttpHandlerOptions.ApplyHttpProxy(routeDto.HttpHandlerOptions.UseProxy);
reRoute.HttpHandlerOptions.ApplyHttpTracing(routeDto.HttpHandlerOptions.UseTracing);
reRoute.HttpHandlerOptions.SetMaxConnections(routeDto.HttpHandlerOptions.MaxConnectionsPerServer);
reRoute.LoadBalancerOptions.ApplyLoadBalancerOptions(routeDto.LoadBalancerOptions.Type, routeDto.LoadBalancerOptions.Key, routeDto.LoadBalancerOptions.Expiry);
reRoute.QoSOptions.ApplyQosOptions(routeDto.QoSOptions.ExceptionsAllowedBeforeBreaking, routeDto.QoSOptions.DurationOfBreak, routeDto.QoSOptions.TimeoutValue);
reRoute.RateLimitOptions.ApplyRateLimit(routeDto.RateLimitOptions.EnableRateLimiting);
reRoute.RateLimitOptions.SetPeriodTimespan(routeDto.RateLimitOptions.Period, routeDto.RateLimitOptions.PeriodTimespan, routeDto.RateLimitOptions.Limit);
reRoute.RateLimitOptions.SetClientWhileList(routeDto.RateLimitOptions.ClientWhitelist);
reRoute.SecurityOptions.SetAllowIpList(routeDto.SecurityOptions.IPAllowedList);
reRoute.SecurityOptions.SetBlockIpList(routeDto.SecurityOptions.IPBlockedList);
}
}
}

89
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/RouteGroupAppService.cs

@ -0,0 +1,89 @@
using LINGYUN.ApiGateway.Data.Filter;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
namespace LINGYUN.ApiGateway.Ocelot
{
[Authorize(ApiGatewayPermissions.RouteGroup.Default)]
public class RouteGroupAppService : ApiGatewayApplicationServiceBase, IRouteGroupAppService
{
private IDataFilter _dataFilter;
protected IDataFilter DataFilter => LazyGetRequiredService(ref _dataFilter);
protected IRouteGroupRepository RouterRepository { get; }
public RouteGroupAppService(
IRouteGroupRepository routerRepository)
{
RouterRepository = routerRepository;
}
[Authorize(ApiGatewayPermissions.RouteGroup.Create)]
public virtual async Task<RouteGroupDto> CreateAsync(RouteGroupCreateDto routerCreateDto)
{
var router = new RouteGroup(routerCreateDto.AppId, routerCreateDto.AppName, routerCreateDto.AppIpAddress);
router.Name = routerCreateDto.Name;
router.IsActive = routerCreateDto.IsActive;
router.Description = routerCreateDto.Description;
router = await RouterRepository.InsertAsync(router, true);
return ObjectMapper.Map<RouteGroup, RouteGroupDto>(router);
}
public virtual async Task<RouteGroupDto> GetAsync(RouteGroupGetByAppIdInputDto routerGetByAppId)
{
using (DataFilter.Disable<IActivation>())
{
var router = await RouterRepository.GetByAppIdAsync(routerGetByAppId.AppId);
return ObjectMapper.Map<RouteGroup, RouteGroupDto>(router);
}
}
public virtual async Task<ListResultDto<RouteGroupAppIdsDto>> GetActivedAsync()
{
var appIdsDto = new List<RouteGroupAppIdsDto>();
var appKeys = await RouterRepository.GetActivedAppsAsync();
foreach(var app in appKeys)
{
appIdsDto.Add(new RouteGroupAppIdsDto(app.AppId, app.AppName));
}
return new ListResultDto<RouteGroupAppIdsDto>(appIdsDto);
}
public virtual async Task<PagedResultDto<RouteGroupDto>> GetAsync(RouteGroupGetByPagedInputDto routerGetByPagedInput)
{
using (DataFilter.Disable<IActivation>())
{
var routerTupes = await RouterRepository.GetPagedListAsync(routerGetByPagedInput.Filter,
routerGetByPagedInput.Sorting, routerGetByPagedInput.SkipCount, routerGetByPagedInput.MaxResultCount);
var routers = ObjectMapper.Map<List<RouteGroup>, List<RouteGroupDto>>(routerTupes.Routers);
return new PagedResultDto<RouteGroupDto>(routerTupes.TotalCount, routers);
}
}
[Authorize(ApiGatewayPermissions.RouteGroup.Update)]
public virtual async Task<RouteGroupDto> UpdateAsync(RouteGroupUpdateDto routerUpdateDto)
{
var router = await RouterRepository.GetByAppIdAsync(routerUpdateDto.AppId);
router.Name = routerUpdateDto.Name;
router.IsActive = routerUpdateDto.IsActive;
router.Description = routerUpdateDto.Description;
return ObjectMapper.Map<RouteGroup, RouteGroupDto>(router);
}
[Authorize(ApiGatewayPermissions.RouteGroup.Delete)]
public virtual async Task DeleteAsync(RouteGroupGetByAppIdInputDto routerGetByAppId)
{
var router = await RouterRepository.GetByAppIdAsync(routerGetByAppId.AppId);
await RouterRepository.DeleteAsync(router);
}
}
}

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.Contracts.pdb

Binary file not shown.

2005
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.deps.json

File diff suppressed because it is too large

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.pdb

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.Shared.pdb

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/bin/Debug/netstandard2.0/LINGYUN.ApiGateway.Domain.pdb

Binary file not shown.

23
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.AssemblyInfo.cs

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LINGYUN.ApiGateway.Application")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LINGYUN.ApiGateway.Application")]
[assembly: System.Reflection.AssemblyTitleAttribute("LINGYUN.ApiGateway.Application")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.AssemblyInfoInputs.cache

@ -0,0 +1 @@
465d0608383f2495a00b4af82da492ee6d2fb5d3

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.assets.cache

Binary file not shown.

0
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csproj.CopyComplete

30
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csproj.FileListAbsolute.txt

@ -0,0 +1,30 @@
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.deps.json
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.csproj.CopyComplete
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.dll
D:\Projects\MicroService\CRM\Multicolin.MicroService\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.deps.json
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.Contracts.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\bin\Debug\netstandard2.0\LINGYUN.ApiGateway.Domain.Shared.pdb
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.AssemblyInfo.cs
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.csproj.CopyComplete
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\apigateway\LINGYUN.ApiGateway.Application\obj\Debug\netstandard2.0\LINGYUN.ApiGateway.Application.pdb

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.csprojAssemblyReference.cache

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.dll

Binary file not shown.

BIN
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/Debug/netstandard2.0/LINGYUN.ApiGateway.Application.pdb

Binary file not shown.

5
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/obj/LINGYUN.ApiGateway.Application.csproj.nuget.cache

@ -0,0 +1,5 @@
{
"version": 1,
"dgSpecHash": "ANJ7xVyFaVazsZHWVpZIpi8DZHZdDOaYYtXhmUiPEEJS4/HmM7N+Cr+6Nii0xQ1JfGMsr/0E3+OWQ6MQAHK+nA==",
"success": true
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save