Skip to content

Commit

Permalink
chore: better man to markdown and missing openapi schema
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s committed Jun 10, 2024
1 parent d13a596 commit ce17b6e
Show file tree
Hide file tree
Showing 87 changed files with 1,898 additions and 1,810 deletions.
328 changes: 271 additions & 57 deletions Cargo.lock

Large diffs are not rendered by default.

33 changes: 32 additions & 1 deletion bin/nanocld/specs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4444,6 +4444,36 @@ components:
minimum: 0
Spec:
$ref: '#/components/schemas/Job'
LimitReq:
type: object
required:
- Burst
properties:
Burst:
type: integer
description: The burst size
minimum: 0
Delay:
type: integer
description: The delay to wait before retrying
nullable: true
minimum: 0
additionalProperties: false
LimitReqZone:
type: object
required:
- Size
- Rate
properties:
Size:
type: integer
description: The max size of the cache in megabytes
minimum: 0
Rate:
type: integer
description: The max number of request per second
minimum: 0
additionalProperties: false
LocalNodeState:
type: string
description: |-
Expand Down Expand Up @@ -5448,7 +5478,8 @@ components:
format: date-time
description: The created at date
IpAddress:
$ref: '#/components/schemas/ipnet.IpNet'
type: string
description: The ip address of the node
Endpoint:
type: string
description: Endpoint to connect to the node
Expand Down
4 changes: 3 additions & 1 deletion bin/nanocld/src/services/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ use nanocl_stubs::proxy::{
ResourceProxyRule, ProxyRuleHttp, ProxyHttpLocation, ProxySsl,
ProxyRuleStream, StreamTarget, ProxyStreamProtocol, UriTarget,
LocationTarget, HttpTarget, UrlRedirect, UpstreamTarget, ProxyRule,
UnixTarget, ProxySslConfig,
UnixTarget, ProxySslConfig, LimitReq, LimitReqZone,
};
use nanocl_stubs::statefile::{
Statefile, StatefileArg, StatefileArgKind, SubState, SubStateDef,
Expand Down Expand Up @@ -495,6 +495,8 @@ impl Modify for VersionModifier {
UpstreamTarget,
UnixTarget,
UriTarget,
LimitReq,
LimitReqZone,
// DnsRules
ResourceDnsRule,
DnsEntry,
Expand Down
1 change: 1 addition & 0 deletions crates/nanocl_stubs/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub struct Node {
/// The created at date
pub created_at: chrono::NaiveDateTime,
/// The ip address of the node
#[cfg_attr(feature = "utoipa", schema(value_type = String))]
pub ip_address: ipnet::IpNet,
/// Endpoint to connect to the node
pub endpoint: String,
Expand Down
32 changes: 16 additions & 16 deletions doc/man/nanocl-backup.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# NAME
---
title: Backup
sidebar_position: 2
---

backup - Backup the current state
# Backup

# SYNOPSIS
## SYNOPSIS

**backup** \[**-o**\|**\--output-dir**\] \[**-y**\|**\--yes**\]
\[**-h**\|**\--help**\]
**backup** \[**-o**\|**--output-dir**\] \[**-y**\|**--yes**\]
\[**-h**\|**--help**\]

# DESCRIPTION
## DESCRIPTION

Backup the current state

# OPTIONS
## OPTIONS

**-o**, **\--output-dir**=*OUTPUT_DIR*
**-o**, **--output-dir**=*OUTPUT_DIR*
Directory where to write the backup default to the current directory

: Directory where to write the backup default to the current directory
**-y**, **--yes**
Skip confirmation

**-y**, **\--yes**

: Skip confirmation

**-h**, **\--help**

: Print help
**-h**, **--help**
Print help
42 changes: 20 additions & 22 deletions doc/man/nanocl-cargo-create.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
# NAME
---
title: Cargo create
sidebar_position: 4
---

create - Create a new cargo
# Cargo create

# SYNOPSIS
## SYNOPSIS

**create** \[**-v**\|**\--volume**\] \[**-e**\|**\--env**\]
\[**-h**\|**\--help**\] \<*NAME*\> \<*IMAGE*\>
**create** \[**-v**\|**--volume**\] \[**-e**\|**--env**\]
\[**-h**\|**--help**\] \<*NAME*\> \<*IMAGE*\>

# DESCRIPTION
## DESCRIPTION

Create a new cargo

# OPTIONS
## OPTIONS

**-v**, **\--volume**=*VOLUMES*
**-v**, **--volume**=*VOLUMES*
Volumes of the cargo

: Volumes of the cargo
**-e**, **--env**=*ENV*
Environment variables of the cargo

**-e**, **\--env**=*ENV*
**-h**, **--help**
Print help

: Environment variables of the cargo
\<*NAME*\>
Name of the cargo

**-h**, **\--help**

: Print help

\<*NAME*\>

: Name of the cargo

\<*IMAGE*\>

: Image of the cargo
\<*IMAGE*\>
Image of the cargo
64 changes: 29 additions & 35 deletions doc/man/nanocl-cargo-exec.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
# NAME
---
title: Cargo exec
sidebar_position: 5
---

exec - Execute a command inside a cargo
# Cargo exec

# SYNOPSIS
## SYNOPSIS

**exec** \[**-t**\|**\--tty**\] \[**\--detach-keys**\] \[**-e **\]
\[**\--privileged**\] \[**-u **\] \[**-w**\|**\--workdir**\]
\[**-h**\|**\--help**\] \<*NAME*\> \[*COMMAND*\]
**exec** \[**-t**\|**--tty**\] \[**--detach-keys**\] \[**-e **\]
\[**--privileged**\] \[**-u **\] \[**-w**\|**--workdir**\]
\[**-h**\|**--help**\] \<*NAME*\> \[*COMMAND*\]

# DESCRIPTION
## DESCRIPTION

Execute a command inside a cargo

# OPTIONS
## OPTIONS

**-t**, **\--tty**
**-t**, **--tty**
Allocate a pseudo-TTY

: Allocate a pseudo-TTY
**--detach-keys**=*DETACH_KEYS*
Override the key sequence for detaching a container

**\--detach-keys**=*DETACH_KEYS*
**-e**=*ENV*
Set environment variables

: Override the key sequence for detaching a container
**--privileged**
Give extended privileges to the command

**-e**=*ENV*
**-u**=*USER*
Username or UID (format: "\<name\|uid\>\[:\<group\|gid\>\]")

: Set environment variables
**-w**, **--workdir**=*WORKING_DIR*
Working directory inside the container

**\--privileged**
**-h**, **--help**
Print help

: Give extended privileges to the command
\<*NAME*\>
Name of cargo to execute command

**-u**=*USER*

: Username or UID (format: \"\<name\|uid\>\[:\<group\|gid\>\]\")

**-w**, **\--workdir**=*WORKING_DIR*

: Working directory inside the container

**-h**, **\--help**

: Print help

\<*NAME*\>

: Name of cargo to execute command

\[*COMMAND*\]

: Command to execute
\[*COMMAND*\]
Command to execute
25 changes: 13 additions & 12 deletions doc/man/nanocl-cargo-history.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# NAME
---
title: Cargo history
sidebar_position: 6
---

history - List cargo history
# Cargo history

# SYNOPSIS
## SYNOPSIS

**history** \[**-h**\|**\--help**\] \<*NAME*\>
**history** \[**-h**\|**--help**\] \<*NAME*\>

# DESCRIPTION
## DESCRIPTION

List cargo history

# OPTIONS
## OPTIONS

**-h**, **\--help**
**-h**, **--help**
Print help

: Print help

\<*NAME*\>

: Name of cargo to browse history
\<*NAME*\>
Name of cargo to browse history
32 changes: 16 additions & 16 deletions doc/man/nanocl-cargo-inspect.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# NAME
---
title: Cargo inspect
sidebar_position: 7
---

inspect - Inspect a cargo by its name
# Cargo inspect

# SYNOPSIS
## SYNOPSIS

**inspect** \[**\--display**\] \[**-h**\|**\--help**\] \<*KEY*\>
**inspect** \[**--display**\] \[**-h**\|**--help**\] \<*KEY*\>

# DESCRIPTION
## DESCRIPTION

Inspect a cargo by its name

# OPTIONS
## OPTIONS

**\--display**=*DISPLAY*
**--display**=*DISPLAY*
Display format

: Display format\

\

\[*possible values: *yaml, toml, json\]

**-h**, **\--help**

: Print help

\<*KEY*\>
**-h**, **--help**
Print help

: Key or Name of the object to inspect
\<*KEY*\>
Key or Name of the object to inspect
42 changes: 20 additions & 22 deletions doc/man/nanocl-cargo-list.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
# NAME
---
title: Cargo list
sidebar_position: 8
---

list - List existing cargo
# Cargo list

# SYNOPSIS
## SYNOPSIS

**list** \[**-q**\|**\--quiet**\] \[**-l**\|**\--limit**\]
\[**-o**\|**\--offset**\] \[**\--filters**\] \[**-h**\|**\--help**\]
**list** \[**-q**\|**--quiet**\] \[**-l**\|**--limit**\]
\[**-o**\|**--offset**\] \[**--filters**\] \[**-h**\|**--help**\]

# DESCRIPTION
## DESCRIPTION

List existing cargo

# OPTIONS
## OPTIONS

**-q**, **\--quiet**
**-q**, **--quiet**
Only show keys

: Only show keys
**-l**, **--limit**=*LIMIT*
Limit the number of results default to 100

**-l**, **\--limit**=*LIMIT*
**-o**, **--offset**=*OFFSET*
Offset the results to navigate through the results

: Limit the number of results default to 100
**--filters**=*FILTERS*
Filters

**-o**, **\--offset**=*OFFSET*

: Offset the results to navigate through the results

**\--filters**=*FILTERS*

: Filters

**-h**, **\--help**

: Print help
**-h**, **--help**
Print help
Loading

0 comments on commit ce17b6e

Please sign in to comment.