diff --git a/docs/hooks/links.py b/docs/hooks/links.py index 654179d..a44db49 100644 --- a/docs/hooks/links.py +++ b/docs/hooks/links.py @@ -4,5 +4,5 @@ def on_page_markdown(markdown: str, **kwargs): links = [el[0] for el in re.findall(r"((? ul { + display: flex !important; + align-items: stretch; + align-content: stretch; + flex-flow: row wrap; + gap: 0.5rem; + margin-left: 0 !important; +} + +.cards.cols-1 > ul > li { + flex-basis: 100%; +} + +.cards.cols-2 > ul > li { + flex-basis: calc(50% - 0.25rem); +} + +.cards.cols-3 > ul > li { + flex-basis: calc(33.3333333% - 0.3333333rem); +} + +.cards.cols-4 > ul > li { + flex-basis: calc(25% - 0.375rem); +} + +@media screen and (max-width: 980px) { + .cards.cols-2 > ul > li { flex-basis: 100%; } + .cards.cols-3 > ul > li { flex-basis: 100%; } + .cards.cols-4 > ul > li { flex-basis: 100%; } +} + +.cards > ul > li { + display: flex; + flex-direction: column; + margin: 0 !important; + box-sizing: border-box; + padding: 0.5rem; + border: .05rem solid var(--md-default-fg-color--lightest); + border-radius: .1rem; + margin: 0; + padding: .8rem; + transition: border .25s, box-shadow .25s; +} + +.cards > ul > li:hover { + border-color: #0000; + box-shadow: var(--md-shadow-z2); +} + +.cards > ul > li > * { + margin: 0.5em 0; +} + +.cards > ul > li > :first-child { + padding-top: 0; + margin-top: 0; +} + +.cards > ul > li > :last-child { + padding-bottom: 0; + margin-bottom: 0; +} + +.cards > ul > li > :nth-child(3) { + flex-grow: 100; +} diff --git a/docs/sources/assets/css/extra.css b/docs/sources/assets/css/extra.css index 04c2adc..21e16d8 100644 --- a/docs/sources/assets/css/extra.css +++ b/docs/sources/assets/css/extra.css @@ -3,6 +3,24 @@ --md-primary-fg-color--light: #547AA5; --md-primary-fg-color--dark: #22223B; - --md-accent-fg-color: #FED766; + --md-accent-fg-color: #CBAC52; --md-accent-fg-color--transparent: rgba(254, 215, 102, 0.1); } + +p { + hyphens: auto; + text-align: justify; +} + +@media screen and (max-width: 980px) { + .smallImg { + max-width: 20% !important; + } +} + +@media screen and (min-width: 981px) { + .smallImg { + max-width: 10% !important; + } +} + diff --git a/docs/sources/assets/img/logo-inv.png b/docs/sources/assets/img/logo-inv.png new file mode 100644 index 0000000..39fd426 Binary files /dev/null and b/docs/sources/assets/img/logo-inv.png differ diff --git a/docs/sources/examples/index.md b/docs/sources/examples/index.md index 4c61b64..ce9bb7c 100644 --- a/docs/sources/examples/index.md +++ b/docs/sources/examples/index.md @@ -1,3 +1,7 @@ +--- +title: Examples +--- + # Examples > To be developed diff --git a/docs/sources/index.md b/docs/sources/index.md index a0c42d7..ed76db4 100644 --- a/docs/sources/index.md +++ b/docs/sources/index.md @@ -5,6 +5,9 @@ hide: ["navigation"] # GoosyMock +![GoosyMock icon](assets/img/logo.png#only-light){ align=right .smallImg } +![GoosyMock icon](assets/img/logo-inv.png#only-dark){ align=right .smallImg } + **GoosyMock** is a configurable test service for mocking HTTP responses, featuring SSL support, dedicated administration API and custom payloads (binary files that can be served on particular routes). It's also prepared @@ -32,6 +35,6 @@ code from scratch. - [X] Running in rootless mode - [X] Kubernetes support - [X] Helm chart available - - [X] Image running as non-root - - [X] All settings can be configured via chart values - - [X] Support Ingress controllers + - [X] Rootless container image + - [X] All settings configurable via chart values + - [X] Support for Ingress controllers diff --git a/docs/sources/installation/binaries.md b/docs/sources/installation/binaries.md new file mode 100644 index 0000000..2be1ebc --- /dev/null +++ b/docs/sources/installation/binaries.md @@ -0,0 +1,63 @@ +--- +title: Binaries +--- + +# Running **GoosyMock** from binaries + +## Downloading pre-built binaries + +**GoosyMock** offers pre-build binaries for following operating systems and +architectures: + +| Operating system | OS codename | Architectures | +|-|-|-| +| Linux | `linux` | `amd64`, `386`, `arm`, `arm64`, `ppc64le` | +| Windows | `windows` | `amd64`, `386` | +| MacOS | `darwin` | `arm64` | + +Properly named binaries are attached as release assets and can be downloaded +from [*Releases* page on GitHub](https://github.com/Icikowski/GoosyMock/releases/latest). + +## Building binaries manually + +!!! info "Prerequisites" + - **Git** 2.34+ + - **Go** 1.19+ + - **Taskfile** 3.17+ + +### Cloning the repository + +=== "Clone via HTTPS" + + ```bash + git clone https://github.com/Icikowski/GoosyMock.git + ``` + +=== "Clone via SSH" + + ```bash + git clone git@github.com:Icikowski/GoosyMock.git + ``` + +### Building the sources + +!!! tip "Using _Taskfile_" + This project utilizes _[Taskfile](https://taskfile.dev)_ for build + automatization. If you are willing to use `task` command for building + binaries, please install _Taskfile_ as described in + [official documentation](https://taskfile.dev/installation). + +Binary will be built for current OS & architecture and placed in +`target/binaries` directory. + +=== "Building static binary" + + ```bash + task build:static + ``` + +=== "Building dynamic binary" + + ```bash + task build:dynamic + ``` diff --git a/docs/sources/installation/docker.md b/docs/sources/installation/docker.md new file mode 100644 index 0000000..abdb9da --- /dev/null +++ b/docs/sources/installation/docker.md @@ -0,0 +1,3 @@ +--- +title: Docker +--- diff --git a/docs/sources/installation/index.md b/docs/sources/installation/index.md index b6aa4f0..66fff2b 100644 --- a/docs/sources/installation/index.md +++ b/docs/sources/installation/index.md @@ -1,3 +1,33 @@ +--- +title: Installation +--- + # Installation Guide -> To be developed +
+ +- :material-file-multiple:{ .lg .middle } **Binaries** + + --- + + Download or build **GoosyMock** binaries for direct use and jump start the adventure. + + [:material-arrow-right: Binaries](binaries.md) + +- :material-docker:{ .lg .middle } **Docker container image** + + --- + + Start **GoosyMock** starting Docker container and jump right into the action. + + [:material-arrow-right: Docker](docker.md) + +- :material-kubernetes:{ .lg .middle } **Kubernetes (via Helm)** + + --- + + Deploy **GoosyMock** instance on your Kubernetes cluster and don't worry about maintenance. + + [:material-arrow-right: Kubernetes (via Helm)](kubernetes.md) + +
diff --git a/docs/sources/installation/kubernetes.md b/docs/sources/installation/kubernetes.md new file mode 100644 index 0000000..ad33575 --- /dev/null +++ b/docs/sources/installation/kubernetes.md @@ -0,0 +1,3 @@ +--- +title: Kubernetes (via Helm) +--- diff --git a/docs/sources/usage/admin/index.md b/docs/sources/usage/admin/index.md new file mode 100644 index 0000000..4191c14 --- /dev/null +++ b/docs/sources/usage/admin/index.md @@ -0,0 +1,45 @@ +--- +title: Admin API +--- + +# Admin API Guide + +
+ +- :simple-openapiinitiative:{ .lg .middle } **OpenAPI Specification** + + --- + + Check the OpenAPI Specification of **GoosyMock**'s Admin API. + + + [:material-arrow-right: OpenAPI Specification](https://elements-demo.stoplight.io/?spec=https://raw.githubusercontent.com/Icikowski/GoosyMock/main/api/spec_adminapi.yaml) + +
+ +
+ +- :material-list-status:{ .lg .middle } **Status** + + --- + + Check the documentation for `/` endpoint. + + [:material-arrow-right: Status](status.md) + +- :material-router:{ .lg .middle } **Routes** + + --- + + Check the documentation for `/routes` endpoint. + + [:material-arrow-right: Routes](routes.md) + +- :material-file-star:{ .lg .middle } **Payloads** + + --- + + Check the documentation for `/payloads` endpoint. + + [:material-arrow-right: Payloads](payloads.md) +
diff --git a/docs/sources/usage/admin/payloads.md b/docs/sources/usage/admin/payloads.md new file mode 100644 index 0000000..53d8811 --- /dev/null +++ b/docs/sources/usage/admin/payloads.md @@ -0,0 +1,3 @@ +--- +title: Payloads endpoint +--- diff --git a/docs/sources/usage/admin/routes.md b/docs/sources/usage/admin/routes.md new file mode 100644 index 0000000..65e2395 --- /dev/null +++ b/docs/sources/usage/admin/routes.md @@ -0,0 +1,3 @@ +--- +title: Routes endpoint +--- diff --git a/docs/sources/usage/admin/status.md b/docs/sources/usage/admin/status.md new file mode 100644 index 0000000..57b7364 --- /dev/null +++ b/docs/sources/usage/admin/status.md @@ -0,0 +1,3 @@ +--- +title: Status endpoint +--- diff --git a/docs/sources/usage/config/index.md b/docs/sources/usage/config/index.md new file mode 100644 index 0000000..3ae8896 --- /dev/null +++ b/docs/sources/usage/config/index.md @@ -0,0 +1,25 @@ +--- +title: Configuration +--- + +# Configuration Guide + +
+ +- :material-code-braces:{ .lg .middle } **Configuration variables** + + --- + + Learn about environment variables used for **GoosyMock**'s configuration. + + [:material-arrow-right: Configuration variables](vars.md) + +- :material-lock:{ .lg .middle } **TLS configuration** + + --- + + Deep dive into **GoosyMock**'s TLS & SSL configuration. + + [:material-arrow-right: TLS configuration](tls.md) + +
diff --git a/docs/sources/usage/config/tls.md b/docs/sources/usage/config/tls.md new file mode 100644 index 0000000..943199a --- /dev/null +++ b/docs/sources/usage/config/tls.md @@ -0,0 +1,3 @@ +--- +title: TLS configuration +--- diff --git a/docs/sources/usage/config/vars.md b/docs/sources/usage/config/vars.md new file mode 100644 index 0000000..9c7aead --- /dev/null +++ b/docs/sources/usage/config/vars.md @@ -0,0 +1,3 @@ +--- +title: Configuration variables +--- diff --git a/docs/sources/usage/health.md b/docs/sources/usage/health.md new file mode 100644 index 0000000..8f73292 --- /dev/null +++ b/docs/sources/usage/health.md @@ -0,0 +1,3 @@ +--- +title: Health probes +--- diff --git a/docs/sources/usage/index.md b/docs/sources/usage/index.md index 051ae9c..db32f47 100644 --- a/docs/sources/usage/index.md +++ b/docs/sources/usage/index.md @@ -1,3 +1,34 @@ +--- +title: Usage +--- + # Usage Guide -> To be developed +
+ +- :material-cog:{ .lg .middle } **Configuration** + + --- + + Learn about **GoosyMock**'s configuration options and instructions. + + [:material-arrow-right: Configuration](config/index.md) + +- :material-code-json:{ .lg .middle } **Admin API** + + --- + + Get familiar with **GoosyMock** management by declarative configuration and + administration endpoints. + + [:material-arrow-right: Docker](admin/index.md) + +- :material-cloud-check-outline:{ .lg .middle } **Liveness & readiness probes** + + --- + + Check how **GoosyMock** indicates it's health status. + + [:material-arrow-right: Liveness & readiness probes](health.md) + +