Skip to content

Commit

Permalink
Camouflage 0.1.7
Browse files Browse the repository at this point in the history
- Add Camouflage UI
  • Loading branch information
shubhendumadhukar committed May 9, 2021
1 parent f8757e3 commit 2d1b13e
Show file tree
Hide file tree
Showing 44 changed files with 2,835 additions and 644 deletions.
Binary file added docs/CamouflageUI-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/CamouflageUI-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/CamouflageUI-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/CamouflageUI-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/camouflage-ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Camouflage UI

Camouflage also provide a file explorer UI allowing you to work with your mocks. UI is powered by [OpusCapita/filemanager](https://github.com/OpusCapita/filemanager){target=\_blank}, which provides abilities to perform following actions on the available mocks:

- Upload mock files
- Download mock files
- Rename a mock folder to change stubbed API endpoint
- Update cert and key
- Download logs
- Download config yaml

Screenshots:
![CamouflageUI-1](CamouflageUI-1.png)
![CamouflageUI-2](CamouflageUI-2.png)
![CamouflageUI-3](CamouflageUI-3.png)
![CamouflageUI-4](CamouflageUI-4.png)
5 changes: 4 additions & 1 deletion docs/handlebars.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Handlebars help you add character to your response. Instead of sending a static response or writing some code to generate a dynamic response, you can now simply use handlebars and let Camouflage do the work for you.

!!! note

Though Camouflage does not provide any tools to help you create your mocks, there are numerous Handlerbar snippet extensions available in VS Code marketplace which should help speed up your mocks creation process.

## Custom Helpers

## randomValue
Expand Down Expand Up @@ -147,4 +151,3 @@ Explanation
3. Finally we put an if condition to check if we are at the last element of the array, we shouldn't append a comma at the end of our JSONObject, in order to get a valid JSON. If we are at any other element in the array, we'll add a comma to JSONObject.

Available inbuilt helpers are `if`, `unless`, `each`, `with`, `lookup` and `log`. More details are available at [Handlebars Documentation](https://handlebarsjs.com/guide/builtin-helpers.html){target=\_blank}

12 changes: 8 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ Camouflage is a service virtualization tool inspired by [namshi/mockserver](http

## Why did we create Camouflage if a similar tool already exists?

Well, the original tool has not been maintained for some time now. But more importantly, Camouflage simply borrows the idea from the original and though it does use some of the same logic and functions, majority of the code has been written from scratch.
Camouflage simply borrows the idea from the original and though it does use some of the same logic and functions, majority of the code has been written from scratch implementing a plethora of amazing new features.

1. The underlying codebase has been re-written using typescript.
1. The underlying codebase has been re-written using typescript providing a structured, strongly typed, modular codebase.
2. Some features from the original tool might be missing, or have been implemented differently. (import and eval have not been ported to Camouflage)
3. Camouflage introduces handlebars, which allows you to generate dynamic (more real) responses.
4. Using handlebars, you can generate random numbers, string, alphanumeric string, UUIDs and random dates.
4. Using handlebars, you can generate random numbers, strings, alphanumeric strings, UUIDs and random dates.
5. You can also extract information from request queries, path, body or headers and use them in your response.
6. You can use handlebars to carry out request matching for you. For example, return one response if a query param exists, return another if it doesn't.
7. And, we saved the best for last. Camouflage supports multiple protocols, i.e. HTTP, HTTPs, HTTP2 and gRPC!!
7. Camouflage supports multiple protocols, i.e. HTTP, HTTPs, HTTP2 and gRPC.
8. Camouflage provides inbuilt support for creating backups and restoring from backups in case something goes wrong.
9. Camouflage provides support for monitoring.

Head on over to the Getting Started page and set up your first Camouflage project.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ repo_url: https://github.com/fauxauldrich/camouflage
theme:
name: material
logo: camouflage.png
features:
- toc.integrate
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
Expand All @@ -29,6 +31,7 @@ nav:
- response-delays.md
- performance-mode.md
- mocking-gRPC.md
- camouflage-ui.md
- available-monitoring.md
- tests.md
- back-up-and-restore.md
Expand Down
Loading

0 comments on commit 2d1b13e

Please sign in to comment.