-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
- Loading branch information
Showing
17 changed files
with
238 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "API", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}", | ||
"args": [ | ||
"serve" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
{{ define "members" }} | ||
{{/* . is a apiType */}} | ||
{{- range .GetMembers -}} | ||
{{/* . is a apiMember */}} | ||
{{- if not .Hidden }} | ||
<tr><td><code>{{ .FieldName }}</code> | ||
{{- if not .IsOptional }} <B>[Required]</B>{{- end -}} | ||
<br/> | ||
{{/* Link for type reference */}} | ||
{{- with .GetType -}} | ||
{{- if .Link -}} | ||
<a href="{{ .Link }}"><code>{{ .DisplayName }}</code></a> | ||
{{- define "comment" -}} | ||
{{- $comment := "" -}} | ||
{{- range . -}} | ||
{{- if . -}} | ||
{{- if not (eq (index . 0) '+') -}} | ||
{{- if $comment -}} | ||
{{- $comment = print $comment " " . -}} | ||
{{- else -}} | ||
<code>{{ .DisplayName }}</code> | ||
{{- $comment = . -}} | ||
{{- end -}} | ||
{{- end }} | ||
</td> | ||
<td> | ||
{{- if .IsInline -}} | ||
(Members of <code>{{ .FieldName }}</code> are embedded into this type.) | ||
{{- end }} | ||
{{ if .GetComment -}} | ||
{{ .GetComment }} | ||
{{- else -}} | ||
<span class="text-muted">No description provided.</span> | ||
{{- end }} | ||
{{- if and (eq (.GetType.Name.Name) "ObjectMeta") -}} | ||
Refer to the Kubernetes API documentation for the fields of the <code>metadata</code> field. | ||
{{- end -}} | ||
</td> | ||
</tr> | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- if $comment -}} | ||
<p>{{ $comment }}</p> | ||
{{- else -}} | ||
*No description provided.* | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "typ" -}} | ||
{{- if .Link -}} | ||
[`{{ .DisplayName }}`]({{ .Link }}) | ||
{{- else -}} | ||
`{{ .DisplayName }}` | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "members" }} | ||
{{- range .GetMembers }} | ||
{{- if not .Hidden }} | ||
{{- $name := .FieldName }} | ||
{{- $optional := .IsOptional }} | ||
{{- $type := .GetType }} | ||
{{- $inline := .IsInline }} | ||
{{- $comment := .GetComment }} | ||
| `{{ $name }}` | {{ template "typ" $type }} | {{ if not $optional }}:white_check_mark:{{ end }} | {{ template "comment" .CommentLines }} | | ||
{{- end }} | ||
{{- end }} | ||
{{ end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,33 @@ | ||
{{ define "type" }} | ||
|
||
{{- define "type" }} | ||
## `{{ .Name.Name }}` {#{{ .Anchor }}} | ||
|
||
{{ if eq .Kind "Alias" -}} | ||
(Alias of `{{ .Underlying }}`) | ||
{{ end }} | ||
{{- if eq .Kind "Alias" }} | ||
|
||
(Alias of `{{ .Underlying }}`) | ||
{{- end }} | ||
{{- with .References }} | ||
|
||
**Appears in:** | ||
{{ range . }} | ||
{{ if or .Referenced .IsExported -}} | ||
{{ range . }} | ||
{{- if or .Referenced .IsExported }} | ||
- [{{ .DisplayName }}]({{ .Link }}) | ||
{{ end -}} | ||
{{- end -}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .GetComment }} | ||
|
||
{{ if .GetComment -}} | ||
{{ .GetComment }} | ||
{{ end }} | ||
{{ if .GetMembers -}} | ||
<table class="table"> | ||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead> | ||
<tbody> | ||
{{/* . is a apiType */}} | ||
{{- if .IsExported -}} | ||
{{/* Add apiVersion and kind rows if deemed necessary */}} | ||
<tr><td><code>apiVersion</code><br/>string</td><td><code>{{- .APIGroup -}}</code></td></tr> | ||
<tr><td><code>kind</code><br/>string</td><td><code>{{- .Name.Name -}}</code></td></tr> | ||
{{ end -}} | ||
{{- end }} | ||
{{- if .GetMembers }} | ||
|
||
{{/* The actual list of members is in the following template */}} | ||
{{- template "members" . -}} | ||
</tbody> | ||
</table> | ||
{{- end -}} | ||
{{- end -}} | ||
| Field | Type | Required | Description | | ||
|---|---|---|---| | ||
{{- /* . is a apiType */}} | ||
{{- if .IsExported }} | ||
{{- /* Add apiVersion and kind rows if deemed necessary */}} | ||
| `apiVersion` | `string` | :white_check_mark: | `{{- .APIGroup -}}` | | ||
| `kind` | `string` | :white_check_mark: | `{{- .Name.Name -}}` | | ||
{{- end }} | ||
{{- /* The actual list of members is in the following template */}} | ||
{{- template "members" . }} | ||
{{- end }} | ||
{{ end }} |
Oops, something went wrong.