Skip to content

Conversation

piksel
Copy link
Member

@piksel piksel commented Mar 6, 2021

Adds a CLI command that outputs configuration documentation for a service. This can be used to automate configuration field documentation for services.
Currently it supports terminal and markdown output.

Terminal output

image

Markdown output

Show

Config fields

Auth

SMTP authentication method
Default: Unknown
Possible values: None, Plain, CRAMMD5, Unknown, OAuth2

Encryption

Encryption method
Default: Auto
Possible values: None, ExplicitTLS, ImplicitTLS, Auto

FromAddress

e-mail address that the mail are sent from
Required
Aliases: from

FromName

name of the sender
Default: empty

Host

SMTP server hostname or IP address
Required

Password

authentication password or hash
Default: empty

Port

SMTP server port, common ones are 25, 465, 587 or 2525
Default: 25

Subject

the subject of the sent mail
Default: Shoutrrr Notification
Aliases: title

ToAddresses

list of recipient e-mails separated by "," (comma)
Required
Aliases: to

UseHTML

whether the message being sent is in HTML
Default: No

UseStartTLS

attempt to use SMTP StartTLS encryption
Default: Yes

Username

authentication username
Default: empty

- combines serialization and print code paths
- splits huge formatter.go into scoped files
- adds "required" indicator to print
- adds support for u/int map values
# Conflicts:
#	pkg/format/config_props.go
#	pkg/format/field_info.go
#	pkg/format/format_colorize_nodes.go
#	pkg/format/node.go
@codecov
Copy link

codecov bot commented Mar 6, 2021

Codecov Report

Merging #145 (6e980b6) into main (b2cc2df) will decrease coverage by 4.18%.
The diff coverage is 1.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
- Coverage   68.67%   64.48%   -4.19%     
==========================================
  Files          76       79       +3     
  Lines        2279     2427     +148     
==========================================
  Hits         1565     1565              
- Misses        577      724     +147     
- Partials      137      138       +1     
Impacted Files Coverage Δ
pkg/format/field_info.go 69.04% <0.00%> (-3.46%) ⬇️
pkg/format/formatter.go 66.66% <0.00%> (ø)
pkg/format/render_markdown.go 0.00% <0.00%> (ø)
pkg/format/urlpart.go 0.00% <0.00%> (ø)
pkg/format/urlpart_string.go 0.00% <0.00%> (ø)
pkg/services/smtp/smtp_config.go 87.09% <ø> (ø)
pkg/format/render_console.go 38.57% <20.00%> (ø)
pkg/format/config_props.go 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2cc2df...6e980b6. Read the comment docs.

@piksel piksel force-pushed the feature/docs-command branch from cdc0c65 to 6e980b6 Compare May 14, 2021 16:43
@piksel piksel marked this pull request as ready for review May 14, 2021 16:46
@piksel piksel merged commit dfa552a into main May 14, 2021
@piksel piksel deleted the feature/docs-command branch May 14, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant