autoip

module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2025 License: AGPL-3.0

README ΒΆ

Proposed Structure: Clean and CLI-Friendly

autoip-go/
β”œβ”€β”€ cmd/
β”‚   └── autoip/
β”‚       └── main.go                # Entry point, uses urfave/cli v3
β”œβ”€β”€ commands/                      # Formerly 'cli' β€” all CLI handlers
β”‚   β”œβ”€β”€ create.go
β”‚   β”œβ”€β”€ update.go
β”‚   β”œβ”€β”€ delete.go
β”‚   β”œβ”€β”€ show.go
β”‚   β”œβ”€β”€ test_notify.go
β”‚   └── shared.go                  # Optional helpers for all commands
β”œβ”€β”€ config/
β”‚   └── config.go
β”œβ”€β”€ cron/
β”‚   └── cron.go
β”œβ”€β”€ ip/
β”‚   └── fetch.go
β”œβ”€β”€ logger/
β”‚   └── logger.go
β”œβ”€β”€ noip/
β”‚   └── update.go
β”œβ”€β”€ notify/
β”‚   └── notify.go
β”œβ”€β”€ termcolor/                     # Former util/color.go
β”‚   └── color.go
β”œβ”€β”€ dist/                          # Built binaries go here
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ Makefile
└── README.md

πŸ“Œ Why This Structure Works

Folder Responsibility
cmd/autoip Main app entry point, CLI bootstrapping (main.go)
commands/ Each file is a CLI command mapped via urfave/cli/v3
config/ Load, validate and access TOML/YAML/ENV config
logger/ Handles logging, stderr, waitgroups
ip/ Fetch public IP, validate IP format, etc.
noip/ Specific logic for interacting with No-IP
notify/ Email notification logic (SMTP, TLS, etc.)
cron/ Crontab creation, deletion, detection
termcolor/ Fancy output formatting, coloring

License

autoip is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).

See LICENSE for the full text.

Directories ΒΆ

Path Synopsis
cmd
autoip command
SPDX-License-Identifier: AGPL-3.0-or-later Copyright (c) 2025 Vicente Oros
SPDX-License-Identifier: AGPL-3.0-or-later Copyright (c) 2025 Vicente Oros
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL