Compare commits
114 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd019bc407 | |||
| febc2680f4 | |||
| caf2397349 | |||
| 172ca8712e | |||
| bda16bcbb5 | |||
| b5d069112f | |||
| f56393c84c | |||
| 55ef8e1733 | |||
| 075fc16ec9 | |||
| 0d6a13c1cf | |||
| e57939f858 | |||
| d45b1562fc | |||
| 7fe07f86a9 | |||
| 14c81a00a7 | |||
| 3eced64453 | |||
| c284d928fd | |||
| dd9da9452b | |||
| 11d5121954 | |||
| 66d622b474 | |||
| 47b2aabd9f | |||
| b91cf18b04 | |||
| 305b504ca1 | |||
| 7be2679b91 | |||
| 3c6e3ed914 | |||
| 02bc040e2a | |||
| 9f1f36215a | |||
| ff75f4bbcd | |||
| 5f40713e98 | |||
| cd5f7611a9 | |||
| b542711078 | |||
| 52dbc353e5 | |||
| 6bef0c3e5b | |||
| 4d705d78fb | |||
| 62d47ecfa7 | |||
| 32444ff82e | |||
| a5a7c05640 | |||
| bfb81e11b2 | |||
| fd4c83f9c0 | |||
| fe27c6396a | |||
| c89dde186a | |||
| 18a64de0de | |||
| 99c622b69f | |||
| 95e85e8b45 | |||
| 1a48c7bca5 | |||
| 5d21764ef1 | |||
| c7302f0e17 | |||
| fb1c8ec4fb | |||
| fe9462dac0 | |||
| d8453d1fb0 | |||
| 65c46a1e26 | |||
| f859b5961f | |||
| 25ddd65f25 | |||
| bcba6b2086 | |||
| 753b03861f | |||
| 80a45cd595 | |||
| 551c8ad441 | |||
| 3823b1bf44 | |||
| f777c78aad | |||
| bb693dbb97 | |||
| 7beda281e0 | |||
| 1143d2850b | |||
| 8900bd70a4 | |||
| 6db5f73bc0 | |||
| a163c11129 | |||
| 2b4d191271 | |||
| 417088c32b | |||
| 4fa5efa5b6 | |||
| a0bf51636c | |||
| 684edd7985 | |||
| 3acb20a40f | |||
| 0007c8696a | |||
| cf2baf3601 | |||
| e6b9f8e6e6 | |||
| 2eefc59cf7 | |||
| 98d8b8e8f2 | |||
| 1ad50ebcf8 | |||
| c483a1056f | |||
| 3b9f569310 | |||
| 843be7968b | |||
| d477d850ac | |||
| 8eb3229af7 | |||
| d89a208bbd | |||
| 0d28d6afcf | |||
| 7c42a9a7cd | |||
| 31339fb4d8 | |||
| c642e827f5 | |||
| a328239021 | |||
| 4ee60184bf | |||
| 161ad31577 | |||
| 7c5f4a95da | |||
| 4981acbf9d | |||
| 932d5c380f | |||
| f84d76badf | |||
| 6ee6e10621 | |||
| 127d38c076 | |||
| 0218dee76d | |||
| 67a1eab908 | |||
| c618ca33f8 | |||
| 6e7d912fa2 | |||
| b90d1958b2 | |||
| c187fbb735 | |||
| c3de4386ab | |||
| e20141043c | |||
| 11ec1a98d8 | |||
| 8788d473a5 | |||
| edc669b340 | |||
| 086835453b | |||
| 5d3c265ce9 | |||
| 8c633fd4b2 | |||
| a664edaed7 | |||
| e88773e289 | |||
| 5c2bfcc940 | |||
| aee513f786 | |||
| 6b99cfa196 |
0
.changes/0.2.4.md
Normal file → Executable file
0
.changes/0.2.4.md
Normal file → Executable file
0
.changes/header.tpl.md
Normal file → Executable file
0
.changes/header.tpl.md
Normal file → Executable file
1
.changes/unreleased/.gitkeep
Normal file → Executable file
1
.changes/unreleased/.gitkeep
Normal file → Executable file
@@ -0,0 +1 @@
|
|||||||
|
*.yaml
|
||||||
16
.changes/v0.10.0.md
Executable file
16
.changes/v0.10.0.md
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
## v0.10.0 - 2025-03-08
|
||||||
|
### Added
|
||||||
|
* Hooks: improved logging when executing
|
||||||
|
* User commands: adding SSH keys using config key `userSshPubKeys`
|
||||||
|
* directives: added support for fetching values using directive `%{externalSource:key}%`
|
||||||
|
### Changed
|
||||||
|
* Commands: if dir is not specified, run in config dir
|
||||||
|
* FileDirective: use the config directory if path is not absolute
|
||||||
|
* Host: changes to case of some keys
|
||||||
|
* Notifications: added external directive to sensitive keys
|
||||||
|
### Fixed
|
||||||
|
* LocalFetcher: return fetch error
|
||||||
|
* Lists: load file key before attempting to load from current file
|
||||||
|
* fix: host not in config file, but in ssh config, properly added to hosts struct
|
||||||
|
* SSH: password authentication bugs
|
||||||
|
* User commands: change user password works
|
||||||
8
.changes/v0.10.1.md
Executable file
8
.changes/v0.10.1.md
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
## v0.10.1 - 2025-03-11
|
||||||
|
### Added
|
||||||
|
* UserCommands: add ssh public keys when running locally
|
||||||
|
* UserCommands: add field CreateUserHome
|
||||||
|
### Changed
|
||||||
|
* UserCommands: create temp file when modifing password over SSH
|
||||||
|
* UserCommands: change field name
|
||||||
|
* Vault: keys are now referenced by `name`, and the actual data by `data`
|
||||||
6
.changes/v0.10.2.md
Executable file
6
.changes/v0.10.2.md
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
## v0.10.2 - 2025-03-19
|
||||||
|
### Added
|
||||||
|
* Notifications: http service added
|
||||||
|
* Variable support. Can be referenced with `%{var:nameOfVar}%` in select string fields.
|
||||||
|
### Changed
|
||||||
|
* vault: initialize vault before validating config
|
||||||
21
.changes/v0.11.0.md
Normal file
21
.changes/v0.11.0.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
## v0.11.0 - 2025-11-24
|
||||||
|
### Added
|
||||||
|
* feat: Package operation `versionCheck` supports regular expressions (see [regexp](https://pkg.go.dev/regexp) package for docs)
|
||||||
|
* Command lists: added `cmdLists.[name].notify` object
|
||||||
|
* Testing setup with Docker
|
||||||
|
* CLI: add global flag --hostsConfig that allows hosts to be dynamic in relation to the main config
|
||||||
|
* CLI: Exec subcommand `hosts`. See documentation for more details.
|
||||||
|
* CLI: added `exec hosts` subcommand `list`
|
||||||
|
* Add support for hosts in parallel
|
||||||
|
### Changed
|
||||||
|
* Commands: `host` can now be `localhost` or `127.0.0.1` to run commands locally
|
||||||
|
* lists loaded from external files only if no list config present in current file
|
||||||
|
* `PackageManager.Parse` renamed to `ParseRemotePackageManagerVersionOutput`. This now returns arrays of PackageManagerCommon.Package and errors.
|
||||||
|
* Internal: refactoring and renaming functions
|
||||||
|
* Commands: moved output-prefixed keys to the `commands.[name].output` object
|
||||||
|
* Change internal method name for better understanding
|
||||||
|
* Improved error message for remote version package output
|
||||||
|
### Fixed
|
||||||
|
* Command Lists: hooks now run correctly when commands finish
|
||||||
|
* Log file passed using `--log-file` correctly used
|
||||||
|
* Cmd Type `script` now correctly appends arguments
|
||||||
0
.changes/v0.3.0.md
Normal file → Executable file
0
.changes/v0.3.0.md
Normal file → Executable file
0
.changes/v0.3.1.md
Normal file → Executable file
0
.changes/v0.3.1.md
Normal file → Executable file
0
.changes/v0.4.0.md
Normal file → Executable file
0
.changes/v0.4.0.md
Normal file → Executable file
0
.changes/v0.5.0.md
Normal file → Executable file
0
.changes/v0.5.0.md
Normal file → Executable file
0
.changes/v0.6.0.md
Normal file → Executable file
0
.changes/v0.6.0.md
Normal file → Executable file
2
.changes/v0.6.1.md
Normal file → Executable file
2
.changes/v0.6.1.md
Normal file → Executable file
@@ -1,3 +1,3 @@
|
|||||||
## v0.6.1 - 2025-01-04
|
## v0.6.1 - 2025-01-04
|
||||||
### Fixed
|
### Fixed
|
||||||
* Hooks now run explicitly after the command executes. Fixed panic due to improper logic.
|
* When running a list, hooks now run explicitly after the command executes. Fixed panic due to improper logic.
|
||||||
16
.changes/v0.7.0.md
Executable file
16
.changes/v0.7.0.md
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
## v0.7.0 - 2025-02-11
|
||||||
|
### Added
|
||||||
|
* [feat]: package `packageOperation` option `checkVersion` implemented
|
||||||
|
* user management added - see docs
|
||||||
|
* Support for remote config sources. Only config file and list can be used for now.
|
||||||
|
* Cache functionality - still a WIP
|
||||||
|
* Flag `--s3-endpoint` for config file fetching from S3
|
||||||
|
### Changed
|
||||||
|
* Internal refactoring of config setup
|
||||||
|
* Formatting and sending for notifications
|
||||||
|
* name of `configfetcher` to `remotefetcher`
|
||||||
|
* Flags that took comma-separated lists now have to be passed multiple times for each argument.
|
||||||
|
* Hosts passed to `exec host` now checked against default SSH config files
|
||||||
|
### Fixed
|
||||||
|
* Parsing of remote URLs when determining list config file path
|
||||||
|
* Incorrect error notification template value
|
||||||
3
.changes/v0.7.1.md
Executable file
3
.changes/v0.7.1.md
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.7.1 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Incorrect local config file loading logic caused files to not be detected
|
||||||
3
.changes/v0.7.2.md
Executable file
3
.changes/v0.7.2.md
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.7.2 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* CI configs
|
||||||
3
.changes/v0.7.3.md
Executable file
3
.changes/v0.7.3.md
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.7.3 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* GoReleaser configs
|
||||||
5
.changes/v0.7.4.md
Executable file
5
.changes/v0.7.4.md
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
## v0.7.4 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* CI configs
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
5
.changes/v0.7.5.md
Executable file
5
.changes/v0.7.5.md
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
## v0.7.5 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* CI configs
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
4
.changes/v0.7.6.md
Executable file
4
.changes/v0.7.6.md
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
## v0.7.6 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
* CI configs
|
||||||
4
.changes/v0.7.7.md
Executable file
4
.changes/v0.7.7.md
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
## v0.7.7 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
* CI configs
|
||||||
4
.changes/v0.7.8.md
Executable file
4
.changes/v0.7.8.md
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
## v0.7.8 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Github CI config
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
6
.changes/v0.8.0.md
Executable file
6
.changes/v0.8.0.md
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
## v0.8.0 - 2025-02-15
|
||||||
|
### Changed
|
||||||
|
* Breaking: `cmd-lists` key changed to `cmdLists`
|
||||||
|
* Properly load list config
|
||||||
|
* Config file loading properly errors
|
||||||
|
* CI Configs
|
||||||
12
.changes/v0.9.0.md
Executable file
12
.changes/v0.9.0.md
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
## v0.9.0 - 2025-02-28
|
||||||
|
### Added
|
||||||
|
* `list` command with subcommands `cmds` and `lists`
|
||||||
|
* Deprecation and unsupported warnings for old config keys
|
||||||
|
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||||
|
* Command type `remoteScript`. See docs for more info.
|
||||||
|
### Changed
|
||||||
|
* change to enums for Command type
|
||||||
|
* Cache now stores resources by URL hash for ease-of-lookup
|
||||||
|
* Changed PackageOperation to enums
|
||||||
|
### Fixed
|
||||||
|
* Local command's `dir` full path is now found with home directory
|
||||||
3
.changes/v0.9.1.md
Executable file
3
.changes/v0.9.1.md
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.9.1 - 2025-03-01
|
||||||
|
### Changed
|
||||||
|
* Use EnvVar AWS_PROFILE to get S3 profile
|
||||||
0
.changie.yaml
Normal file → Executable file
0
.changie.yaml
Normal file → Executable file
0
.frontmatter/database/mediaDb.json
Normal file → Executable file
0
.frontmatter/database/mediaDb.json
Normal file → Executable file
0
.frontmatter/database/taxonomyDb.json
Normal file → Executable file
0
.frontmatter/database/taxonomyDb.json
Normal file → Executable file
22
.github/workflows/release.yml
vendored
Normal file → Executable file
22
.github/workflows/release.yml
vendored
Normal file → Executable file
@@ -15,26 +15,26 @@ jobs:
|
|||||||
goreleaser:
|
goreleaser:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: git fetch --force --tags
|
- run: git fetch --force --tags
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.20'
|
go-version: '1.23'
|
||||||
cache: true
|
cache: true
|
||||||
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
||||||
# on your needs.
|
# on your needs.
|
||||||
- name: Get tag
|
- uses: olegtarasov/get-tag@v2.1.4
|
||||||
id: tag
|
id: tagName
|
||||||
uses: dawidd6/action-get-tag@v1
|
|
||||||
with:
|
with:
|
||||||
# Optionally strip `v` prefix
|
# tagRegex: "foobar-(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
|
||||||
strip_v: false
|
tagRegexGroup: 1 # Optional. Default is 1.
|
||||||
- uses: goreleaser/goreleaser-action@v4
|
- uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: 2.7.0
|
||||||
args: release --release-notes=".changes/${{steps.tag.outputs.tag}}.md" -f .goreleaser/github.yml --clean
|
args: release --release-notes=".changes/${{ env.GIT_TAG_NAME }}.md" -f .goreleaser/github.yml --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
||||||
|
GIT_TAG_NAME: ${{ steps.tagName.outputs.tag }}
|
||||||
|
|||||||
8
.gitignore
vendored
Normal file → Executable file
8
.gitignore
vendored
Normal file → Executable file
@@ -1,4 +1,10 @@
|
|||||||
|
!.changie.yaml
|
||||||
|
!.changes/**
|
||||||
|
|
||||||
dist/
|
dist/
|
||||||
|
.codegpt
|
||||||
|
|
||||||
.codegpt
|
*.log
|
||||||
|
/*.sh
|
||||||
|
/*.yaml
|
||||||
|
/*.yml
|
||||||
|
|||||||
0
.gitmodules
vendored
Normal file → Executable file
0
.gitmodules
vendored
Normal file → Executable file
5
.goreleaser/gitea.yml
Normal file → Executable file
5
.goreleaser/gitea.yml
Normal file → Executable file
@@ -6,7 +6,6 @@ before:
|
|||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
- GOPROXY=https://goproxy.io
|
|
||||||
goos:
|
goos:
|
||||||
- freebsd
|
- freebsd
|
||||||
- linux
|
- linux
|
||||||
@@ -16,7 +15,7 @@ builds:
|
|||||||
- arm64
|
- arm64
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of uname.
|
# this name template makes the OS and Arch compatible with the results of uname.
|
||||||
name_template: >-
|
name_template: >-
|
||||||
{{ .ProjectName }}_{{ .Version }}_
|
{{ .ProjectName }}_{{ .Version }}_
|
||||||
@@ -28,7 +27,7 @@ archives:
|
|||||||
# use zip for windows archives
|
# use zip for windows archives
|
||||||
format_overrides:
|
format_overrides:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
format: zip
|
formats: [zip]
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
snapshot:
|
snapshot:
|
||||||
|
|||||||
5
.goreleaser/github.yml
Normal file → Executable file
5
.goreleaser/github.yml
Normal file → Executable file
@@ -1,4 +1,3 @@
|
|||||||
# This is an example .goreleaser.yml file with some sensible defaults.
|
|
||||||
# Make sure to check the documentation at https://goreleaser.com
|
# Make sure to check the documentation at https://goreleaser.com
|
||||||
version: 2
|
version: 2
|
||||||
before:
|
before:
|
||||||
@@ -17,7 +16,7 @@ builds:
|
|||||||
- arm64
|
- arm64
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of uname.
|
# this name template makes the OS and Arch compatible with the results of uname.
|
||||||
name_template: >-
|
name_template: >-
|
||||||
{{ .ProjectName }}_{{ .Version }}_
|
{{ .ProjectName }}_{{ .Version }}_
|
||||||
@@ -29,7 +28,7 @@ archives:
|
|||||||
# use zip for windows archives
|
# use zip for windows archives
|
||||||
format_overrides:
|
format_overrides:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
format: zip
|
formats: [zip]
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
snapshot:
|
snapshot:
|
||||||
|
|||||||
0
.goreleaser/vern.yml
Normal file → Executable file
0
.goreleaser/vern.yml
Normal file → Executable file
4
.vscode/settings.json
vendored
Normal file → Executable file
4
.vscode/settings.json
vendored
Normal file → Executable file
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Cmds",
|
"Cmds",
|
||||||
|
"remotefetcher",
|
||||||
"knadh",
|
"knadh",
|
||||||
"koanf",
|
"koanf",
|
||||||
"mattn",
|
"mattn",
|
||||||
@@ -8,5 +9,6 @@
|
|||||||
"mautrix",
|
"mautrix",
|
||||||
"nikoksr",
|
"nikoksr",
|
||||||
"Strs"
|
"Strs"
|
||||||
]
|
],
|
||||||
|
"CodeGPT.apiKey": "CodeGPT Plus Beta"
|
||||||
}
|
}
|
||||||
13
.woodpecker/gitea.yml
Normal file → Executable file
13
.woodpecker/gitea.yml
Normal file → Executable file
@@ -1,11 +1,18 @@
|
|||||||
steps:
|
steps:
|
||||||
release:
|
golang:
|
||||||
image: goreleaser/goreleaser
|
image: golang:1.23
|
||||||
commands:
|
commands:
|
||||||
|
- go install github.com/goreleaser/goreleaser/v2@v2.7.0
|
||||||
- goreleaser release -f .goreleaser/gitea.yml --release-notes=".changes/$(go run backy.go version -V).md"
|
- goreleaser release -f .goreleaser/gitea.yml --release-notes=".changes/$(go run backy.go version -V).md"
|
||||||
secrets: [ gitea_token ]
|
environment:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_token
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
# release:
|
||||||
|
# image: goreleaser/goreleaser
|
||||||
|
# commands:
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: tag
|
- event: tag
|
||||||
|
|||||||
2
.woodpecker/go-lint.yml
Normal file → Executable file
2
.woodpecker/go-lint.yml
Normal file → Executable file
@@ -5,7 +5,7 @@ steps:
|
|||||||
- go build
|
- go build
|
||||||
- go test
|
- go test
|
||||||
release:
|
release:
|
||||||
image: golangci/golangci-lint:v1.53.3
|
image: golangci/golangci-lint:v1.64.7
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run -v --timeout 5m
|
- golangci-lint run -v --timeout 5m
|
||||||
|
|
||||||
|
|||||||
16
.woodpecker/publish-docs.yml
Normal file → Executable file
16
.woodpecker/publish-docs.yml
Normal file → Executable file
@@ -1,10 +1,11 @@
|
|||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: hugomods/hugo:ci
|
image: hugomods/hugo:debian-ci-0.147.2
|
||||||
commands:
|
commands:
|
||||||
- git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
|
- git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
|
||||||
- cd docs
|
- cd docs
|
||||||
- hugo mod get -u ./...
|
- hugo mod get -u github.com/divinerites/plausible-hugo
|
||||||
|
- hugo mod get -u github.com/McShelby/hugo-theme-relearn@8.2.0
|
||||||
- hugo
|
- hugo
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@@ -22,7 +23,14 @@ steps:
|
|||||||
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' | DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add -
|
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' | DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add -
|
||||||
- rsync -atv --delete --progress public/ backy@backy.cybershell.xyz:docs
|
- rsync -atv --delete --progress public/ backy@backy.cybershell.xyz:docs
|
||||||
- rsync -atv --delete --progress vangen/ backy@backy.cybershell.xyz:vangen-go
|
- rsync -atv --delete --progress vangen/ backy@backy.cybershell.xyz:vangen-go
|
||||||
secrets: [ ssh_host_key, ssh_deploy_key, ssh_passphrase ]
|
environment:
|
||||||
|
SSH_HOST_KEY:
|
||||||
|
from_secret: ssh_host_key
|
||||||
|
SSH_DEPLOY_KEY:
|
||||||
|
from_secret: ssh_deploy_key
|
||||||
|
SSH_PASSPHRASE:
|
||||||
|
from_secret: ssh_passphrase
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- branch: master
|
- branch: master
|
||||||
|
- path: 'docs/**'
|
||||||
138
CHANGELOG.md
Normal file → Executable file
138
CHANGELOG.md
Normal file → Executable file
@@ -6,10 +6,144 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.0 - 2025-11-24
|
||||||
|
### Added
|
||||||
|
* feat: Package operation `versionCheck` supports regular expressions (see [regexp](https://pkg.go.dev/regexp) package for docs)
|
||||||
|
* Command lists: added `cmdLists.[name].notify` object
|
||||||
|
* Testing setup with Docker
|
||||||
|
* CLI: add global flag --hostsConfig that allows hosts to be dynamic in relation to the main config
|
||||||
|
* CLI: Exec subcommand `hosts`. See documentation for more details.
|
||||||
|
* CLI: added `exec hosts` subcommand `list`
|
||||||
|
* Add support for hosts in parallel
|
||||||
|
### Changed
|
||||||
|
* Commands: `host` can now be `localhost` or `127.0.0.1` to run commands locally
|
||||||
|
* lists loaded from external files only if no list config present in current file
|
||||||
|
* `PackageManager.Parse` renamed to `ParseRemotePackageManagerVersionOutput`. This now returns arrays of PackageManagerCommon.Package and errors.
|
||||||
|
* Internal: refactoring and renaming functions
|
||||||
|
* Commands: moved output-prefixed keys to the `commands.[name].output` object
|
||||||
|
* Change internal method name for better understanding
|
||||||
|
* Improved error message for remote version package output
|
||||||
|
### Fixed
|
||||||
|
* Command Lists: hooks now run correctly when commands finish
|
||||||
|
* Log file passed using `--log-file` correctly used
|
||||||
|
* Cmd Type `script` now correctly appends arguments
|
||||||
|
|
||||||
|
## v0.10.2 - 2025-03-19
|
||||||
|
### Added
|
||||||
|
* Notifications: http service added
|
||||||
|
* Variable support. Can be referenced with `%{var:nameOfVar}%` in select string fields.
|
||||||
|
### Changed
|
||||||
|
* vault: initialize vault before validating config
|
||||||
|
|
||||||
|
## v0.10.1 - 2025-03-11
|
||||||
|
### Added
|
||||||
|
* UserCommands: add ssh public keys when running locally
|
||||||
|
* UserCommands: add field CreateUserHome
|
||||||
|
### Changed
|
||||||
|
* UserCommands: create temp file when modifing password over SSH
|
||||||
|
* UserCommands: change field name
|
||||||
|
* Vault: keys are now referenced by `name`, and the actual data by `data`
|
||||||
|
|
||||||
|
## v0.10.0 - 2025-03-08
|
||||||
|
### Added
|
||||||
|
* Hooks: improved logging when executing
|
||||||
|
* User commands: adding SSH keys using config key `userSshPubKeys`
|
||||||
|
* directives: added support for fetching values using directive `%{externalSource:key}%`
|
||||||
|
### Changed
|
||||||
|
* Commands: if dir is not specified, run in config dir
|
||||||
|
* FileDirective: use the config directory if path is not absolute
|
||||||
|
* Host: changes to case of some keys
|
||||||
|
* Notifications: added external directive to sensitive keys
|
||||||
|
### Fixed
|
||||||
|
* LocalFetcher: return fetch error
|
||||||
|
* Lists: load file key before attempting to load from current file
|
||||||
|
* fix: host not in config file, but in ssh config, properly added to hosts struct
|
||||||
|
* SSH: password authentication bugs
|
||||||
|
* User commands: change user password works
|
||||||
|
|
||||||
|
## v0.9.1 - 2025-03-01
|
||||||
|
### Changed
|
||||||
|
* Use EnvVar AWS_PROFILE to get S3 profile
|
||||||
|
|
||||||
|
## v0.9.0 - 2025-02-28
|
||||||
|
### Added
|
||||||
|
* `list` command with subcommands `cmds` and `lists`
|
||||||
|
* Deprecation and unsupported warnings for old config keys
|
||||||
|
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||||
|
* Command type `remoteScript`. See docs for more info.
|
||||||
|
### Changed
|
||||||
|
* change to enums for Command type
|
||||||
|
* Cache now stores resources by URL hash for ease-of-lookup
|
||||||
|
* Changed PackageOperation to enums
|
||||||
|
### Fixed
|
||||||
|
* Local command's `dir` full path is now found with home directory
|
||||||
|
|
||||||
|
## v0.8.0 - 2025-02-15
|
||||||
|
### Changed
|
||||||
|
* Breaking: `cmd-lists` key changed to `cmdLists`
|
||||||
|
* Properly load list config
|
||||||
|
* Config file loading properly errors
|
||||||
|
* CI Configs
|
||||||
|
|
||||||
|
## v0.7.8 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Github CI config
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
|
||||||
|
## v0.7.7 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
* CI configs
|
||||||
|
|
||||||
|
## v0.7.6 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
* CI configs
|
||||||
|
|
||||||
|
## v0.7.5 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* CI configs
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
|
||||||
|
## v0.7.4 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* CI configs
|
||||||
|
### Fixed
|
||||||
|
* v0.7.1: Incorrect local config file loading logic caused files to not be detected
|
||||||
|
|
||||||
|
## v0.7.3 - 2025-02-14
|
||||||
|
### Changed
|
||||||
|
* GoReleaser configs
|
||||||
|
|
||||||
|
## v0.7.2 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* CI configs
|
||||||
|
|
||||||
|
## v0.7.1 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Incorrect local config file loading logic caused files to not be detected
|
||||||
|
|
||||||
|
## v0.7.0 - 2025-02-11
|
||||||
|
### Added
|
||||||
|
* [feat]: package `packageOperation` option `checkVersion` implemented
|
||||||
|
* user management added - see docs
|
||||||
|
* Support for remote config sources. Only config file and list can be used for now.
|
||||||
|
* Cache functionality - still a WIP
|
||||||
|
* Flag `--s3-endpoint` for config file fetching from S3
|
||||||
|
### Changed
|
||||||
|
* Internal refactoring of config setup
|
||||||
|
* Formatting and sending for notifications
|
||||||
|
* name of `configfetcher` to `remotefetcher`
|
||||||
|
* Flags that took comma-separated lists now have to be passed multiple times for each argument.
|
||||||
|
* Hosts passed to `exec host` now checked against default SSH config files
|
||||||
|
### Fixed
|
||||||
|
* Parsing of remote URLs when determining list config file path
|
||||||
|
* Incorrect error notification template value
|
||||||
|
|
||||||
## v0.6.1 - 2025-01-04
|
## v0.6.1 - 2025-01-04
|
||||||
### Fixed
|
### Fixed
|
||||||
* Hooks now run explicitly after the command executes. Fixed panic due to improper logic.
|
* When running a list, hooks now run explicitly after the command executes. Fixed panic due to improper logic.
|
||||||
|
|
||||||
## v0.6.0 - 2025-01-04
|
## v0.6.0 - 2025-01-04
|
||||||
### Added
|
### Added
|
||||||
* Command Type Package - allows one to perform package operations [docs](https://backy.cybershell.xyz/config/packages/)
|
* Command Type Package - allows one to perform package operations [docs](https://backy.cybershell.xyz/config/packages/)
|
||||||
|
|||||||
27
backy.code-workspace
Executable file
27
backy.code-workspace
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"name": "backy",
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"cSpell.words": [
|
||||||
|
"Autorestic",
|
||||||
|
"changie",
|
||||||
|
"Cmds",
|
||||||
|
"CMDSTDOUT",
|
||||||
|
"goreleaser",
|
||||||
|
"knadh",
|
||||||
|
"koanf",
|
||||||
|
"mattn",
|
||||||
|
"maunium",
|
||||||
|
"mautrix",
|
||||||
|
"nikoksr",
|
||||||
|
"packagemanagercommon",
|
||||||
|
"rawbytes",
|
||||||
|
"remotefetcher",
|
||||||
|
"Strs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
0
cmd/.gitignore
vendored
Normal file → Executable file
0
cmd/.gitignore
vendored
Normal file → Executable file
17
cmd/backup.go
Normal file → Executable file
17
cmd/backup.go
Normal file → Executable file
@@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
backupCmd = &cobra.Command{
|
backupCmd = &cobra.Command{
|
||||||
Use: "backup [--lists=list1,list2,... | -l list1, list2,...]",
|
Use: "backup [--lists=list1 --lists list2 ... | -l list1 -l list2 ...]",
|
||||||
Short: "Runs commands defined in config file.",
|
Short: "Runs commands defined in config file. Use -l flag multiple times to run multiple lists.",
|
||||||
Long: "Backup executes commands defined in config file.\nUse the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.",
|
Long: "Backup executes commands defined in config file.\nUse the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.",
|
||||||
Run: Backup,
|
Run: Backup,
|
||||||
}
|
}
|
||||||
@@ -23,16 +23,21 @@ var (
|
|||||||
var cmdLists []string
|
var cmdLists []string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
parseS3Config()
|
||||||
|
|
||||||
backupCmd.Flags().StringSliceVarP(&cmdLists, "lists", "l", nil, "Accepts comma-separated names of command lists to execute.")
|
backupCmd.Flags().StringArrayVarP(&cmdLists, "lists", "l", nil, "Accepts comma-separated names of command lists to execute.")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Backup(cmd *cobra.Command, args []string) {
|
func Backup(cmd *cobra.Command, args []string) {
|
||||||
backyConfOpts := backy.NewOpts(cfgFile, backy.AddCommandLists(cmdLists))
|
backyConfOpts := backy.NewConfigOptions(configFile,
|
||||||
backyConfOpts.InitConfig()
|
backy.AddCommandLists(cmdLists),
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
|
||||||
backy.ReadConfig(backyConfOpts)
|
backyConfOpts.InitConfig()
|
||||||
|
backyConfOpts.ParseConfigurationFile()
|
||||||
|
|
||||||
backyConfOpts.RunListConfig("")
|
backyConfOpts.RunListConfig("")
|
||||||
for _, host := range backyConfOpts.Hosts {
|
for _, host := range backyConfOpts.Hosts {
|
||||||
|
|||||||
54
cmd/backup_test.go
Executable file
54
cmd/backup_test.go
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
// import (
|
||||||
|
// "bufio"
|
||||||
|
// "encoding/json"
|
||||||
|
// "os"
|
||||||
|
// "os/exec"
|
||||||
|
// "strings"
|
||||||
|
// "testing"
|
||||||
|
|
||||||
|
// "github.com/stretchr/testify/assert"
|
||||||
|
// )
|
||||||
|
|
||||||
|
// // TestConfigOptions tests the configuration options for the backy package.
|
||||||
|
// func Test_ErrorHook(t *testing.T) {
|
||||||
|
// configFile := "-f ../../tests/ErrorHook.yml"
|
||||||
|
// logFile := "--log-file=ErrorHook.log"
|
||||||
|
// backyCommand := exec.Command("go", "run", "../../backy.go", configFile, logFile, "backup")
|
||||||
|
// backyCommand.Stderr = os.Stdout
|
||||||
|
// backyCommand.Stdout = os.Stdout
|
||||||
|
// err := backyCommand.Run()
|
||||||
|
// assert.Nil(t, err)
|
||||||
|
// os.Remove("ErrorHook.log")
|
||||||
|
// logFileData, logFileErr := os.ReadFile("ErrorHook.log")
|
||||||
|
// if logFileErr != nil {
|
||||||
|
// assert.FailNow(t, logFileErr.Error())
|
||||||
|
|
||||||
|
// }
|
||||||
|
// var JsonData []map[string]interface{}
|
||||||
|
// jsonScanner := bufio.NewScanner(strings.NewReader(string(logFileData)))
|
||||||
|
|
||||||
|
// for jsonScanner.Scan() {
|
||||||
|
// var jsonDataLine map[string]interface{}
|
||||||
|
// err = json.Unmarshal(jsonScanner.Bytes(), &jsonDataLine)
|
||||||
|
// assert.Nil(t, err)
|
||||||
|
// JsonData = append(JsonData, jsonDataLine)
|
||||||
|
// }
|
||||||
|
// for _, v := range JsonData {
|
||||||
|
// _, ok := v["error"]
|
||||||
|
// if !ok {
|
||||||
|
// assert.FailNow(t, "error does not exist\n")
|
||||||
|
// // return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // t.Logf("%s", logFileData)
|
||||||
|
// // t.Logf("%v", JsonData)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func TestBackupErrorHook(t *testing.T) {
|
||||||
|
// logFile = "ErrorHook.log"
|
||||||
|
|
||||||
|
// configFile = "../tests/ErrorHook.yml"
|
||||||
|
|
||||||
|
// }
|
||||||
2
cmd/config.go
Normal file → Executable file
2
cmd/config.go
Normal file → Executable file
@@ -20,7 +20,7 @@ package cmd
|
|||||||
|
|
||||||
// func config(cmd *cobra.Command, args []string) {
|
// func config(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
// opts := backy.NewOpts(cfgFile, backy.cronEnabled())
|
// opts := backy.NewConfigOptions(configFile, backy.cronEnabled())
|
||||||
// opts.InitConfig()
|
// opts.InitConfig()
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|||||||
11
cmd/cron.go
Normal file → Executable file
11
cmd/cron.go
Normal file → Executable file
@@ -16,9 +16,16 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func cron(cmd *cobra.Command, args []string) {
|
func cron(cmd *cobra.Command, args []string) {
|
||||||
|
parseS3Config()
|
||||||
|
|
||||||
|
opts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.EnableCron(),
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
|
||||||
opts := backy.NewOpts(cfgFile, backy.CronEnabled())
|
|
||||||
opts.InitConfig()
|
opts.InitConfig()
|
||||||
backy.ReadConfig(opts)
|
opts.ParseConfigurationFile()
|
||||||
|
|
||||||
opts.Cron()
|
opts.Cron()
|
||||||
}
|
}
|
||||||
|
|||||||
17
cmd/exec.go
Normal file → Executable file
17
cmd/exec.go
Normal file → Executable file
@@ -21,20 +21,23 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
execCmd.AddCommand(hostExecCommand)
|
execCmd.AddCommand(hostExecCommand, hostsExecCommand)
|
||||||
|
|
||||||
hostExecCommand.Flags().StringSliceVarP(&hostsList, "hosts", "m", nil, "Accepts comma-separated names of hosts.")
|
|
||||||
hostExecCommand.Flags().StringSliceVarP(&cmdList, "commands", "c", nil, "Accepts comma-separated names of commands.")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func execute(cmd *cobra.Command, args []string) {
|
func execute(cmd *cobra.Command, args []string) {
|
||||||
|
parseS3Config()
|
||||||
|
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
logging.ExitWithMSG("Please provide a command to run. Pass --help to see options.", 1, nil)
|
logging.ExitWithMSG("Please provide a command to run. Pass --help to see options.", 1, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := backy.NewOpts(cfgFile, backy.AddCommands(args))
|
opts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.AddCommands(args),
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
opts.InitConfig()
|
opts.InitConfig()
|
||||||
// opts.InitMongo()
|
opts.ParseConfigurationFile()
|
||||||
backy.ReadConfig(opts).ExecuteCmds(opts)
|
opts.ExecuteCmds()
|
||||||
}
|
}
|
||||||
|
|||||||
37
cmd/host.go
Normal file → Executable file
37
cmd/host.go
Normal file → Executable file
@@ -8,19 +8,25 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
hostExecCommand = &cobra.Command{
|
hostExecCommand = &cobra.Command{
|
||||||
Use: "host [--commands=command1,command2, ... | -c command1,command2, ...] [--hosts=host1,hosts2, ... | -m host1,host2, ...] ",
|
Use: "host [--command=command1 --command=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -m host2 ...] ",
|
||||||
Short: "Runs command defined in config file on the hosts in order specified.",
|
Short: "Runs command defined in config file on the hosts in order specified.",
|
||||||
Long: "Host executes specified commands on the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.",
|
Long: "Host executes specified commands on the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.",
|
||||||
Run: Host,
|
Run: Host,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Holds command list to run
|
// Holds list of hosts to run commands on
|
||||||
var hostsList []string
|
var hostsList []string
|
||||||
|
|
||||||
|
// Holds command list to run
|
||||||
var cmdList []string
|
var cmdList []string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
||||||
|
hostExecCommand.Flags().StringArrayVarP(&hostsList, "hosts", "m", nil, "Accepts space-separated names of hosts. Specify multiple times for multiple hosts.")
|
||||||
|
hostExecCommand.Flags().StringArrayVarP(&cmdList, "command", "c", nil, "Accepts space-separated names of commands. Specify multiple times for multiple commands.")
|
||||||
|
parseS3Config()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// cli input should be hosts and commands. Hosts are defined in config files.
|
// cli input should be hosts and commands. Hosts are defined in config files.
|
||||||
@@ -29,21 +35,36 @@ func init() {
|
|||||||
// 2. stdin (on command line) (TODO)
|
// 2. stdin (on command line) (TODO)
|
||||||
|
|
||||||
func Host(cmd *cobra.Command, args []string) {
|
func Host(cmd *cobra.Command, args []string) {
|
||||||
backyConfOpts := backy.NewOpts(cfgFile)
|
backyConfOpts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
backyConfOpts.InitConfig()
|
backyConfOpts.InitConfig()
|
||||||
|
|
||||||
backy.ReadConfig(backyConfOpts)
|
backyConfOpts.ParseConfigurationFile()
|
||||||
|
|
||||||
// check CLI input
|
// check CLI input
|
||||||
if hostsList == nil {
|
if hostsList == nil {
|
||||||
logging.ExitWithMSG("error: hosts must be specified", 1, &backyConfOpts.Logger)
|
logging.ExitWithMSG("error: hosts must be specified", 1, &backyConfOpts.Logger)
|
||||||
}
|
}
|
||||||
// host is only checked when we read the SSH File
|
|
||||||
// so a check may not be needed here
|
|
||||||
for _, h := range hostsList {
|
for _, h := range hostsList {
|
||||||
|
if backy.IsHostLocal(h) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// check if h exists in the config file
|
||||||
_, hostFound := backyConfOpts.Hosts[h]
|
_, hostFound := backyConfOpts.Hosts[h]
|
||||||
if !hostFound {
|
if !hostFound {
|
||||||
logging.ExitWithMSG("host "+h+" not found", 1, &backyConfOpts.Logger)
|
// check if h exists in the SSH config file
|
||||||
|
hostFoundInConfig, s := backy.DoesHostHaveHostName(h)
|
||||||
|
if !hostFoundInConfig {
|
||||||
|
logging.ExitWithMSG("host "+h+" not found", 1, &backyConfOpts.Logger)
|
||||||
|
}
|
||||||
|
if backyConfOpts.Hosts == nil {
|
||||||
|
backyConfOpts.Hosts = make(map[string]*backy.Host)
|
||||||
|
}
|
||||||
|
// create host with hostname and host
|
||||||
|
backyConfOpts.Hosts[h] = &backy.Host{Host: h, HostName: s}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cmdList == nil {
|
if cmdList == nil {
|
||||||
@@ -56,5 +77,5 @@ func Host(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
backyConfOpts.ExecCmdsSSH(cmdList, hostsList)
|
backyConfOpts.ExecCmdsOnHosts(cmdList, hostsList)
|
||||||
}
|
}
|
||||||
|
|||||||
93
cmd/hosts.go
Executable file
93
cmd/hosts.go
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"maps"
|
||||||
|
"slices"
|
||||||
|
|
||||||
|
"git.andrewnw.xyz/CyberShell/backy/pkg/backy"
|
||||||
|
"git.andrewnw.xyz/CyberShell/backy/pkg/logging"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
runCommandsInParallel bool
|
||||||
|
|
||||||
|
hostsExecCommand = &cobra.Command{
|
||||||
|
Use: "hosts [--command=command1 --command=command2 ... | -c command1 -c command2 ...]",
|
||||||
|
Short: "Runs command defined in config file on the hosts in order specified.",
|
||||||
|
Long: "Hosts executes specified commands on all the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.",
|
||||||
|
Run: Hosts,
|
||||||
|
}
|
||||||
|
|
||||||
|
hostsListExecCommand = &cobra.Command{
|
||||||
|
Use: "list list1 list2 ...",
|
||||||
|
Short: "Runs lists in order specified defined in config file on all hosts.",
|
||||||
|
Long: "Lists executes specified lists on all the hosts defined in hosts config.\nPass the names of lists as arguments after command.",
|
||||||
|
Run: HostsList,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
hostsExecCommand.AddCommand(hostsListExecCommand)
|
||||||
|
hostsListExecCommand.Flags().BoolVarP(&runCommandsInParallel, "parallel", "p", false, "Run commands in parallel on hosts")
|
||||||
|
parseS3Config()
|
||||||
|
}
|
||||||
|
|
||||||
|
// cli input should be hosts and commands. Hosts are defined in config files.
|
||||||
|
// commands can be passed by the following mutually exclusive options:
|
||||||
|
// 1. as a list of commands defined in the config file
|
||||||
|
// 2. stdin (on command line) (TODO)
|
||||||
|
|
||||||
|
func Hosts(cmd *cobra.Command, args []string) {
|
||||||
|
backyConfOpts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
backyConfOpts.InitConfig()
|
||||||
|
|
||||||
|
backyConfOpts.ParseConfigurationFile()
|
||||||
|
|
||||||
|
for _, h := range backyConfOpts.Hosts {
|
||||||
|
|
||||||
|
hostsList = append(hostsList, h.Host)
|
||||||
|
}
|
||||||
|
|
||||||
|
if cmdList == nil {
|
||||||
|
logging.ExitWithMSG("error: commands must be specified", 1, &backyConfOpts.Logger)
|
||||||
|
}
|
||||||
|
for _, c := range cmdList {
|
||||||
|
_, cmdFound := backyConfOpts.Cmds[c]
|
||||||
|
if !cmdFound {
|
||||||
|
logging.ExitWithMSG("cmd "+c+" not found", 1, &backyConfOpts.Logger)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
backyConfOpts.ExecCmdsOnHosts(cmdList, hostsList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func HostsList(cmd *cobra.Command, args []string) {
|
||||||
|
backyConfOpts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.EnableCommandStdOut(cmdStdOut),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
backyConfOpts.InitConfig()
|
||||||
|
|
||||||
|
backyConfOpts.ParseConfigurationFile()
|
||||||
|
|
||||||
|
if len(args) == 0 {
|
||||||
|
logging.ExitWithMSG("error: no lists specified", 1, &backyConfOpts.Logger)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, l := range args {
|
||||||
|
_, listFound := backyConfOpts.CmdConfigLists[l]
|
||||||
|
if !listFound {
|
||||||
|
logging.ExitWithMSG("list "+l+" not found", 1, &backyConfOpts.Logger)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
maps.DeleteFunc(backyConfOpts.CmdConfigLists, func(k string, v *backy.CmdList) bool {
|
||||||
|
return !slices.Contains(args, k)
|
||||||
|
})
|
||||||
|
|
||||||
|
backyConfOpts.ExecuteListOnHosts(args, runCommandsInParallel)
|
||||||
|
}
|
||||||
71
cmd/list.go
Normal file → Executable file
71
cmd/list.go
Normal file → Executable file
@@ -6,16 +6,29 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.andrewnw.xyz/CyberShell/backy/pkg/backy"
|
"git.andrewnw.xyz/CyberShell/backy/pkg/backy"
|
||||||
|
"git.andrewnw.xyz/CyberShell/backy/pkg/logging"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
listCmd = &cobra.Command{
|
listCmd = &cobra.Command{
|
||||||
Use: "list [--list=list1,list2,... | -l list1, list2,...] [ -cmd cmd1 cmd2 cmd3...]",
|
Use: "list [command]",
|
||||||
Short: "Lists commands, lists, or hosts defined in config file.",
|
Short: "List commands, lists, or hosts defined in config file.",
|
||||||
Long: "Backup lists commands or groups defined in config file.\nUse the --lists or -l flag to list the specified lists. If not flag is not given, all lists will be executed.",
|
Long: "List commands, lists, or hosts defined in config file",
|
||||||
Run: List,
|
}
|
||||||
|
|
||||||
|
listCmds = &cobra.Command{
|
||||||
|
Use: "cmds [cmd1 cmd2 cmd3...]",
|
||||||
|
Short: "List commands defined in config file.",
|
||||||
|
Long: "List commands defined in config file",
|
||||||
|
Run: ListCommands,
|
||||||
|
}
|
||||||
|
listCmdLists = &cobra.Command{
|
||||||
|
Use: "lists [list1 list2 ...]",
|
||||||
|
Short: "List lists defined in config file.",
|
||||||
|
Long: "List lists defined in config file",
|
||||||
|
Run: ListCommandLists,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -23,27 +36,55 @@ var listsToList []string
|
|||||||
var cmdsToList []string
|
var cmdsToList []string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
listCmd.AddCommand(listCmds, listCmdLists)
|
||||||
listCmd.Flags().StringSliceVarP(&listsToList, "lists", "l", nil, "Accepts comma-separated names of command lists to list.")
|
|
||||||
listCmd.Flags().StringSliceVarP(&cmdsToList, "cmds", "c", nil, "Accepts comma-separated names of commands to list.")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func List(cmd *cobra.Command, args []string) {
|
func ListCommands(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
// settup based on whats passed in:
|
// setup based on whats passed in:
|
||||||
// - cmds
|
// - cmds
|
||||||
// - lists
|
// - lists
|
||||||
// - if none, list all commands
|
// - if none, list all commands
|
||||||
if cmdLists != nil {
|
if len(args) > 0 {
|
||||||
|
cmdsToList = args
|
||||||
|
} else {
|
||||||
|
logging.ExitWithMSG("Error: list cmds subcommand needs commands to list", 1, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := backy.NewOpts(cfgFile)
|
parseS3Config()
|
||||||
|
|
||||||
|
opts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
|
||||||
opts.InitConfig()
|
opts.InitConfig()
|
||||||
|
opts.ParseConfigurationFile()
|
||||||
|
|
||||||
|
for _, v := range cmdsToList {
|
||||||
|
opts.ListCommand(v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func ListCommandLists(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
|
parseS3Config()
|
||||||
|
|
||||||
|
if len(args) > 0 {
|
||||||
|
listsToList = args
|
||||||
|
} else {
|
||||||
|
logging.ExitWithMSG("Error: lists subcommand needs lists", 1, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
opts := backy.NewConfigOptions(configFile,
|
||||||
|
backy.SetLogFile(logFile),
|
||||||
|
backy.SetHostsConfigFile(hostsConfigFile))
|
||||||
|
|
||||||
|
opts.InitConfig()
|
||||||
|
opts.ParseConfigurationFile()
|
||||||
|
|
||||||
|
for _, v := range listsToList {
|
||||||
|
opts.ListCommandList(v)
|
||||||
|
}
|
||||||
|
|
||||||
opts = backy.ReadConfig(opts)
|
|
||||||
|
|
||||||
opts.ListCommand("rm-sn-db")
|
|
||||||
}
|
}
|
||||||
|
|||||||
21
cmd/root.go
Normal file → Executable file
21
cmd/root.go
Normal file → Executable file
@@ -13,8 +13,12 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// Used for flags.
|
// Used for flags.
|
||||||
cfgFile string
|
configFile string
|
||||||
verbose bool
|
hostsConfigFile string
|
||||||
|
verbose bool
|
||||||
|
cmdStdOut bool
|
||||||
|
logFile string
|
||||||
|
s3Endpoint string
|
||||||
|
|
||||||
rootCmd = &cobra.Command{
|
rootCmd = &cobra.Command{
|
||||||
Use: "backy",
|
Use: "backy",
|
||||||
@@ -32,9 +36,18 @@ func Execute() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
rootCmd.PersistentFlags().StringVar(&logFile, "logFile", "", "log file to write to")
|
||||||
|
rootCmd.PersistentFlags().BoolVar(&cmdStdOut, "cmdStdOut", false, "Pass to print command output to stdout")
|
||||||
|
|
||||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "f", "", "config file to read from")
|
rootCmd.PersistentFlags().StringVarP(&configFile, "config", "f", "", "config file to read from")
|
||||||
|
rootCmd.PersistentFlags().StringVar(&hostsConfigFile, "hostsConfig", "", "yaml hosts file to read from")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Sets verbose level")
|
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Sets verbose level")
|
||||||
|
rootCmd.PersistentFlags().StringVar(&s3Endpoint, "s3Endpoint", "", "Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.")
|
||||||
rootCmd.AddCommand(backupCmd, execCmd, cronCmd, versionCmd, listCmd)
|
rootCmd.AddCommand(backupCmd, execCmd, cronCmd, versionCmd, listCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func parseS3Config() {
|
||||||
|
if s3Endpoint != "" {
|
||||||
|
os.Setenv("S3_ENDPOINT", s3Endpoint)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
2
cmd/version.go
Normal file → Executable file
2
cmd/version.go
Normal file → Executable file
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
const versionStr = "0.6.1"
|
const versionStr = "0.11.0"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
versionCmd = &cobra.Command{
|
versionCmd = &cobra.Command{
|
||||||
|
|||||||
0
docs/.gitignore
vendored
Normal file → Executable file
0
docs/.gitignore
vendored
Normal file → Executable file
0
docs/.hugo_build.lock
Normal file → Executable file
0
docs/.hugo_build.lock
Normal file → Executable file
0
docs/archetypes/default.md
Normal file → Executable file
0
docs/archetypes/default.md
Normal file → Executable file
1
docs/config.yaml
Normal file → Executable file
1
docs/config.yaml
Normal file → Executable file
@@ -13,6 +13,7 @@ module:
|
|||||||
imports:
|
imports:
|
||||||
- path: github.com/divinerites/plausible-hugo
|
- path: github.com/divinerites/plausible-hugo
|
||||||
- path: github.com/McShelby/hugo-theme-relearn
|
- path: github.com/McShelby/hugo-theme-relearn
|
||||||
|
version: "v8.2.0"
|
||||||
params:
|
params:
|
||||||
themeVariant:
|
themeVariant:
|
||||||
- auto: []
|
- auto: []
|
||||||
|
|||||||
0
docs/content/_index.md
Normal file → Executable file
0
docs/content/_index.md
Normal file → Executable file
@@ -14,18 +14,22 @@ Usage:
|
|||||||
backy [command]
|
backy [command]
|
||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
backup Runs commands defined in config file.
|
backup Runs commands defined in config file. Use -l flag multiple times to run multiple lists.
|
||||||
completion Generate the autocompletion script for the specified shell
|
completion Generate the autocompletion script for the specified shell
|
||||||
cron Starts a scheduler that runs lists defined in config file.
|
cron Starts a scheduler that runs lists defined in config file.
|
||||||
exec Runs commands defined in config file in order given.
|
exec Runs commands defined in config file in order given.
|
||||||
help Help about any command
|
help Help about any command
|
||||||
list Lists commands, lists, or hosts defined in config file.
|
list List commands, lists, or hosts defined in config file.
|
||||||
version Prints the version and exits
|
version Prints the version and exits
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-h, --help help for backy
|
-f, --config string config file to read from
|
||||||
-v, --verbose Sets verbose level
|
-h, --help help for backy
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
|
|
||||||
Use "backy [command] --help" for more information about a command.
|
Use "backy [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
@@ -39,15 +43,19 @@ Backup executes commands defined in config file.
|
|||||||
Use the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.
|
Use the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
backy backup [--lists=list1,list2,... | -l list1, list2,...] [flags]
|
backy backup [--lists=list1 --lists list2 ... | -l list1 -l list2 ...] [flags]
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for backup
|
-h, --help help for backup
|
||||||
-l, --lists strings Accepts comma-separated names of command lists to execute.
|
-l, --lists stringArray Accepts comma-separated names of command lists to execute.
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
```
|
```
|
||||||
|
|
||||||
## cron
|
## cron
|
||||||
@@ -62,8 +70,12 @@ Flags:
|
|||||||
-h, --help help for cron
|
-h, --help help for cron
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
```
|
```
|
||||||
|
|
||||||
## exec
|
## exec
|
||||||
@@ -77,13 +89,18 @@ Usage:
|
|||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
host Runs command defined in config file on the hosts in order specified.
|
host Runs command defined in config file on the hosts in order specified.
|
||||||
|
hosts Runs command defined in config file on the hosts in order specified.
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for exec
|
-h, --help help for exec
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
|
|
||||||
Use "backy exec [command] --help" for more information about a command.
|
Use "backy exec [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
@@ -95,16 +112,20 @@ Host executes specified commands on the hosts defined in config file.
|
|||||||
Use the --commands or -c flag to choose the commands.
|
Use the --commands or -c flag to choose the commands.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
backy exec host [--commands=command1,command2, ... | -c command1,command2, ...] [--hosts=host1,hosts2, ... | -m host1,host2, ...] [flags]
|
backy exec host [--command=command1 --command=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -m host2 ...] [flags]
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-c, --commands strings Accepts comma-separated names of commands.
|
-c, --command stringArray Accepts space-separated names of commands. Specify multiple times for multiple commands.
|
||||||
-h, --help help for host
|
-h, --help help for host
|
||||||
-m, --hosts strings Accepts comma-separated names of hosts.
|
-m, --hosts stringArray Accepts space-separated names of hosts. Specify multiple times for multiple hosts.
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
```
|
```
|
||||||
|
|
||||||
## version
|
## version
|
||||||
@@ -121,25 +142,74 @@ Flags:
|
|||||||
-V, --vpre Output the version with v prefixed.
|
-V, --vpre Output the version with v prefixed.
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
```
|
```
|
||||||
|
|
||||||
## list
|
## list
|
||||||
|
|
||||||
```
|
```
|
||||||
Backup lists commands or groups defined in config file.
|
List commands, lists, or hosts defined in config file
|
||||||
Use the --lists or -l flag to list the specified lists. If not flag is not given, all lists will be executed.
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
backy list [--list=list1,list2,... | -l list1, list2,...] [ -cmd cmd1 cmd2 cmd3...] [flags]
|
backy list [command]
|
||||||
|
|
||||||
|
Available Commands:
|
||||||
|
cmds List commands defined in config file.
|
||||||
|
lists List lists defined in config file.
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-c, --cmds strings Accepts comma-separated names of commands to list.
|
-h, --help help for list
|
||||||
-h, --help help for list
|
|
||||||
-l, --lists strings Accepts comma-separated names of command lists to list.
|
|
||||||
|
|
||||||
Global Flags:
|
Global Flags:
|
||||||
-f, --config string config file to read from
|
--cmdStdOut Pass to print command output to stdout
|
||||||
-v, --verbose Sets verbose level
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
|
|
||||||
|
Use "backy list [command] --help" for more information about a command.
|
||||||
|
```
|
||||||
|
## list cmds
|
||||||
|
|
||||||
|
```
|
||||||
|
List commands defined in config file
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
backy list cmds [cmd1 cmd2 cmd3...] [flags]
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
-h, --help help for cmds
|
||||||
|
|
||||||
|
Global Flags:
|
||||||
|
--cmdStdOut Pass to print command output to stdout
|
||||||
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
|
```
|
||||||
|
## list lists
|
||||||
|
|
||||||
|
```
|
||||||
|
List lists defined in config file
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
backy list lists [list1 list2 ...] [flags]
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
-h, --help help for lists
|
||||||
|
|
||||||
|
Global Flags:
|
||||||
|
--cmdStdOut Pass to print command output to stdout
|
||||||
|
-f, --config string config file to read from
|
||||||
|
--hostsConfig string yaml hosts file to read from
|
||||||
|
--logFile string log file to write to
|
||||||
|
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
```
|
```
|
||||||
|
|||||||
6
docs/content/cli/exec.md
Normal file → Executable file
6
docs/content/cli/exec.md
Normal file → Executable file
@@ -7,13 +7,13 @@ The `exec` subcommand can do some things that the configuration file can't do ye
|
|||||||
`exec host` takes the following arguments:
|
`exec host` takes the following arguments:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
-c, --commands strings Accepts comma-separated names of commands.
|
-c, --commands strings Accepts space-separated names of commands.
|
||||||
-h, --help help for host
|
-h, --help help for host
|
||||||
-m, --hosts strings Accepts comma-separated names of hosts.
|
-m, --hosts strings Accepts space-separated names of hosts.
|
||||||
```
|
```
|
||||||
|
|
||||||
The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file.
|
The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
backy exec host [--commands=command1,command2, ... | -c command1,command2, ...] [--hosts=host1,hosts2, ... | -m host1,host2, ...] [flags]
|
backy exec host [--commands=command1 -commands=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -m host2 ...] [flags]
|
||||||
```
|
```
|
||||||
|
|||||||
29
docs/content/cli/list.md
Executable file
29
docs/content/cli/list.md
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
title: List
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
List commands, lists, or hosts defined in config file
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
```
|
||||||
|
backy list [command]
|
||||||
|
```
|
||||||
|
|
||||||
|
Available Commands:
|
||||||
|
cmds List commands defined in config file.
|
||||||
|
lists List lists defined in config file.
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
```
|
||||||
|
-h, --help help for list
|
||||||
|
```
|
||||||
|
|
||||||
|
Global Flags:
|
||||||
|
```
|
||||||
|
--cmdStdOut Pass to print command output to stdout
|
||||||
|
-f, --config string config file to read from
|
||||||
|
--log-file string log file to write to
|
||||||
|
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
|
||||||
|
-v, --verbose Sets verbose level
|
||||||
|
```
|
||||||
26
docs/content/config/_index.md
Normal file → Executable file
26
docs/content/config/_index.md
Normal file → Executable file
@@ -10,13 +10,31 @@ This is the section on the config file.
|
|||||||
To use a specific file:
|
To use a specific file:
|
||||||
```backy [command] -f /path/to/file```
|
```backy [command] -f /path/to/file```
|
||||||
|
|
||||||
|
You can also use a remote file:
|
||||||
|
```
|
||||||
|
backy [command] -f `s3/http source`
|
||||||
|
```
|
||||||
|
|
||||||
|
See remote resources docs for specific info.
|
||||||
|
|
||||||
If you leave the config path blank, the following paths will be searched in order:
|
If you leave the config path blank, the following paths will be searched in order:
|
||||||
|
|
||||||
1. `./backy.yml`
|
1. `./backy.yml`
|
||||||
2. `./backy.yaml`
|
2. `./backy.yaml`
|
||||||
3. `~/.config/backy.yml`
|
3. The same two files above contained in a `backy` subdirectory under in what is returned by Go's `os` package function `UserConfigDir()`.
|
||||||
4. `~/.config/backy.yaml`
|
|
||||||
|
|
||||||
Create a file at `~/.config/backy.yml`.
|
{{% expand title="`UserConfigDir()` documentation:" %}}
|
||||||
|
|
||||||
See the rest of the documentation in this section to configure it.
|
Up-to date documentation for this function may be found on [GoDoc](https://pkg.go.dev/os#UserConfigDir).
|
||||||
|
|
||||||
|
>UserConfigDir returns the default root directory to use for user-specific configuration data. Users should create their own application-specific subdirectory within this one and use that.
|
||||||
|
|
||||||
|
>On Unix systems, it returns $XDG_CONFIG_HOME as specified by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.config. On Darwin, it returns $HOME/Library/Application Support. On Windows, it returns %AppData%. On Plan 9, it returns $home/lib.
|
||||||
|
|
||||||
|
>If the location cannot be determined (for example, $HOME is not defined), then it will return an error.
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
|
||||||
|
See the rest of the documentation, titles included below, in this section to configure it.
|
||||||
|
|
||||||
|
{{% children description="true" %}}
|
||||||
36
docs/content/config/command-lists.md
Normal file → Executable file
36
docs/content/config/command-lists.md
Normal file → Executable file
@@ -2,7 +2,7 @@
|
|||||||
title: "Command Lists"
|
title: "Command Lists"
|
||||||
weight: 2
|
weight: 2
|
||||||
description: >
|
description: >
|
||||||
This page tells you how to get started with Backy.
|
This page tells you how to use command lists.
|
||||||
---
|
---
|
||||||
|
|
||||||
Command lists are for executing commands in sequence and getting notifications from them.
|
Command lists are for executing commands in sequence and getting notifications from them.
|
||||||
@@ -11,10 +11,18 @@ The top-level object key can be anything you want but not the same as another.
|
|||||||
|
|
||||||
Lists can go in a separate file. Command lists should be in a separate file if:
|
Lists can go in a separate file. Command lists should be in a separate file if:
|
||||||
|
|
||||||
1. key 'cmd-lists.file' is found
|
1. key 'cmdLists.file' is specified
|
||||||
2. hosts.yml or hosts.yaml is found in the same directory as the backy config file
|
2. lists.yml or lists.yaml is found in the same directory as the backy config file (this includes remote config files as of v0.7.0)
|
||||||
|
|
||||||
```yaml
|
{{% notice info %}}
|
||||||
|
The lists file is also checked in remote resources.
|
||||||
|
|
||||||
|
The lists file is ignored under the following condition:
|
||||||
|
|
||||||
|
If a remote config file is specified (on the command-line using `-f`) and the lists file is not found in the same directory, the lists file is assumed to not exist.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
```yaml {lineNos="true" wrap="true" title="yaml"}
|
||||||
test2:
|
test2:
|
||||||
name: test2
|
name: test2
|
||||||
order:
|
order:
|
||||||
@@ -27,12 +35,12 @@ Lists can go in a separate file. Command lists should be in a separate file if:
|
|||||||
```
|
```
|
||||||
|
|
||||||
| key | description | type | required
|
| key | description | type | required
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | ---
|
||||||
| `order` | Defines the sequence of commands to execute | `[]string` | yes |
|
| `order` | Defines the sequence of commands to execute | `[]string` | yes
|
||||||
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no |
|
| `sendNotificationOnSuccess` | Whether to send notification on list success with the commands' output | `bool` | no
|
||||||
| `notifications` | The notification service(s) and ID(s) to use on success and failure. Must be *`service.id`*. See the [notifications documentation page](/config/notifications/) for more | `[]string` | no |
|
| `notifications` | The notification service(s) and ID(s) to use on success and failure. Must be *`service.id`*. See the [notifications documentation page](/config/notifications/) for more | `[]string` | no
|
||||||
| `name` | Optional name of the list | `string` | no |
|
| `name` | Optional name of the list | `string` | no
|
||||||
| `cron` | Time at which to schedule the list. Only has affect when cron subcommand is run. | `string` | no |
|
| `cron` | Time at which to schedule the list. Only has affect when cron subcommand is run. | `string` | no
|
||||||
|
|
||||||
### Order
|
### Order
|
||||||
|
|
||||||
@@ -62,14 +70,14 @@ Name is optional. If name is not defined, name will be the object's map key.
|
|||||||
|
|
||||||
Backy also has a cron mode, so one can run `backy cron` and start a process that schedules jobs to run at times defined in the configuration file.
|
Backy also has a cron mode, so one can run `backy cron` and start a process that schedules jobs to run at times defined in the configuration file.
|
||||||
|
|
||||||
Adding `cron: 0 0 1 * * *` to a `cmd-lists` object will schedule the list at 1 in the morning. See [https://crontab.guru/](https://crontab.guru/) for reference.
|
Adding `cron: 0 0 1 * * *` to a `cmdLists` object will schedule the list at 1 in the morning. See [https://crontab.guru/](https://crontab.guru/) for reference.
|
||||||
|
|
||||||
{{% notice tip %}}
|
{{% notice tip %}}
|
||||||
Note: Backy uses the second field of cron, so add anything except * to the beginning of a regular cron expression.
|
Note: Backy uses the second field of cron, so add anything except `*` to the beginning of a regular cron expression.
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
||||||
```yaml
|
```yaml {lineNos="true" wrap="true" title="yaml"}
|
||||||
cmd-lists:
|
cmdLists:
|
||||||
docker-container-backup: # this can be any name you want
|
docker-container-backup: # this can be any name you want
|
||||||
# all commands have to be defined
|
# all commands have to be defined
|
||||||
order:
|
order:
|
||||||
|
|||||||
@@ -1,152 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Commands"
|
|
||||||
weight: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
The yaml top-level map can be any string.
|
|
||||||
|
|
||||||
The top-level name must be unique.
|
|
||||||
|
|
||||||
### Example Config
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
commands:
|
|
||||||
stop-docker-container:
|
|
||||||
cmd: docker
|
|
||||||
Args:
|
|
||||||
- compose
|
|
||||||
- -f /some/path/to/docker-compose.yaml
|
|
||||||
- down
|
|
||||||
# if host is not defined, command will be run locally
|
|
||||||
# The host has to be defined in either the config file or the SSH Config files
|
|
||||||
host: some-host
|
|
||||||
hooks
|
|
||||||
error:
|
|
||||||
- some-other-command-when-failing
|
|
||||||
success:
|
|
||||||
- success-command
|
|
||||||
final:
|
|
||||||
- final-command
|
|
||||||
backup-docker-container-script:
|
|
||||||
cmd: /path/to/local/script
|
|
||||||
# script file is input as stdin to SSH
|
|
||||||
type: scriptFile # also can be script
|
|
||||||
environment:
|
|
||||||
- FOO=BAR
|
|
||||||
- APP=$VAR
|
|
||||||
```
|
|
||||||
|
|
||||||
Values available for this section **(case-sensitive)**:
|
|
||||||
|
|
||||||
| name | notes | type | required
|
|
||||||
| --- | --- | --- | --- |
|
|
||||||
| `cmd` | Defines the command to execute | `string` | yes |
|
|
||||||
| `Args` | Defines the arguments to the command | `[]string` | no |
|
|
||||||
| `environment` | Defines evironment variables for the command | `[]string` | no |
|
|
||||||
| `type` | May be `scriptFile`, `script`, or `package`. Runs script from local machine on remote. `Package` is the only one that can be run on local and remote hosts. | `string` | no |
|
|
||||||
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no |
|
|
||||||
| `host` | If not specified, the command will execute locally. | `string` | no |
|
|
||||||
| `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no |
|
|
||||||
| `shell` | Run the command in the shell | `string` | no |
|
|
||||||
| `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no |
|
|
||||||
|
|
||||||
#### cmd
|
|
||||||
|
|
||||||
cmd must be a valid command or script to execute.
|
|
||||||
|
|
||||||
#### Args
|
|
||||||
|
|
||||||
args must be arguments to cmd as they would be passed on the command-line:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cmd [arg1 arg2 ...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Define them in an array:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
Args:
|
|
||||||
- arg1
|
|
||||||
- arg2
|
|
||||||
- arg3
|
|
||||||
```
|
|
||||||
|
|
||||||
### getOutput
|
|
||||||
|
|
||||||
Get command output when a notification is sent.
|
|
||||||
|
|
||||||
Is not required. Can be `true` or `false`.
|
|
||||||
|
|
||||||
#### host
|
|
||||||
|
|
||||||
{{% notice info %}}
|
|
||||||
If any `host` is not defined or left blank, the command will run on the local machine.
|
|
||||||
{{% /notice %}}
|
|
||||||
|
|
||||||
Host may or may not be defined in the `hosts` section.
|
|
||||||
|
|
||||||
{{% notice info %}}
|
|
||||||
If any `host` from the commands section does not match any object in the `hosts` section, the `Host` is assumed to be this value. This value will be used to search in the default SSH config files.
|
|
||||||
|
|
||||||
For example, say that I have a host defined in my SSH config with the `Host` defined as `web-prod`.
|
|
||||||
If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files.
|
|
||||||
{{% /notice %}}
|
|
||||||
|
|
||||||
### shell
|
|
||||||
|
|
||||||
If shell is defined, the command will run in the specified shell.
|
|
||||||
Make sure to escape any shell input.
|
|
||||||
|
|
||||||
### scriptEnvFile
|
|
||||||
|
|
||||||
Path to a file.
|
|
||||||
|
|
||||||
When type is `script` or `scriptFile` , the script is appended to this file.
|
|
||||||
|
|
||||||
This is useful for specifying environment variables or other things so they don't have to be included in the script.
|
|
||||||
|
|
||||||
### type
|
|
||||||
|
|
||||||
May be `scriptFile` or `script`. Runs script from local machine on remote host passed to the SSH session as standard input.
|
|
||||||
|
|
||||||
If `type` is `script`, `cmd` is used as the script.
|
|
||||||
|
|
||||||
If `type` is `scriptFile`, cmd must be a script file.
|
|
||||||
|
|
||||||
If `type` is `package`, there are additional fields that must be specified.
|
|
||||||
|
|
||||||
### environment
|
|
||||||
|
|
||||||
The environment variables support expansion:
|
|
||||||
|
|
||||||
- using escaped values `$VAR` or `${VAR}`
|
|
||||||
|
|
||||||
For now, the variables have to be defined in an `.env` file in the same directory as the config file.
|
|
||||||
|
|
||||||
If using it with host specified, the SSH server has to be configured to accept those env variables.
|
|
||||||
|
|
||||||
If the command is run locally, the OS's environment is added.
|
|
||||||
|
|
||||||
### hooks
|
|
||||||
|
|
||||||
Hooks are run after the command is run.
|
|
||||||
|
|
||||||
Errors are run if the command errors, success if it returns no error. Final hooks are run regardless of error condition.
|
|
||||||
|
|
||||||
Values for hooks are as follows:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
command:
|
|
||||||
hook:
|
|
||||||
# these commands are defined elsewhere in the file
|
|
||||||
error:
|
|
||||||
- errcommand
|
|
||||||
success:
|
|
||||||
- successcommand
|
|
||||||
final:
|
|
||||||
- donecommand
|
|
||||||
```
|
|
||||||
|
|
||||||
### packages
|
|
||||||
|
|
||||||
See the [dedicated page](/config/packages) for package configuration.
|
|
||||||
164
docs/content/config/commands/_index.md
Executable file
164
docs/content/config/commands/_index.md
Executable file
@@ -0,0 +1,164 @@
|
|||||||
|
---
|
||||||
|
title: "Commands"
|
||||||
|
description: Commands are just that, commands
|
||||||
|
weight: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example Config
|
||||||
|
|
||||||
|
{{% code file="/examples/example.yml" language="yaml" %}}
|
||||||
|
|
||||||
|
Values available for this section **(case-sensitive)**:
|
||||||
|
|
||||||
|
| name | notes | type | required | External directive support |
|
||||||
|
| ----------------| ------------------------------------------------------------------------------------------------------- | --------------------- | -------- |----------------------------|
|
||||||
|
| `cmd` | Defines the command to execute | `string` | yes | No |
|
||||||
|
| `Args` | Defines the arguments to the command | `[]string` | no | No |
|
||||||
|
| `environment` | Defines environment variables for the command | `[]string` | no | Partial |
|
||||||
|
| `type` | See documentation further down the page. Additional fields may be required. | `string` | no | No |
|
||||||
|
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no | No |
|
||||||
|
| `host` | Depricated: use `hosts`. If not specified, the command will execute locally. | `string` | no | No |
|
||||||
|
| `hosts` | Must be specified to run commands both locallly and in parrallel. | `[]string` | no | No |
|
||||||
|
| `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no | No |
|
||||||
|
| `shell` | Run the command in the shell | `string` | no | No |
|
||||||
|
| `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no | No |
|
||||||
|
|
||||||
|
#### cmd
|
||||||
|
|
||||||
|
cmd must be a valid command or script to execute.
|
||||||
|
|
||||||
|
#### Args
|
||||||
|
|
||||||
|
args must be arguments to cmd as they would be passed on the command-line:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cmd [arg1 arg2 ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
Define them in an array:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
Args:
|
||||||
|
- arg1
|
||||||
|
- arg2
|
||||||
|
- arg3
|
||||||
|
```
|
||||||
|
|
||||||
|
### getOutput
|
||||||
|
|
||||||
|
Get command output when a notification is sent.
|
||||||
|
|
||||||
|
Is not required. Can be `true` or `false`.
|
||||||
|
|
||||||
|
### host
|
||||||
|
|
||||||
|
|
||||||
|
{{% notice warning %}}
|
||||||
|
Depricated: use `hosts` instead.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
{{% notice info %}}
|
||||||
|
If any `host` is not defined or left blank, the command will run on the local machine.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
Host may or may not be defined in the `hosts` section.
|
||||||
|
|
||||||
|
{{% notice info %}}
|
||||||
|
If any `host` from the commands section does not match any object in the `hosts` section, the `Host` is assumed to be this value. This value will be used to search in the default SSH config files.
|
||||||
|
|
||||||
|
For example, say that I have a host defined in my SSH config with the `Host` defined as `web-prod`.
|
||||||
|
If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
### hosts
|
||||||
|
|
||||||
|
{{% notice info %}}
|
||||||
|
If any `command.[name].hosts` index is `localhost` or `127.0.0.1`, the command will run on the local machine.
|
||||||
|
|
||||||
|
You can also remove the field to have the command run locally.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
Host may or may not be defined in the `hosts` section.
|
||||||
|
|
||||||
|
{{% notice info %}}
|
||||||
|
If any `host` from the commands section does not match any object in the `hosts` section, the `Host` is assumed to be this value. This value will be used to search in the default SSH config files.
|
||||||
|
|
||||||
|
For example, say that I have a host defined in my SSH config with the `Host` defined as `web-prod`.
|
||||||
|
If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files.
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
###### Example:
|
||||||
|
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
command:
|
||||||
|
start-some-process:
|
||||||
|
cmd: start-server
|
||||||
|
hosts:
|
||||||
|
- prod-1
|
||||||
|
- prod-2
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### shell
|
||||||
|
|
||||||
|
If shell is defined, the command will run in the specified shell.
|
||||||
|
Make sure to escape any shell input.
|
||||||
|
|
||||||
|
### scriptEnvFile
|
||||||
|
|
||||||
|
Path to a file.
|
||||||
|
|
||||||
|
When type is `script` or `scriptFile` , the script is appended to this file.
|
||||||
|
|
||||||
|
This is useful for specifying environment variables or other things so they don't have to be included in the script.
|
||||||
|
|
||||||
|
### type
|
||||||
|
|
||||||
|
The following options are available:
|
||||||
|
|
||||||
|
| name | description |
|
||||||
|
| --- | --- |
|
||||||
|
| script | `cmd` is used as the script |
|
||||||
|
| scriptFile | Can only be run on a host. `cmd` is read and used as the script, and `scriptEnvFile` can be used to add env variables |
|
||||||
|
| package | Run package operations. See [dedicated page](/config/packages) for configuring package commands |
|
||||||
|
| user | Run user operations. See [dedicated page](/config/user-commands) for configuring package commands |
|
||||||
|
|
||||||
|
### environment
|
||||||
|
|
||||||
|
The environment variables support expansion:
|
||||||
|
|
||||||
|
- using escaped values `$VAR` or `${VAR}`
|
||||||
|
- using any external directive, and if using the env directive, the variable will be read from a `.env` file
|
||||||
|
|
||||||
|
<!-- For now, the variables expanded have to be defined in an `.env` file in the same directory that the program is run from. -->
|
||||||
|
|
||||||
|
If using it with host specified, the SSH server has to be configured to accept those env variables.
|
||||||
|
|
||||||
|
If the command is run locally, the OS's environment is added.
|
||||||
|
|
||||||
|
### hooks
|
||||||
|
|
||||||
|
Hooks are run after the command is run.
|
||||||
|
|
||||||
|
Errors are run if the command errors, success if it returns no error. Final hooks are run regardless of error condition.
|
||||||
|
|
||||||
|
Values for hooks are as follows:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
command:
|
||||||
|
hook:
|
||||||
|
# these commands are defined elsewhere in the file
|
||||||
|
error:
|
||||||
|
- errcommand
|
||||||
|
success:
|
||||||
|
- successcommand
|
||||||
|
final:
|
||||||
|
- donecommand
|
||||||
|
```
|
||||||
|
|
||||||
|
### packages
|
||||||
|
|
||||||
|
See the [dedicated page](/config/packages) for package configuration.
|
||||||
16
docs/content/config/packages.md → docs/content/config/commands/packages.md
Normal file → Executable file
16
docs/content/config/packages.md → docs/content/config/commands/packages.md
Normal file → Executable file
@@ -1,16 +1,17 @@
|
|||||||
---
|
---
|
||||||
title: "Packages"
|
title: "Packages"
|
||||||
weight: 2
|
weight: 2
|
||||||
|
description: This is dedicated to package commands.
|
||||||
---
|
---
|
||||||
|
|
||||||
This is dedicated to `package` commands. The command `type` field must be `package`. Package is a type that allows one to perform package operations. There are several additional options available when `type` is `package`:
|
This is dedicated to `package` commands. The command `type` field must be `package`. Package is a type that allows one to perform package operations. There are several additional options available when `type` is `package`:
|
||||||
|
|
||||||
| name | notes | type | required |
|
| name | notes | type | required |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| `packageName` | The name of a package to be modified. | `string` | yes |
|
| `packageName` | The name of a package to be modified. | `[]packagemanagercommon.Package` | yes |
|
||||||
| `packageManager` | The name of the package manger to be used. | `string` | yes |
|
| `packageManager` | The name of the package manger to be used. | `string` | yes |
|
||||||
| `packageOperation` | The type of operation to be perform. | `string` | yes |
|
| `packageOperation` | The type of operation to perform. | `string` | yes |
|
||||||
| `packageVersion` | The version of a package to be modified. | `string` | no |
|
| `packageVersion` | The version of a package. | `string` | no |
|
||||||
|
|
||||||
|
|
||||||
#### example
|
#### example
|
||||||
@@ -21,7 +22,9 @@ The following is an example of a package command:
|
|||||||
update-docker:
|
update-docker:
|
||||||
type: package
|
type: package
|
||||||
shell: zsh
|
shell: zsh
|
||||||
packageName: docker-ce
|
packages:
|
||||||
|
- name: docker-ce
|
||||||
|
version: 10
|
||||||
packageManager: apt
|
packageManager: apt
|
||||||
packageOperation: install
|
packageOperation: install
|
||||||
host: debian-based-host
|
host: debian-based-host
|
||||||
@@ -34,6 +37,7 @@ The following package operations are supported:
|
|||||||
- `install`
|
- `install`
|
||||||
- `remove`
|
- `remove`
|
||||||
- `upgrade`
|
- `upgrade`
|
||||||
|
- `checkVersion`
|
||||||
|
|
||||||
#### packageManager
|
#### packageManager
|
||||||
|
|
||||||
@@ -45,11 +49,11 @@ The following package managers are recognized:
|
|||||||
|
|
||||||
#### package command args
|
#### package command args
|
||||||
|
|
||||||
You can add additional arguments using the standard `Args` key. This is useful for adding more packages.
|
You can add additional arguments using the standard `Args` key. This is useful for adding more packages, yet it does not work with `checkVersion`.
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
The PackageManager interface provides an easy to enforce functions and options. There are two interfaces, `PackageManager` and `ConfigurablePackageManager` in the directory `pkg/pkgman`. Go's import-cycle "feature" caused me to implement functional options using a third interface. `PackageManagerOption`is a function that takes an interface.
|
The PackageManager interface provides an easy way to enforce functions and options. There are two interfaces, `PackageManager` and `ConfigurablePackageManager` in the directory `pkg/pkgman`. Go's import-cycle "feature" caused me to implement functional options using a third interface. `PackageManagerOption`is a function that takes an interface.
|
||||||
|
|
||||||
#### PackageManager
|
#### PackageManager
|
||||||
|
|
||||||
66
docs/content/config/commands/user-commands.md
Executable file
66
docs/content/config/commands/user-commands.md
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
title: "User commands"
|
||||||
|
weight: 2
|
||||||
|
description: This is dedicated to user commands.
|
||||||
|
---
|
||||||
|
|
||||||
|
This is dedicated to `user` commands. The command `type` field must be `user`. User is a type that allows one to perform user operations. There are several additional options available when `type` is `user`:
|
||||||
|
|
||||||
|
| name | notes | type | required | External directive support
|
||||||
|
| ----------------| -------------------------------------------------------------| ---------- | ---------| --------------------------|
|
||||||
|
| `userName` | The name of a user to be configured. | `string` | yes | no |
|
||||||
|
| `userOperation` | The type of operation to perform. | `string` | yes | no |
|
||||||
|
| `userID` | The user ID to use. | `string` | no | no |
|
||||||
|
| `userGroups` | The groups the user should be added to. | `[]string` | no | no |
|
||||||
|
| `systemUser` | Create a system user. | `bool` | no | no |
|
||||||
|
| `userCreateHome`| Create the home directory. | `bool` | no | no |
|
||||||
|
| `userSshPubKeys`| The keys to add to the user's authorized keys. | `[]string` | no | yes |
|
||||||
|
| `userShell` | The shell for the user. | `string` | no | no |
|
||||||
|
| `userHome` | The user's home directory. | `string` | no | no |
|
||||||
|
| `userPassword` | The new password value when using the `password` operation. | `string` | no | yes |
|
||||||
|
|
||||||
|
|
||||||
|
#### example
|
||||||
|
|
||||||
|
The following is an example of a package command:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
addUser:
|
||||||
|
name: add user backy with custom home dir
|
||||||
|
type: user
|
||||||
|
userName: backy
|
||||||
|
userHome: /opt/backy
|
||||||
|
userOperation: add
|
||||||
|
host: some-host
|
||||||
|
```
|
||||||
|
|
||||||
|
#### userOperation
|
||||||
|
|
||||||
|
The following package operations are supported:
|
||||||
|
|
||||||
|
- `add`
|
||||||
|
- `remove`
|
||||||
|
- `modify`
|
||||||
|
- `password`
|
||||||
|
- `checkIfExists`
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
The UserManager interface provides an way easy to add new commands. There is one interface `Usermanager` in directory `pkg/usermanager`.
|
||||||
|
|
||||||
|
#### UserManager
|
||||||
|
|
||||||
|
```go
|
||||||
|
// UserManager defines the interface for user management operations.
|
||||||
|
// All functions but one return a string for the command and any args.
|
||||||
|
type UserManager interface {
|
||||||
|
AddUser(username, homeDir, shell string, isSystem bool, groups, args []string) (string, []string)
|
||||||
|
RemoveUser(username string) (string, []string)
|
||||||
|
ModifyUser(username, homeDir, shell string, groups []string) (string, []string)
|
||||||
|
// Modify password uses chpasswd for Linux systems to build the command to change the password
|
||||||
|
// Should return a password as the last argument
|
||||||
|
// TODO: refactor when adding more systems instead of Linux
|
||||||
|
ModifyPassword(username, password string) (string, *strings.Reader, string)
|
||||||
|
UserExists(username string) (string, []string)
|
||||||
|
}
|
||||||
|
```
|
||||||
15
docs/content/config/directives.md
Executable file
15
docs/content/config/directives.md
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "External Directives"
|
||||||
|
weight: 2
|
||||||
|
description: How to set up external directives.
|
||||||
|
---
|
||||||
|
|
||||||
|
External directives are for including data that should not be in the config file. The following directives are supported:
|
||||||
|
|
||||||
|
- `%{file:path/to/file}%`
|
||||||
|
- `%{env:ENV_VAR}%`
|
||||||
|
- `%{vault:vault-key}%`
|
||||||
|
|
||||||
|
See the docs of each command if the field is supported.
|
||||||
|
|
||||||
|
If the file path does not begin with a `/`, the config file's directory will be used as the starting point.
|
||||||
24
docs/content/config/hosts.md
Executable file
24
docs/content/config/hosts.md
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
title: "Hosts"
|
||||||
|
weight: 2
|
||||||
|
description: >
|
||||||
|
This page tells you how to use hosts.
|
||||||
|
---
|
||||||
|
|
||||||
|
| Key | Description | Type | Required | External directive support |
|
||||||
|
|----------------------|---------------------------------------------------------------|----------|----------|----------------------------|
|
||||||
|
| `OS` | Operating system of the host (used for package commands) | `string` | no | No |
|
||||||
|
| `config` | Path to the SSH config file | `string` | no | No |
|
||||||
|
| `host` | Specifies the `Host` ssh_config(5) directive | `string` | yes | No |
|
||||||
|
| `hostname` | Hostname of the host | `string` | no | No |
|
||||||
|
| `knownHostsFile` | Path to the known hosts file | `string` | no | No |
|
||||||
|
| `port` | Port number to connect to | `uint16` | no | No |
|
||||||
|
| `proxyjump` | Proxy jump hosts, comma-separated | `string` | no | No |
|
||||||
|
| `password` | Password for SSH authentication | `string` | no | No |
|
||||||
|
| `privateKeyPath` | Path to the private key file | `string` | no | No |
|
||||||
|
| `privateKeyPassword` | Password for the private key file | `string` | no | Yes |
|
||||||
|
| `user` | Username for SSH authentication | `string` | no | No |
|
||||||
|
|
||||||
|
## exec host subcommand
|
||||||
|
|
||||||
|
Backy has a subcommand `exec host`. This subcommand takes the flags of `-m host1 -m host2`. The commands can also be specified by `-c command1 -c command2`.
|
||||||
29
docs/content/config/notifications.md
Normal file → Executable file
29
docs/content/config/notifications.md
Normal file → Executable file
@@ -5,6 +5,7 @@ description: >
|
|||||||
This page tells you how to get set up Backy notifications.
|
This page tells you how to get set up Backy notifications.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Notifications are only configurable for command lists, as of right now.
|
||||||
|
|
||||||
Notifications can be sent on command list completion and failure.
|
Notifications can be sent on command list completion and failure.
|
||||||
|
|
||||||
@@ -38,23 +39,23 @@ There must be a section with an id (eg. `mail.test-svr`) following one of these
|
|||||||
|
|
||||||
### mail
|
### mail
|
||||||
|
|
||||||
| key | description | type
|
| key | description | type | External directive support |
|
||||||
| --- | --- | ---
|
| --- | --- | --- | --- |
|
||||||
| `host` | Specifies the SMTP host to connect to | `string`
|
| `host` | Specifies the SMTP host to connect to | `string` | no
|
||||||
| `port` | Specifies the SMTP port | `uint16`
|
| `port` | Specifies the SMTP port | `uint16` | no
|
||||||
| `senderaddress` | Address from which to send mail | `string`
|
| `senderaddress` | Address from which to send mail | `string` | no
|
||||||
| `to` | Recipients to send emails to | `[]string`
|
| `to` | Recipients to send emails to | `[]string` | no
|
||||||
| `username` | SMTP username | `string`
|
| `username` | SMTP username | `string` | no
|
||||||
| `password` | SMTP password | `string`
|
| `password` | SMTP password | `string` | yes
|
||||||
|
|
||||||
### matrix
|
### matrix
|
||||||
|
|
||||||
| key | description | type
|
| key | description | type | External directive support |
|
||||||
| --- | --- | ---
|
| --- | --- | ---| ---- |
|
||||||
| `home-server` | Specifies the Matrix server connect to | `string`
|
| `home-server` | Specifies the Matrix server connect to | `string` | no
|
||||||
| `room-id` | Specifies the room ID of the room to send messages to | `string`
|
| `room-id` | Specifies the room ID of the room to send messages to | `string` | no
|
||||||
| `access-token` | Matrix access token | `string`
|
| `access-token` | Matrix access token | `string` | yes
|
||||||
| `user-id` | Matrix user ID | `string`
|
| `user-id` | Matrix user ID | `string` | no
|
||||||
|
|
||||||
To get your access token (assumes you are using [Element](https://element.io/)) :
|
To get your access token (assumes you are using [Element](https://element.io/)) :
|
||||||
|
|
||||||
|
|||||||
21
docs/content/config/remote-resources.md
Executable file
21
docs/content/config/remote-resources.md
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: "Remote resources"
|
||||||
|
weight: 2
|
||||||
|
description: This is dedicated to configuring remote resources.
|
||||||
|
---
|
||||||
|
|
||||||
|
Remote resources can be used for a lot of things, including config files and scripts.
|
||||||
|
|
||||||
|
## Config file
|
||||||
|
|
||||||
|
For the main config file to be fetched remotely, pass the URL using `-f [url]`.
|
||||||
|
|
||||||
|
If using S3, you should use the s3 protocol URI: `s3://bucketName/key/path`. You will also need to set the env variable `S3_ENDPOINT` to the appropriate value. The flag `--s3-endpoint` can be used to override this value or to set this value, if not already set.
|
||||||
|
|
||||||
|
## Authentication
|
||||||
|
|
||||||
|
Currently, only the AWS authentication credentials file `~/.aws/credentials` is supported. For now, the environment variable `AWS_PROFILE` is used to lookup the profile.
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
|
||||||
|
Remote script support is currently limited to http/https endpoints.
|
||||||
15
docs/content/config/vault.md
Normal file → Executable file
15
docs/content/config/vault.md
Normal file → Executable file
@@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: "Vault"
|
title: "Vault"
|
||||||
weight: 4
|
weight: 4
|
||||||
|
description: Set up and configure vault.
|
||||||
---
|
---
|
||||||
|
|
||||||
[Vault](https://www.vaultproject.io/) is a tool for storing secrets and other data securely.
|
[Vault](https://www.vaultproject.io/) is a tool for storing secrets and other data securely.
|
||||||
|
|
||||||
Vault config can be used by prefixing `vault:` in front of a password or ENV var.
|
A Vault key can be used by prefixing `%{vault:vault.keys.name}%` in a field that supports external directives.
|
||||||
|
|
||||||
This is the object in the config file:
|
This is the object in the config file:
|
||||||
|
|
||||||
@@ -17,10 +18,12 @@ vault:
|
|||||||
keys:
|
keys:
|
||||||
- name: mongourl
|
- name: mongourl
|
||||||
mountpath: secret
|
mountpath: secret
|
||||||
|
key: data
|
||||||
path: mongo/url
|
path: mongo/url
|
||||||
type: # KVv1 or KVv2
|
type: KVv2 # KVv1 or KVv2
|
||||||
- name:
|
- name: someKeyName
|
||||||
path:
|
mountpath: secret
|
||||||
type:
|
key: keyData
|
||||||
mountpath:
|
type: KVv2
|
||||||
|
path: some/path
|
||||||
```
|
```
|
||||||
|
|||||||
108
docs/content/examples/backy.yaml
Executable file
108
docs/content/examples/backy.yaml
Executable file
@@ -0,0 +1,108 @@
|
|||||||
|
commands:
|
||||||
|
stop-docker-container:
|
||||||
|
cmd: docker
|
||||||
|
Args:
|
||||||
|
- compose
|
||||||
|
- -f /some/path/to/docker-compose.yaml
|
||||||
|
- down
|
||||||
|
# if host is not defined, cmd will be run locally
|
||||||
|
host: some-host
|
||||||
|
hooks:
|
||||||
|
final:
|
||||||
|
- hostname
|
||||||
|
error:
|
||||||
|
- hostname
|
||||||
|
backup-docker-container-script:
|
||||||
|
cmd: /path/to/script
|
||||||
|
# The host has to be defined in the config file
|
||||||
|
host: some-host
|
||||||
|
environment:
|
||||||
|
- FOO=BAR
|
||||||
|
- APP=$VAR
|
||||||
|
shell-cmd:
|
||||||
|
cmd: rsync
|
||||||
|
shell: bash
|
||||||
|
Args:
|
||||||
|
- -av some-host:/path/to/data ~/Docker/Backups/docker-data
|
||||||
|
hostname:
|
||||||
|
cmd: hostname
|
||||||
|
update-docker:
|
||||||
|
type: package
|
||||||
|
shell: zsh # best to run package commands in a shell
|
||||||
|
packageName: docker-ce
|
||||||
|
Args:
|
||||||
|
- docker-ce-cli
|
||||||
|
packageManager: apt
|
||||||
|
packageOperation: install
|
||||||
|
update-dockerApt:
|
||||||
|
# type: package
|
||||||
|
shell: zsh
|
||||||
|
cmd: apt
|
||||||
|
Args:
|
||||||
|
- update
|
||||||
|
- "&&"
|
||||||
|
- apt install -y docker-ce
|
||||||
|
- docker-ce-cli
|
||||||
|
packageManager: apt
|
||||||
|
packageOperation: install
|
||||||
|
|
||||||
|
cmd-lists:
|
||||||
|
cmds-to-run: # this can be any name you want
|
||||||
|
# all commands have to be defined
|
||||||
|
order:
|
||||||
|
- stop-docker-container
|
||||||
|
- backup-docker-container-script
|
||||||
|
- shell-cmd
|
||||||
|
- hostname
|
||||||
|
notifications:
|
||||||
|
- matrix.matrix
|
||||||
|
name: backup-some-server
|
||||||
|
cron: "0 0 1 * * *"
|
||||||
|
hostname:
|
||||||
|
name: hostname
|
||||||
|
order:
|
||||||
|
- hostname
|
||||||
|
notifications:
|
||||||
|
- mail.prod-email
|
||||||
|
|
||||||
|
hosts:
|
||||||
|
# any ssh_config(5) keys/values not listed here will be looked up in the config file or the default config file
|
||||||
|
some-host:
|
||||||
|
hostname: some-hostname
|
||||||
|
config: ~/.ssh/config
|
||||||
|
user: user
|
||||||
|
privateKeyPath: /path/to/private/key
|
||||||
|
port: 22
|
||||||
|
# can also be env:VAR
|
||||||
|
password: file:/path/to/file
|
||||||
|
# only one is supported for now
|
||||||
|
proxyjump: some-proxy-host
|
||||||
|
|
||||||
|
# optional
|
||||||
|
logging:
|
||||||
|
verbose: true
|
||||||
|
file: ./backy.log
|
||||||
|
console: false
|
||||||
|
cmd-std-out: false
|
||||||
|
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
mail:
|
||||||
|
prod-email:
|
||||||
|
id: prod-email
|
||||||
|
type: mail
|
||||||
|
host: yourhost.tld
|
||||||
|
port: 587
|
||||||
|
senderAddress: email@domain.tld
|
||||||
|
to:
|
||||||
|
- admin@domain.tld
|
||||||
|
username: smtp-username@domain.tld
|
||||||
|
password: your-password-here
|
||||||
|
matrix:
|
||||||
|
matrix:
|
||||||
|
id: matrix
|
||||||
|
type: matrix
|
||||||
|
home-server: your-home-server.tld
|
||||||
|
room-id: room-id
|
||||||
|
access-token: your-access-token
|
||||||
|
user-id: your-user-id
|
||||||
24
docs/content/examples/example.yml
Executable file
24
docs/content/examples/example.yml
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
commands:
|
||||||
|
stop-docker-container:
|
||||||
|
cmd: docker
|
||||||
|
Args:
|
||||||
|
- compose
|
||||||
|
- -f /some/path/to/docker-compose.yaml
|
||||||
|
- down
|
||||||
|
# if host is not defined, command will be run locally
|
||||||
|
# The host has to be defined in either the config file or the SSH Config files
|
||||||
|
host: some-host
|
||||||
|
hooks:
|
||||||
|
error:
|
||||||
|
- some-other-command-when-failing
|
||||||
|
success:
|
||||||
|
- success-command
|
||||||
|
final:
|
||||||
|
- final-command
|
||||||
|
backup-docker-container-script:
|
||||||
|
cmd: /path/to/local/script
|
||||||
|
# script file is input as stdin to SSH
|
||||||
|
type: scriptFile # also can be script
|
||||||
|
environment:
|
||||||
|
- FOO=BAR
|
||||||
|
- APP=$VAR
|
||||||
0
docs/content/getting-started/_index.md
Normal file → Executable file
0
docs/content/getting-started/_index.md
Normal file → Executable file
12
docs/content/getting-started/config.md
Normal file → Executable file
12
docs/content/getting-started/config.md
Normal file → Executable file
@@ -48,7 +48,7 @@ commands:
|
|||||||
To execute groups of commands in sequence, use a list configuration.
|
To execute groups of commands in sequence, use a list configuration.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
cmd-lists:
|
cmdLists:
|
||||||
cmds-to-run: # this can be any name you want
|
cmds-to-run: # this can be any name you want
|
||||||
# all commands have to be defined in the commands section
|
# all commands have to be defined in the commands section
|
||||||
order:
|
order:
|
||||||
@@ -97,7 +97,7 @@ hosts:
|
|||||||
|
|
||||||
The notifications object can have two forms.
|
The notifications object can have two forms.
|
||||||
|
|
||||||
For more, [see the notification object documentation](/config/notifications). The top-level map key is id that has to be referenced by the `cmd-lists` key `notifications`.
|
For more, [see the notification object documentation](/config/notifications). The top-level map key is id that has to be referenced by the `cmdLists` key `notifications`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
notifications:
|
notifications:
|
||||||
@@ -124,13 +124,13 @@ notifications:
|
|||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
cmd-std-out controls whether commands output is echoed to StdOut.
|
`cmd-std-out` controls whether commands output is echoed to StdOut.
|
||||||
|
|
||||||
If logfile is not defined, the log file will be written to the config directory in the file `backy.log`.
|
If `logfile` is not defined, the log file will be written to the config directory in the file `backy.log`.
|
||||||
|
|
||||||
`console-disabled` controls whether the logging messages are echoed to StdOut. Default is false.
|
`console-disabled` controls whether the logging messages are echoed to StdOut. Default is false.
|
||||||
|
|
||||||
`verbose` basically does nothing as all necessary info is already output.
|
`verbose` prints out debugging messages.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
logging:
|
logging:
|
||||||
@@ -144,7 +144,7 @@ logging:
|
|||||||
|
|
||||||
[Vault](https://www.vaultproject.io/) can be used to get some configuration values and ENV variables securely.
|
[Vault](https://www.vaultproject.io/) can be used to get some configuration values and ENV variables securely.
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
vault:
|
vault:
|
||||||
token: hvs.tXqcASvTP8wg92f7riyvGyuf
|
token: hvs.tXqcASvTP8wg92f7riyvGyuf
|
||||||
address: http://127.0.0.1:8200
|
address: http://127.0.0.1:8200
|
||||||
|
|||||||
0
docs/content/getting-started/install.md
Normal file → Executable file
0
docs/content/getting-started/install.md
Normal file → Executable file
0
docs/content/repositories/_index.md
Normal file → Executable file
0
docs/content/repositories/_index.md
Normal file → Executable file
4
docs/go.mod
Normal file → Executable file
4
docs/go.mod
Normal file → Executable file
@@ -3,6 +3,6 @@ module git.andrewnw.xyz/CyberShell/backy/docs
|
|||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20250103114405-80e448e5bdaa // indirect
|
github.com/McShelby/hugo-theme-relearn v0.0.0-20251115105808-d9ca8e8d8f59 // indirect
|
||||||
github.com/divinerites/plausible-hugo v1.21.1 // indirect
|
github.com/divinerites/plausible-hugo v1.22.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
14
docs/go.sum
Normal file → Executable file
14
docs/go.sum
Normal file → Executable file
@@ -1,10 +1,4 @@
|
|||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20230209073138-890d12ea922d h1:weq1mrQ/qNAvGrNgvZVL1K8adbT3bswZf2ABLr/LCIA=
|
github.com/McShelby/hugo-theme-relearn v0.0.0-20251115105808-d9ca8e8d8f59 h1:mnEjz/Wrpv6Hea26KeFJPx94w9g9ZHIurUEWvPdaEvs=
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20230209073138-890d12ea922d/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
|
github.com/McShelby/hugo-theme-relearn v0.0.0-20251115105808-d9ca8e8d8f59/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20241210183303-16d4de84becf h1:bMx4kwM7Q+dAzvSOWs3XWZ25o+n4mI0GPHqzbzeWb3M=
|
github.com/divinerites/plausible-hugo v1.22.0 h1:2pZheSaIMc+EtwcEeZv0ioU2qBOEZa1Ii7IaR/9II9k=
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20241210183303-16d4de84becf/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
|
github.com/divinerites/plausible-hugo v1.22.0/go.mod h1:cxr+YB3FUwbLon8KCs4pV4Ankbkq6lJxTQUpNb5KqPo=
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20250102210630-dd0597ffa4b2 h1:sWaC1/dL65v3iRvblEAaBLpKC5TIT0R9JASk1hZNET8=
|
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20250102210630-dd0597ffa4b2/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
|
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20250103114405-80e448e5bdaa h1:G+OnMEzK4XOzbbcf1SmaGyOYJ0h5idp/IJdguWs8ioU=
|
|
||||||
github.com/McShelby/hugo-theme-relearn v0.0.0-20250103114405-80e448e5bdaa/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
|
|
||||||
github.com/divinerites/plausible-hugo v1.21.1 h1:ZTWwjhZ0PmLMacCVGlcGiYFEZW7VaYE767tchDskOug=
|
|
||||||
github.com/divinerites/plausible-hugo v1.21.1/go.mod h1:cxr+YB3FUwbLon8KCs4pV4Ankbkq6lJxTQUpNb5KqPo=
|
|
||||||
|
|||||||
19
docs/layouts/_default/baseof.html
Normal file → Executable file
19
docs/layouts/_default/baseof.html
Normal file → Executable file
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
{{- block "storeOutputFormat" . }}{{ end }}
|
{{- block "storeOutputFormat" . }}{{ end }}
|
||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
{{- $hugoVersion := "0.126.0" }}
|
{{- $hugoVersion := "0.141.0" }}
|
||||||
{{- if lt hugo.Version $hugoVersion }}
|
{{- if lt hugo.Version $hugoVersion }}
|
||||||
{{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }}
|
{{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -36,12 +36,12 @@
|
|||||||
{{ (printf $link (partial "permalink.gotmpl" (dict "to" .)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
|
{{ (printf $link (partial "permalink.gotmpl" (dict "to" .)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- partialCached "favicon.html" . }}
|
{{- partialCached "favicon.html" . }}
|
||||||
{{- partial "stylesheet.html" . }}
|
{{- partial "dependencies.html" (dict "page" . "location" "header") }}
|
||||||
{{- partial "dependencies.gotmpl" (dict "page" . "location" "header") }}
|
|
||||||
{{- partial "custom-header.html" . }}
|
{{- partial "custom-header.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "permalink.gotmpl" (dict "to" .) }}">
|
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "permalink.gotmpl" (dict "to" .) }}">
|
||||||
<div id="R-body" class="default-animation">
|
<div id="R-body" class="default-animation">
|
||||||
<div id="R-body-overlay"></div>
|
<div id="R-body-overlay"></div>
|
||||||
<nav id="R-topbar">
|
<nav id="R-topbar">
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
{{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
|
{{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
|
||||||
{{- if $showBreadcrumb }}
|
{{- if $showBreadcrumb }}
|
||||||
<ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList">
|
<ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList">
|
||||||
{{- partial "breadcrumbs.html" (dict "page" .) }}
|
{{- partial "breadcrumbs.html" (dict "page" . "schema" true) }}
|
||||||
</ol>
|
</ol>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span class="topbar-breadcrumbs highlightable">
|
<span class="topbar-breadcrumbs highlightable">
|
||||||
@@ -74,11 +74,8 @@
|
|||||||
{{- partial "custom-comments.html" . }}
|
{{- partial "custom-comments.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{- block "menu" . }}{{ end }}
|
{{- block "menu" . }}{{ end }}
|
||||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
|
||||||
<script src="{{"js/clipboard.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
{{- partial "dependencies.gotmpl" (dict "page" . "location" "footer") }}
|
|
||||||
<script src="{{"js/theme.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
{{- partial "custom-footer.html" . }}
|
{{- partial "custom-footer.html" . }}
|
||||||
|
<div id="toast-container" role="status" aria-live="polite" aria-atomic="false"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
0
docs/layouts/partials/logo.html
Normal file → Executable file
0
docs/layouts/partials/logo.html
Normal file → Executable file
3
docs/layouts/shortcodes/code.html
Executable file
3
docs/layouts/shortcodes/code.html
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
{{ $file := .Get "file" | readFile }}
|
||||||
|
{{ $lang := .Get "language" }}
|
||||||
|
{{ (print "```" $lang "\n" $file "\n```") }}
|
||||||
2
docs/themes/hugo-theme-relearn
vendored
2
docs/themes/hugo-theme-relearn
vendored
Submodule docs/themes/hugo-theme-relearn updated: 80e448e5bd...528984250a
0
docs/vangen.json
Normal file → Executable file
0
docs/vangen.json
Normal file → Executable file
0
docs/vangen/backy/index.html
Normal file → Executable file
0
docs/vangen/backy/index.html
Normal file → Executable file
22
examples/backy.yaml
Normal file → Executable file
22
examples/backy.yaml
Normal file → Executable file
@@ -28,9 +28,25 @@ commands:
|
|||||||
cmd: hostname
|
cmd: hostname
|
||||||
update-docker:
|
update-docker:
|
||||||
type: package
|
type: package
|
||||||
|
shell: zsh # best to run package commands in a shell
|
||||||
|
packages:
|
||||||
|
- name: docker-ce
|
||||||
|
version: latest
|
||||||
|
- name: docker-ce-cli
|
||||||
|
version: latest
|
||||||
packageManager: apt
|
packageManager: apt
|
||||||
packageName: docker-ce
|
packageOperation: install
|
||||||
packageVersion: "5:27.4.1-1~debian.12~bookworm"
|
update-dockerApt:
|
||||||
|
# type: package
|
||||||
|
shell: zsh
|
||||||
|
cmd: apt
|
||||||
|
packages:
|
||||||
|
- name: docker-ce
|
||||||
|
version: latest
|
||||||
|
- name: docker-ce-cli
|
||||||
|
version: latest
|
||||||
|
packageManager: apt
|
||||||
|
packageOperation: install
|
||||||
|
|
||||||
cmd-lists:
|
cmd-lists:
|
||||||
cmds-to-run: # this can be any name you want
|
cmds-to-run: # this can be any name you want
|
||||||
@@ -67,7 +83,7 @@ hosts:
|
|||||||
# optional
|
# optional
|
||||||
logging:
|
logging:
|
||||||
verbose: true
|
verbose: true
|
||||||
file: /path/to/logs/commands.log
|
file: ./backy.log
|
||||||
console: false
|
console: false
|
||||||
cmd-std-out: false
|
cmd-std-out: false
|
||||||
|
|
||||||
|
|||||||
25
examples/example.yml
Executable file
25
examples/example.yml
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
commands:
|
||||||
|
stop-docker-container:
|
||||||
|
cmd: docker
|
||||||
|
Args:
|
||||||
|
- compose
|
||||||
|
- -f /some/path/to/docker-compose.yaml
|
||||||
|
- down
|
||||||
|
# if host is not defined, command will be run locally
|
||||||
|
# The host has to be defined in either the config file or the SSH Config files
|
||||||
|
hosts:
|
||||||
|
- prod
|
||||||
|
hooks:
|
||||||
|
error:
|
||||||
|
- some-other-command-when-failing
|
||||||
|
success:
|
||||||
|
- success-command
|
||||||
|
final:
|
||||||
|
- final-command
|
||||||
|
backup-docker-container-script:
|
||||||
|
cmd: /path/to/local/script
|
||||||
|
# script file is input as stdin to SSH
|
||||||
|
type: scriptFile # also can be script
|
||||||
|
environment:
|
||||||
|
- FOO=BAR
|
||||||
|
- APP=$VAR
|
||||||
0
frontmatter.json
Normal file → Executable file
0
frontmatter.json
Normal file → Executable file
110
getCommandHelp
110
getCommandHelp
@@ -1,67 +1,83 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CLI_PAGE="docs/content/cli/_index.md"
|
CLI_PAGE="docs/content/cli/_index.md"
|
||||||
|
|
||||||
|
BACKYCOMMAND="go run backy.go"
|
||||||
|
|
||||||
|
{
|
||||||
echo "---
|
echo "---
|
||||||
title: "CLI"
|
title: CLI
|
||||||
weight: 4
|
weight: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
This page lists documentation for the CLI.
|
This page lists documentation for the CLI.
|
||||||
" > _index.md
|
"
|
||||||
|
|
||||||
BACKYCOMMAND="go run backy.go"
|
echo "## Backy "
|
||||||
|
echo " "
|
||||||
echo "## Backy " >> _index.md
|
echo "\`\`\`"
|
||||||
echo " " >> _index.md
|
eval "${BACKYCOMMAND} -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} -h >> _index.md"
|
echo " "
|
||||||
echo "\`\`\`" >> _index.md
|
|
||||||
echo " " >> _index.md
|
|
||||||
|
|
||||||
|
|
||||||
echo "# Subcommands" >> _index.md
|
|
||||||
echo "" >> _index.md
|
|
||||||
|
|
||||||
echo "## backup" >> _index.md
|
echo "# Subcommands"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
|
||||||
eval "${BACKYCOMMAND} backup -h >> _index.md"
|
|
||||||
echo "\`\`\`" >> _index.md
|
|
||||||
echo "" >> _index.md
|
|
||||||
|
|
||||||
echo "## cron" >> _index.md
|
echo "## backup"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} cron -h >> _index.md"
|
eval "${BACKYCOMMAND} backup -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
|
|
||||||
echo "## exec" >> _index.md
|
echo "## cron"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} exec -h >> _index.md"
|
eval "${BACKYCOMMAND} cron -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
|
|
||||||
echo "### exec host" >> _index.md
|
echo "## exec"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} exec host -h >> _index.md"
|
eval "${BACKYCOMMAND} exec -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
|
|
||||||
|
echo "### exec host"
|
||||||
|
echo ""
|
||||||
|
echo "\`\`\`"
|
||||||
|
eval "${BACKYCOMMAND} exec host -h"
|
||||||
|
echo "\`\`\`"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
echo "## version" >> _index.md
|
echo "## version"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} version -h >> _index.md"
|
eval "${BACKYCOMMAND} version -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
|
|
||||||
echo "## list" >> _index.md
|
echo "## list"
|
||||||
echo "" >> _index.md
|
echo ""
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
eval "${BACKYCOMMAND} list -h >> _index.md"
|
eval "${BACKYCOMMAND} list -h"
|
||||||
echo "\`\`\`" >> _index.md
|
echo "\`\`\`"
|
||||||
|
|
||||||
|
echo "## list cmds"
|
||||||
|
echo ""
|
||||||
|
echo "\`\`\`"
|
||||||
|
eval "${BACKYCOMMAND} list cmds -h"
|
||||||
|
echo "\`\`\`"
|
||||||
|
|
||||||
|
echo "## list lists"
|
||||||
|
echo ""
|
||||||
|
echo "\`\`\`"
|
||||||
|
eval "${BACKYCOMMAND} list lists -h"
|
||||||
|
echo "\`\`\`"
|
||||||
|
} >> _index.md
|
||||||
|
|
||||||
|
|
||||||
mv _index.md "$CLI_PAGE"
|
mv _index.md "$CLI_PAGE"
|
||||||
106
go.mod
Normal file → Executable file
106
go.mod
Normal file → Executable file
@@ -1,69 +1,99 @@
|
|||||||
module git.andrewnw.xyz/CyberShell/backy
|
module git.andrewnw.xyz/CyberShell/backy
|
||||||
|
|
||||||
go 1.20
|
go 1.23.0
|
||||||
|
|
||||||
replace git.andrewnw.xyz/CyberShell/backy => /home/andrew/Projects/backy
|
toolchain go1.23.7
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/go-co-op/gocron v1.33.1
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.83.0
|
||||||
github.com/hashicorp/vault/api v1.10.0
|
github.com/dmarkham/enumer v1.5.11
|
||||||
|
github.com/go-co-op/gocron v1.37.0
|
||||||
|
github.com/google/uuid v1.6.0
|
||||||
|
github.com/hashicorp/vault/api v1.20.0
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
github.com/kevinburke/ssh_config v1.2.0
|
github.com/kevinburke/ssh_config v1.2.0
|
||||||
github.com/knadh/koanf/parsers/yaml v0.1.0
|
github.com/knadh/koanf/parsers/yaml v1.1.0
|
||||||
github.com/knadh/koanf/providers/file v0.1.0
|
github.com/knadh/koanf/providers/rawbytes v1.0.0
|
||||||
github.com/knadh/koanf/v2 v2.0.1
|
github.com/knadh/koanf/v2 v2.2.2
|
||||||
github.com/mattn/go-isatty v0.0.19
|
github.com/mattn/go-isatty v0.0.20
|
||||||
github.com/nikoksr/notify v0.41.0
|
github.com/minio/minio-go/v7 v7.0.94
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
|
github.com/nikoksr/notify v1.3.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/rs/zerolog v1.30.0
|
github.com/pkg/sftp v1.13.9
|
||||||
github.com/spf13/cobra v1.7.0
|
github.com/rs/zerolog v1.34.0
|
||||||
golang.org/x/crypto v0.13.0
|
github.com/sethvargo/go-password v0.3.1
|
||||||
|
github.com/spf13/cobra v1.9.1
|
||||||
|
golang.org/x/crypto v0.40.0
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||||
maunium.net/go/mautrix v0.16.0
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
mvdan.cc/sh/v3 v3.7.0
|
maunium.net/go/mautrix v0.24.1
|
||||||
|
mvdan.cc/sh/v3 v3.12.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
|
filippo.io/edwards25519 v1.1.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2 v1.36.5 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.36 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.4 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.17 // indirect
|
||||||
|
github.com/aws/smithy-go v1.22.4 // indirect
|
||||||
|
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
|
github.com/go-ini/ini v1.67.0 // indirect
|
||||||
github.com/google/uuid v1.3.1 // indirect
|
github.com/go-jose/go-jose/v4 v4.1.1 // indirect
|
||||||
|
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
|
||||||
|
github.com/goccy/go-json v0.10.5 // indirect
|
||||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
|
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
|
||||||
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect
|
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
|
||||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
|
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
|
||||||
github.com/hashicorp/go-sockaddr v1.0.5 // indirect
|
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible // indirect
|
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible // indirect
|
||||||
github.com/knadh/koanf/maps v0.1.1 // indirect
|
github.com/klauspost/compress v1.18.0 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||||
|
github.com/knadh/koanf/maps v0.1.2 // indirect
|
||||||
|
github.com/kr/fs v0.1.0 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||||
|
github.com/minio/crc64nvme v1.0.2 // indirect
|
||||||
|
github.com/minio/md5-simd v1.1.2 // indirect
|
||||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||||
|
github.com/pascaldekloe/name v1.0.1 // indirect
|
||||||
|
github.com/philhofer/fwd v1.2.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
|
github.com/rs/xid v1.6.0 // indirect
|
||||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.6 // indirect
|
||||||
github.com/stretchr/objx v0.5.1 // indirect
|
github.com/stretchr/objx v0.5.2 // indirect
|
||||||
github.com/stretchr/testify v1.8.4 // indirect
|
github.com/stretchr/testify v1.10.0 // indirect
|
||||||
github.com/tidwall/gjson v1.16.0 // indirect
|
github.com/tidwall/gjson v1.18.0 // indirect
|
||||||
github.com/tidwall/match v1.1.1 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
github.com/tidwall/pretty v1.2.1 // indirect
|
github.com/tidwall/pretty v1.2.1 // indirect
|
||||||
github.com/tidwall/sjson v1.2.5 // indirect
|
github.com/tidwall/sjson v1.2.5 // indirect
|
||||||
go.mau.fi/util v0.0.0-20230906155759-14bad39a8718 // indirect
|
github.com/tinylib/msgp v1.3.0 // indirect
|
||||||
|
go.mau.fi/util v0.8.8 // indirect
|
||||||
go.uber.org/atomic v1.11.0 // indirect
|
go.uber.org/atomic v1.11.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||||
golang.org/x/net v0.15.0 // indirect
|
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc // indirect
|
||||||
golang.org/x/sync v0.3.0 // indirect
|
golang.org/x/mod v0.26.0 // indirect
|
||||||
golang.org/x/sys v0.12.0 // indirect
|
golang.org/x/net v0.42.0 // indirect
|
||||||
golang.org/x/text v0.13.0 // indirect
|
golang.org/x/sync v0.16.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/sys v0.34.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
golang.org/x/text v0.27.0 // indirect
|
||||||
maunium.net/go/maulogger/v2 v2.4.1 // indirect
|
golang.org/x/time v0.12.0 // indirect
|
||||||
|
golang.org/x/tools v0.35.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
298
go.sum
Normal file → Executable file
298
go.sum
Normal file → Executable file
@@ -1,54 +1,85 @@
|
|||||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M=
|
github.com/aws/aws-sdk-go-v2 v1.36.5 h1:0OF9RiEMEdDdZEMqF9MRjevyxAQcf6gY+E7vwBILFj0=
|
||||||
github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs=
|
github.com/aws/aws-sdk-go-v2 v1.36.5/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0=
|
||||||
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11 h1:12SpdwU8Djs+YGklkinSSlcrPyj3H4VifVsKf78KbwA=
|
||||||
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11/go.mod h1:dd+Lkp6YmMryke+qxW/VnKyhMBDTYP41Q2Bb+6gNZgY=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36/go.mod h1:Q1lnJArKRXkenyog6+Y+zr7WDpk4e6XlR6gs20bbeNo=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 h1:i2vNHQiXUvKhs3quBR6aqlgJaiaexz/aNvdCktW/kAM=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36/go.mod h1:UdyGa7Q91id/sdyHPwth+043HhmP6yP9MBHgbZM0xo8=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.36 h1:GMYy2EOWfzdP3wfVAGXBNKY5vK4K8vMET4sYOYltmqs=
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.36/go.mod h1:gDhdAV6wL3PmPqBhiPbnlS447GoWs8HTTOYef9/9Inw=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.4 h1:nAP2GYbfh8dd2zGZqFRSMlq+/F6cMPBUuCsGAMkN074=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.4/go.mod h1:LT10DsiGjLWh4GbjInf9LQejkYEhBgBCjLG5+lvk4EE=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 h1:t0E6FzREdtCsiLIoLCWsYliNsRBgyGD/MCK571qk4MI=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17/go.mod h1:ygpklyoaypuyDvOM5ujWGrYWpAK3h7ugnmKCU/76Ys4=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.17 h1:qcLWgdhq45sDM9na4cvXax9dyLitn8EYBRl8Ak4XtG4=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.17/go.mod h1:M+jkjBFZ2J6DJrjMv2+vkBbuht6kxJYtJiwoVgX4p4U=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.83.0 h1:5Y75q0RPQoAbieyOuGLhjV9P3txvYgXv2lg0UwJOfmE=
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.83.0/go.mod h1:kUklwasNoCn5YpyAqC/97r6dzTA1SRKJfKq16SXeoDU=
|
||||||
|
github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw=
|
||||||
|
github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
|
||||||
|
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||||
|
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
github.com/dmarkham/enumer v1.5.11 h1:quorLCaEfzjJ23Pf7PB9lyyaHseh91YfTM/sAD/4Mbo=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/dmarkham/enumer v1.5.11/go.mod h1:yixql+kDDQRYqcuBM2n9Vlt7NoT9ixgXhaXry8vmRg8=
|
||||||
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||||
github.com/go-co-op/gocron v1.33.1 h1:wjX+Dg6Ae29a/f9BSQjY1Rl+jflTpW9aDyMqseCj78c=
|
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||||
github.com/go-co-op/gocron v1.33.1/go.mod h1:NLi+bkm4rRSy1F8U7iacZOz0xPseMoIOnvabGoSe/no=
|
github.com/go-co-op/gocron v1.37.0 h1:ZYDJGtQ4OMhTLKOKMIch+/CY70Brbb1dGdooLEhh7b0=
|
||||||
github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo=
|
github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY=
|
||||||
github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
|
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
|
||||||
|
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||||
|
github.com/go-jose/go-jose/v4 v4.1.1 h1:JYhSgy4mXXzAdF3nUx3ygx347LRXJRrpgyU3adRmkAI=
|
||||||
|
github.com/go-jose/go-jose/v4 v4.1.1/go.mod h1:BdsZGqgdO3b6tTc6LSE56wcDbMMLuPsw5d4ZD5f94kA=
|
||||||
|
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
|
||||||
|
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
|
||||||
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
|
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
|
||||||
|
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||||
|
github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk=
|
||||||
|
github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||||
|
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||||
|
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||||
github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs=
|
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
|
||||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||||
github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA=
|
github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=
|
||||||
github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
|
github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=
|
||||||
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
|
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
|
||||||
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs=
|
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 h1:U+kC2dOhMFQctRfhK0gRctKAPTloZdMU5ZJxaesJ/VM=
|
||||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0/go.mod h1:Ll013mhdmsVDuoIXVfBtvgGJsXDYkTw1kooNcoCXuE0=
|
||||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U=
|
|
||||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts=
|
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts=
|
||||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
|
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
|
||||||
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
|
github.com/hashicorp/go-sockaddr v1.0.7 h1:G+pTkSO01HpR5qCxg7lxfsFEZaG+C0VssTy/9dbT+Fw=
|
||||||
github.com/hashicorp/go-sockaddr v1.0.5 h1:dvk7TIXCZpmfOlM+9mlcrWmWjw/wlKT+VDq2wMvfPJU=
|
github.com/hashicorp/go-sockaddr v1.0.7/go.mod h1:FZQbEYa1pxkQ7WLpyXJ6cbjpT8q0YgQaK/JakXqGyWw=
|
||||||
github.com/hashicorp/go-sockaddr v1.0.5/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI=
|
github.com/hashicorp/hcl v1.0.1-vault-7 h1:ag5OxFVy3QYTFTJODRzTKVZ6xvdfLLCA1cy/Y6xGI0I=
|
||||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
github.com/hashicorp/hcl v1.0.1-vault-7/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM=
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
github.com/hashicorp/vault/api v1.20.0 h1:KQMHElgudOsr+IbJgmbjHnCTxEpKs9LnozA1D3nozU4=
|
||||||
github.com/hashicorp/vault/api v1.10.0 h1:/US7sIjWN6Imp4o/Rj1Ce2Nr5bki/AXi9vAW3p2tOJQ=
|
github.com/hashicorp/vault/api v1.20.0/go.mod h1:GZ4pcjfzoOWpkJ3ijHNpEoAxKEsBJnVljyTe3jM2Sms=
|
||||||
github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8=
|
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
@@ -57,83 +88,97 @@ github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
|
|||||||
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
|
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
|
||||||
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
||||||
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||||
github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs=
|
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||||
github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI=
|
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||||
github.com/knadh/koanf/parsers/yaml v0.1.0 h1:ZZ8/iGfRLvKSaMEECEBPM1HQslrZADk8fP1XFUxVI5w=
|
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
github.com/knadh/koanf/parsers/yaml v0.1.0/go.mod h1:cvbUDC7AL23pImuQP0oRw/hPuccrNBS2bps8asS0CwY=
|
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||||
github.com/knadh/koanf/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf3ODrc//Lp+c=
|
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||||
github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA=
|
github.com/knadh/koanf/maps v0.1.2 h1:RBfmAW5CnZT+PJ1CVc1QSJKf4Xu9kxfQgYVQSu8hpbo=
|
||||||
github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g=
|
github.com/knadh/koanf/maps v0.1.2/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI=
|
||||||
github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus=
|
github.com/knadh/koanf/parsers/yaml v1.1.0 h1:3ltfm9ljprAHt4jxgeYLlFPmUaunuCgu1yILuTXRdM4=
|
||||||
|
github.com/knadh/koanf/parsers/yaml v1.1.0/go.mod h1:HHmcHXUrp9cOPcuC+2wrr44GTUB0EC+PyfN3HZD9tFg=
|
||||||
|
github.com/knadh/koanf/providers/rawbytes v1.0.0 h1:MrKDh/HksJlKJmaZjgs4r8aVBb/zsJyc/8qaSnzcdNI=
|
||||||
|
github.com/knadh/koanf/providers/rawbytes v1.0.0/go.mod h1:KxwYJf1uezTKy6PBtfE+m725NGp4GPVA7XoNTJ/PtLo=
|
||||||
|
github.com/knadh/koanf/v2 v2.2.2 h1:ghbduIkpFui3L587wavneC9e3WIliCgiCgdxYO/wd7A=
|
||||||
|
github.com/knadh/koanf/v2 v2.2.2/go.mod h1:abWQc0cBXLSF/PSOMCB/SK+T13NXDsPvOksbpi5e/9Q=
|
||||||
|
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
|
||||||
|
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
|
||||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
|
||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
|
github.com/minio/crc64nvme v1.0.2 h1:6uO1UxGAD+kwqWWp7mBFsi5gAse66C4NXO8cmcVculg=
|
||||||
|
github.com/minio/crc64nvme v1.0.2/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
|
||||||
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
|
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||||
|
github.com/minio/minio-go/v7 v7.0.94 h1:1ZoksIKPyaSt64AVOyaQvhDOgVC3MfZsWM6mZXRUGtM=
|
||||||
|
github.com/minio/minio-go/v7 v7.0.94/go.mod h1:71t2CqDt3ThzESgZUlU1rBN54mksGGlkLcFgguDnnAc=
|
||||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
|
||||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||||
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||||
github.com/nikoksr/notify v0.41.0 h1:4LGE41GpWdHX5M3Xo6DlWRwS2WLDbOq1Rk7IzY4vjmQ=
|
github.com/nikoksr/notify v1.3.0 h1:UxzfxzAYGQD9a5JYLBTVx0lFMxeHCke3rPCkfWdPgLs=
|
||||||
github.com/nikoksr/notify v0.41.0/go.mod h1:FoE0UVPeopz1Vy5nm9vQZ+JVmYjEIjQgbFstbkw+cRE=
|
github.com/nikoksr/notify v1.3.0/go.mod h1:Xor2hMmkvrCfkCKvXGbcrESez4brac2zQjhd6U2BbeM=
|
||||||
|
github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcMb0=
|
||||||
|
github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM=
|
||||||
|
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
|
||||||
|
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
|
||||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pkg/sftp v1.13.9 h1:4NGkvGudBL7GteO3m6qnaQ4pC0Kvf0onSVc9gR3EWBw=
|
||||||
|
github.com/pkg/sftp v1.13.9/go.mod h1:OBN7bVXdstkFFN/gdnHPUb5TE8eb8G1Rp9wCItqjkkA=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
|
||||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
||||||
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY=
|
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c=
|
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
|
||||||
github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w=
|
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
|
||||||
|
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
|
||||||
|
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
|
||||||
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
|
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
|
||||||
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
github.com/sethvargo/go-password v0.3.1 h1:WqrLTjo7X6AcVYfC6R7GtSyuUQR9hGyAj/f1PYQZCJU=
|
||||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
github.com/sethvargo/go-password v0.3.1/go.mod h1:rXofC1zT54N7R8K/h1WDUdkf9BOx5OptoxrMBcrXzvs=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
|
||||||
|
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||||
|
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0=
|
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||||
github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0=
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||||
github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg=
|
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
|
||||||
github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
||||||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||||
@@ -141,39 +186,100 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
|
|||||||
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||||
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
|
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
|
||||||
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
|
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
|
||||||
go.mau.fi/util v0.0.0-20230906155759-14bad39a8718 h1:hmm5bZqE0M8+Uvys0HJPCSbAIZIwYtTkBKYPjAWHuMM=
|
github.com/tinylib/msgp v1.3.0 h1:ULuf7GPooDaIlbyvgAxBV/FI7ynli6LZ1/nVUNu+0ww=
|
||||||
go.mau.fi/util v0.0.0-20230906155759-14bad39a8718/go.mod h1:AxuJUMCxpzgJ5eV9JbPWKRH8aAJJidxetNdUj7qcb84=
|
github.com/tinylib/msgp v1.3.0/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
|
go.mau.fi/util v0.8.8 h1:OnuEEc/sIJFhnq4kFggiImUpcmnmL/xpvQMRu5Fiy5c=
|
||||||
|
go.mau.fi/util v0.8.8/go.mod h1:Y/kS3loxTEhy8Vill513EtPXr+CRDdae+Xj2BXXMy/c=
|
||||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
||||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||||
|
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||||
|
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
|
|
||||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
|
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||||
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
|
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||||
|
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||||
|
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc h1:TS73t7x3KarrNd5qAipmspBDS1rkMcgVG/fS1aRb4Rc=
|
||||||
|
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
|
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
|
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
||||||
|
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
||||||
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||||
|
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||||
|
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||||
|
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
|
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
|
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
|
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||||
|
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
|
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||||
|
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
|
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
|
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||||
|
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||||
|
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||||
|
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||||
|
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
|
||||||
|
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||||
|
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||||
|
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||||
|
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||||
|
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
|
||||||
|
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
|
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||||
|
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
|
||||||
|
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
@@ -184,9 +290,7 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8=
|
maunium.net/go/mautrix v0.24.1 h1:09/xi4qTeA03g1n/DPmmqAlT8Cx4QrgwiPlmLVzA9AU=
|
||||||
maunium.net/go/maulogger/v2 v2.4.1/go.mod h1:omPuYwYBILeVQobz8uO3XC8DIRuEb5rXYlQSuqrbCho=
|
maunium.net/go/mautrix v0.24.1/go.mod h1:Xy6o+pXmbqmgWsUWh15EQ1eozjC+k/VT/7kloByv9PI=
|
||||||
maunium.net/go/mautrix v0.16.0 h1:iUqCzJE2yqBC1ddAK6eAn159My8rLb4X8g4SFtQh2Dk=
|
mvdan.cc/sh/v3 v3.12.0 h1:ejKUR7ONP5bb+UGHGEG/k9V5+pRVIyD+LsZz7o8KHrI=
|
||||||
maunium.net/go/mautrix v0.16.0/go.mod h1:XAjE9pTSGcr6vXaiNgQGiip7tddJ8FQV1a29u2QdBG4=
|
mvdan.cc/sh/v3 v3.12.0/go.mod h1:Se6Cj17eYSn+sNooLZiEUnNNmNxg0imoYlTu4CyaGyg=
|
||||||
mvdan.cc/sh/v3 v3.7.0 h1:lSTjdP/1xsddtaKfGg7Myu7DnlHItd3/M2tomOcNNBg=
|
|
||||||
mvdan.cc/sh/v3 v3.7.0/go.mod h1:K2gwkaesF/D7av7Kxl0HbF5kGOd2ArupNTX3X44+8l8=
|
|
||||||
|
|||||||
149
pkg/backy/allowedexternaldirectives_enumer.go
Normal file
149
pkg/backy/allowedexternaldirectives_enumer.go
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
// Code generated by "enumer -linecomment -yaml -text -json -type=AllowedExternalDirectives"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package backy
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
const _AllowedExternalDirectivesName = "DefaultExternalDirvaultvault-envvault-filevault-file-envfile-envfileenv"
|
||||||
|
|
||||||
|
var _AllowedExternalDirectivesIndex = [...]uint8{0, 18, 23, 32, 42, 56, 64, 68, 71}
|
||||||
|
|
||||||
|
const _AllowedExternalDirectivesLowerName = "defaultexternaldirvaultvault-envvault-filevault-file-envfile-envfileenv"
|
||||||
|
|
||||||
|
func (i AllowedExternalDirectives) String() string {
|
||||||
|
if i < 0 || i >= AllowedExternalDirectives(len(_AllowedExternalDirectivesIndex)-1) {
|
||||||
|
return fmt.Sprintf("AllowedExternalDirectives(%d)", i)
|
||||||
|
}
|
||||||
|
return _AllowedExternalDirectivesName[_AllowedExternalDirectivesIndex[i]:_AllowedExternalDirectivesIndex[i+1]]
|
||||||
|
}
|
||||||
|
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
func _AllowedExternalDirectivesNoOp() {
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[DefaultExternalDir-(0)]
|
||||||
|
_ = x[AllowedExternalDirectiveVault-(1)]
|
||||||
|
_ = x[AllowedExternalDirectiveVaultEnv-(2)]
|
||||||
|
_ = x[AllowedExternalDirectiveVaultFile-(3)]
|
||||||
|
_ = x[AllowedExternalDirectiveAll-(4)]
|
||||||
|
_ = x[AllowedExternalDirectiveFileEnv-(5)]
|
||||||
|
_ = x[AllowedExternalDirectiveFile-(6)]
|
||||||
|
_ = x[AllowedExternalDirectiveEnv-(7)]
|
||||||
|
}
|
||||||
|
|
||||||
|
var _AllowedExternalDirectivesValues = []AllowedExternalDirectives{DefaultExternalDir, AllowedExternalDirectiveVault, AllowedExternalDirectiveVaultEnv, AllowedExternalDirectiveVaultFile, AllowedExternalDirectiveAll, AllowedExternalDirectiveFileEnv, AllowedExternalDirectiveFile, AllowedExternalDirectiveEnv}
|
||||||
|
|
||||||
|
var _AllowedExternalDirectivesNameToValueMap = map[string]AllowedExternalDirectives{
|
||||||
|
_AllowedExternalDirectivesName[0:18]: DefaultExternalDir,
|
||||||
|
_AllowedExternalDirectivesLowerName[0:18]: DefaultExternalDir,
|
||||||
|
_AllowedExternalDirectivesName[18:23]: AllowedExternalDirectiveVault,
|
||||||
|
_AllowedExternalDirectivesLowerName[18:23]: AllowedExternalDirectiveVault,
|
||||||
|
_AllowedExternalDirectivesName[23:32]: AllowedExternalDirectiveVaultEnv,
|
||||||
|
_AllowedExternalDirectivesLowerName[23:32]: AllowedExternalDirectiveVaultEnv,
|
||||||
|
_AllowedExternalDirectivesName[32:42]: AllowedExternalDirectiveVaultFile,
|
||||||
|
_AllowedExternalDirectivesLowerName[32:42]: AllowedExternalDirectiveVaultFile,
|
||||||
|
_AllowedExternalDirectivesName[42:56]: AllowedExternalDirectiveAll,
|
||||||
|
_AllowedExternalDirectivesLowerName[42:56]: AllowedExternalDirectiveAll,
|
||||||
|
_AllowedExternalDirectivesName[56:64]: AllowedExternalDirectiveFileEnv,
|
||||||
|
_AllowedExternalDirectivesLowerName[56:64]: AllowedExternalDirectiveFileEnv,
|
||||||
|
_AllowedExternalDirectivesName[64:68]: AllowedExternalDirectiveFile,
|
||||||
|
_AllowedExternalDirectivesLowerName[64:68]: AllowedExternalDirectiveFile,
|
||||||
|
_AllowedExternalDirectivesName[68:71]: AllowedExternalDirectiveEnv,
|
||||||
|
_AllowedExternalDirectivesLowerName[68:71]: AllowedExternalDirectiveEnv,
|
||||||
|
}
|
||||||
|
|
||||||
|
var _AllowedExternalDirectivesNames = []string{
|
||||||
|
_AllowedExternalDirectivesName[0:18],
|
||||||
|
_AllowedExternalDirectivesName[18:23],
|
||||||
|
_AllowedExternalDirectivesName[23:32],
|
||||||
|
_AllowedExternalDirectivesName[32:42],
|
||||||
|
_AllowedExternalDirectivesName[42:56],
|
||||||
|
_AllowedExternalDirectivesName[56:64],
|
||||||
|
_AllowedExternalDirectivesName[64:68],
|
||||||
|
_AllowedExternalDirectivesName[68:71],
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllowedExternalDirectivesString retrieves an enum value from the enum constants string name.
|
||||||
|
// Throws an error if the param is not part of the enum.
|
||||||
|
func AllowedExternalDirectivesString(s string) (AllowedExternalDirectives, error) {
|
||||||
|
if val, ok := _AllowedExternalDirectivesNameToValueMap[s]; ok {
|
||||||
|
return val, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if val, ok := _AllowedExternalDirectivesNameToValueMap[strings.ToLower(s)]; ok {
|
||||||
|
return val, nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("%s does not belong to AllowedExternalDirectives values", s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllowedExternalDirectivesValues returns all values of the enum
|
||||||
|
func AllowedExternalDirectivesValues() []AllowedExternalDirectives {
|
||||||
|
return _AllowedExternalDirectivesValues
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllowedExternalDirectivesStrings returns a slice of all String values of the enum
|
||||||
|
func AllowedExternalDirectivesStrings() []string {
|
||||||
|
strs := make([]string, len(_AllowedExternalDirectivesNames))
|
||||||
|
copy(strs, _AllowedExternalDirectivesNames)
|
||||||
|
return strs
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsAAllowedExternalDirectives returns "true" if the value is listed in the enum definition. "false" otherwise
|
||||||
|
func (i AllowedExternalDirectives) IsAAllowedExternalDirectives() bool {
|
||||||
|
for _, v := range _AllowedExternalDirectivesValues {
|
||||||
|
if i == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalJSON implements the json.Marshaler interface for AllowedExternalDirectives
|
||||||
|
func (i AllowedExternalDirectives) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(i.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON implements the json.Unmarshaler interface for AllowedExternalDirectives
|
||||||
|
func (i *AllowedExternalDirectives) UnmarshalJSON(data []byte) error {
|
||||||
|
var s string
|
||||||
|
if err := json.Unmarshal(data, &s); err != nil {
|
||||||
|
return fmt.Errorf("AllowedExternalDirectives should be a string, got %s", data)
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
*i, err = AllowedExternalDirectivesString(s)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalText implements the encoding.TextMarshaler interface for AllowedExternalDirectives
|
||||||
|
func (i AllowedExternalDirectives) MarshalText() ([]byte, error) {
|
||||||
|
return []byte(i.String()), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalText implements the encoding.TextUnmarshaler interface for AllowedExternalDirectives
|
||||||
|
func (i *AllowedExternalDirectives) UnmarshalText(text []byte) error {
|
||||||
|
var err error
|
||||||
|
*i, err = AllowedExternalDirectivesString(string(text))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalYAML implements a YAML Marshaler for AllowedExternalDirectives
|
||||||
|
func (i AllowedExternalDirectives) MarshalYAML() (interface{}, error) {
|
||||||
|
return i.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalYAML implements a YAML Unmarshaler for AllowedExternalDirectives
|
||||||
|
func (i *AllowedExternalDirectives) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
|
var s string
|
||||||
|
if err := unmarshal(&s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
*i, err = AllowedExternalDirectivesString(s)
|
||||||
|
return err
|
||||||
|
}
|
||||||
805
pkg/backy/backy.go
Normal file → Executable file
805
pkg/backy/backy.go
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
83
pkg/backy/backy_test.go
Executable file
83
pkg/backy/backy_test.go
Executable file
@@ -0,0 +1,83 @@
|
|||||||
|
package backy
|
||||||
|
|
||||||
|
// import (
|
||||||
|
// "context"
|
||||||
|
// "fmt"
|
||||||
|
// "io"
|
||||||
|
// "log"
|
||||||
|
// "testing"
|
||||||
|
|
||||||
|
// "git.andrewnw.xyz/CyberShell/backy/pkg/pkgman"
|
||||||
|
// packagemanagercommon "git.andrewnw.xyz/CyberShell/backy/pkg/pkgman/common"
|
||||||
|
// "github.com/stretchr/testify/assert"
|
||||||
|
// "github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
// "github.com/testcontainers/testcontainers-go"
|
||||||
|
// )
|
||||||
|
|
||||||
|
// // TestConfigOptions tests the configuration options for the backy package.
|
||||||
|
// func Test_ErrorHook(t *testing.T) {
|
||||||
|
|
||||||
|
// configFile := "../../tests/ErrorHook.yml"
|
||||||
|
// logFile := "ErrorHook.log"
|
||||||
|
// backyConfigOptions := NewConfigOptions(configFile, SetLogFile(logFile))
|
||||||
|
// backyConfigOptions.InitConfig()
|
||||||
|
// backyConfigOptions.ParseConfigurationFile()
|
||||||
|
// backyConfigOptions.RunListConfig("")
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func TestSettingCommandInfoPackageCommandDnf(t *testing.T) {
|
||||||
|
|
||||||
|
// packagecommand := &Command{
|
||||||
|
// Type: PackageCommandType,
|
||||||
|
// PackageManager: "dnf",
|
||||||
|
// Shell: "zsh",
|
||||||
|
// PackageOperation: PackageOperationCheckVersion,
|
||||||
|
// Packages: []packagemanagercommon.Package{{Name: "docker-ce"}},
|
||||||
|
// }
|
||||||
|
// dnfPackage, _ := pkgman.PackageManagerFactory("dnf", pkgman.WithoutAuth())
|
||||||
|
|
||||||
|
// packagecommand.pkgMan = dnfPackage
|
||||||
|
// PackageCommand := getCommandTypeAndSetCommandInfo(packagecommand)
|
||||||
|
|
||||||
|
// assert.Equal(t, "dnf", PackageCommand.Cmd)
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func TestWithDockerFile(t *testing.T) {
|
||||||
|
// ctx := context.Background()
|
||||||
|
|
||||||
|
// docker, err := testcontainers.Run(ctx, "",
|
||||||
|
// testcontainers.WithDockerfile(testcontainers.FromDockerfile{
|
||||||
|
// Context: "../../tests/docker",
|
||||||
|
// Dockerfile: "Dockerfile",
|
||||||
|
// KeepImage: false,
|
||||||
|
// // BuildOptionsModifier: func(buildOptions *types.ImageBuildOptions) {
|
||||||
|
// // buildOptions.Target = "target2"
|
||||||
|
// // },
|
||||||
|
// }),
|
||||||
|
// )
|
||||||
|
// // docker.
|
||||||
|
|
||||||
|
// if err != nil {
|
||||||
|
// log.Printf("failed to start container: %v", err)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// r, err := docker.Logs(ctx)
|
||||||
|
// if err != nil {
|
||||||
|
// log.Printf("failed to get logs: %v", err)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// logs, err := io.ReadAll(r)
|
||||||
|
// if err != nil {
|
||||||
|
// log.Printf("failed to read logs: %v", err)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// fmt.Println(string(logs))
|
||||||
|
|
||||||
|
// require.NoError(t, err)
|
||||||
|
// }
|
||||||
141
pkg/backy/commandtype_enumer.go
Normal file
141
pkg/backy/commandtype_enumer.go
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
// Code generated by "enumer -linecomment -yaml -text -json -type=CommandType"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package backy
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
const _CommandTypeName = "scriptscriptFileremoteScriptpackageuser"
|
||||||
|
|
||||||
|
var _CommandTypeIndex = [...]uint8{0, 0, 6, 16, 28, 35, 39}
|
||||||
|
|
||||||
|
const _CommandTypeLowerName = "scriptscriptfileremotescriptpackageuser"
|
||||||
|
|
||||||
|
func (i CommandType) String() string {
|
||||||
|
if i < 0 || i >= CommandType(len(_CommandTypeIndex)-1) {
|
||||||
|
return fmt.Sprintf("CommandType(%d)", i)
|
||||||
|
}
|
||||||
|
return _CommandTypeName[_CommandTypeIndex[i]:_CommandTypeIndex[i+1]]
|
||||||
|
}
|
||||||
|
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
func _CommandTypeNoOp() {
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[DefaultCommandType-(0)]
|
||||||
|
_ = x[ScriptCommandType-(1)]
|
||||||
|
_ = x[ScriptFileCommandType-(2)]
|
||||||
|
_ = x[RemoteScriptCommandType-(3)]
|
||||||
|
_ = x[PackageCommandType-(4)]
|
||||||
|
_ = x[UserCommandType-(5)]
|
||||||
|
}
|
||||||
|
|
||||||
|
var _CommandTypeValues = []CommandType{DefaultCommandType, ScriptCommandType, ScriptFileCommandType, RemoteScriptCommandType, PackageCommandType, UserCommandType}
|
||||||
|
|
||||||
|
var _CommandTypeNameToValueMap = map[string]CommandType{
|
||||||
|
_CommandTypeName[0:0]: DefaultCommandType,
|
||||||
|
_CommandTypeLowerName[0:0]: DefaultCommandType,
|
||||||
|
_CommandTypeName[0:6]: ScriptCommandType,
|
||||||
|
_CommandTypeLowerName[0:6]: ScriptCommandType,
|
||||||
|
_CommandTypeName[6:16]: ScriptFileCommandType,
|
||||||
|
_CommandTypeLowerName[6:16]: ScriptFileCommandType,
|
||||||
|
_CommandTypeName[16:28]: RemoteScriptCommandType,
|
||||||
|
_CommandTypeLowerName[16:28]: RemoteScriptCommandType,
|
||||||
|
_CommandTypeName[28:35]: PackageCommandType,
|
||||||
|
_CommandTypeLowerName[28:35]: PackageCommandType,
|
||||||
|
_CommandTypeName[35:39]: UserCommandType,
|
||||||
|
_CommandTypeLowerName[35:39]: UserCommandType,
|
||||||
|
}
|
||||||
|
|
||||||
|
var _CommandTypeNames = []string{
|
||||||
|
_CommandTypeName[0:0],
|
||||||
|
_CommandTypeName[0:6],
|
||||||
|
_CommandTypeName[6:16],
|
||||||
|
_CommandTypeName[16:28],
|
||||||
|
_CommandTypeName[28:35],
|
||||||
|
_CommandTypeName[35:39],
|
||||||
|
}
|
||||||
|
|
||||||
|
// CommandTypeString retrieves an enum value from the enum constants string name.
|
||||||
|
// Throws an error if the param is not part of the enum.
|
||||||
|
func CommandTypeString(s string) (CommandType, error) {
|
||||||
|
if val, ok := _CommandTypeNameToValueMap[s]; ok {
|
||||||
|
return val, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if val, ok := _CommandTypeNameToValueMap[strings.ToLower(s)]; ok {
|
||||||
|
return val, nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("%s does not belong to CommandType values", s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CommandTypeValues returns all values of the enum
|
||||||
|
func CommandTypeValues() []CommandType {
|
||||||
|
return _CommandTypeValues
|
||||||
|
}
|
||||||
|
|
||||||
|
// CommandTypeStrings returns a slice of all String values of the enum
|
||||||
|
func CommandTypeStrings() []string {
|
||||||
|
strs := make([]string, len(_CommandTypeNames))
|
||||||
|
copy(strs, _CommandTypeNames)
|
||||||
|
return strs
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsACommandType returns "true" if the value is listed in the enum definition. "false" otherwise
|
||||||
|
func (i CommandType) IsACommandType() bool {
|
||||||
|
for _, v := range _CommandTypeValues {
|
||||||
|
if i == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalJSON implements the json.Marshaler interface for CommandType
|
||||||
|
func (i CommandType) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(i.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON implements the json.Unmarshaler interface for CommandType
|
||||||
|
func (i *CommandType) UnmarshalJSON(data []byte) error {
|
||||||
|
var s string
|
||||||
|
if err := json.Unmarshal(data, &s); err != nil {
|
||||||
|
return fmt.Errorf("CommandType should be a string, got %s", data)
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
*i, err = CommandTypeString(s)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalText implements the encoding.TextMarshaler interface for CommandType
|
||||||
|
func (i CommandType) MarshalText() ([]byte, error) {
|
||||||
|
return []byte(i.String()), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalText implements the encoding.TextUnmarshaler interface for CommandType
|
||||||
|
func (i *CommandType) UnmarshalText(text []byte) error {
|
||||||
|
var err error
|
||||||
|
*i, err = CommandTypeString(string(text))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalYAML implements a YAML Marshaler for CommandType
|
||||||
|
func (i CommandType) MarshalYAML() (interface{}, error) {
|
||||||
|
return i.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalYAML implements a YAML Unmarshaler for CommandType
|
||||||
|
func (i *CommandType) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
|
var s string
|
||||||
|
if err := unmarshal(&s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
*i, err = CommandTypeString(s)
|
||||||
|
return err
|
||||||
|
}
|
||||||
875
pkg/backy/config.go
Normal file → Executable file
875
pkg/backy/config.go
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
5
pkg/backy/cron.go
Normal file → Executable file
5
pkg/backy/cron.go
Normal file → Executable file
@@ -17,10 +17,7 @@ func (opts *ConfigOpts) Cron() {
|
|||||||
s := gocron.NewScheduler(time.Local)
|
s := gocron.NewScheduler(time.Local)
|
||||||
s.TagsUnique()
|
s.TagsUnique()
|
||||||
cmdLists := opts.CmdConfigLists
|
cmdLists := opts.CmdConfigLists
|
||||||
for listName, config := range cmdLists {
|
for _, config := range cmdLists {
|
||||||
if config.Name == "" {
|
|
||||||
config.Name = listName
|
|
||||||
}
|
|
||||||
|
|
||||||
cron := strings.TrimSpace(config.Cron)
|
cron := strings.TrimSpace(config.Cron)
|
||||||
if cron != "" {
|
if cron != "" {
|
||||||
|
|||||||
133
pkg/backy/lineinfile.go
Executable file
133
pkg/backy/lineinfile.go
Executable file
@@ -0,0 +1,133 @@
|
|||||||
|
package backy
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"golang.org/x/crypto/ssh"
|
||||||
|
)
|
||||||
|
|
||||||
|
func sshConnect(user, password, host string, port int) (*ssh.Client, error) {
|
||||||
|
config := &ssh.ClientConfig{
|
||||||
|
User: user,
|
||||||
|
Auth: []ssh.AuthMethod{
|
||||||
|
ssh.Password(password),
|
||||||
|
},
|
||||||
|
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
||||||
|
}
|
||||||
|
addr := fmt.Sprintf("%s:%d", host, port)
|
||||||
|
return ssh.Dial("tcp", addr, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
func sshReadFile(client *ssh.Client, remotePath string) (string, error) {
|
||||||
|
session, err := client.NewSession()
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
defer session.Close()
|
||||||
|
|
||||||
|
var b bytes.Buffer
|
||||||
|
session.Stdout = &b
|
||||||
|
if err := session.Run(fmt.Sprintf("cat %s", remotePath)); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return b.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func sshWriteFile(client *ssh.Client, remotePath, content string) error {
|
||||||
|
session, err := client.NewSession()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer session.Close()
|
||||||
|
|
||||||
|
stdin, err := session.StdinPipe()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer stdin.Close()
|
||||||
|
io.WriteString(stdin, content)
|
||||||
|
}()
|
||||||
|
|
||||||
|
cmd := fmt.Sprintf("cat > %s", remotePath)
|
||||||
|
return session.Run(cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
func lineInString(content, regexpPattern, line string) string {
|
||||||
|
scanner := bufio.NewScanner(strings.NewReader(content))
|
||||||
|
var lines []string
|
||||||
|
found := false
|
||||||
|
re := regexp.MustCompile(regexpPattern)
|
||||||
|
|
||||||
|
for scanner.Scan() {
|
||||||
|
l := scanner.Text()
|
||||||
|
if re.MatchString(l) {
|
||||||
|
found = true
|
||||||
|
lines = append(lines, line)
|
||||||
|
} else {
|
||||||
|
lines = append(lines, l)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
lines = append(lines, line)
|
||||||
|
}
|
||||||
|
return strings.Join(lines, "\n") + "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
func Call() {
|
||||||
|
user := "youruser"
|
||||||
|
password := "yourpassword"
|
||||||
|
host := "yourhost"
|
||||||
|
port := 22
|
||||||
|
remotePath := "/path/to/remote/file"
|
||||||
|
|
||||||
|
client, err := sshConnect(user, password, host, port)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("SSH connection error:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer client.Close()
|
||||||
|
|
||||||
|
content, err := sshReadFile(client, remotePath)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Read error:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
newContent := lineInString(content, "^foo=", "foo=bar")
|
||||||
|
|
||||||
|
if err := sshWriteFile(client, remotePath, newContent); err != nil {
|
||||||
|
fmt.Println("Write error:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("Line updated successfully over SSH.")
|
||||||
|
}
|
||||||
|
|
||||||
|
type LineInFile struct {
|
||||||
|
RemotePath string // Path to the remote file
|
||||||
|
Pattern string // Regex pattern to match lines
|
||||||
|
Line string // Line to insert or replace
|
||||||
|
InsertAfter bool // If true, insert after matched line; else replace
|
||||||
|
User string // SSH username
|
||||||
|
Password string // SSH password (use key for production)
|
||||||
|
Host string // SSH host
|
||||||
|
Port int // SSH port
|
||||||
|
regexCompiled *regexp.Regexp // Compiled regex (internal use)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CompileRegex compiles the regex pattern for later use
|
||||||
|
func (l *LineInFile) CompileRegex() error {
|
||||||
|
re, err := regexp.Compile(l.Pattern)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
l.regexCompiled = re
|
||||||
|
return nil
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user