https://github.com/inthehack/ifconfig-cli
Minimal CLI for interfacing https://ifconfig.co
https://github.com/inthehack/ifconfig-cli
Last synced: 3 months ago
JSON representation
Minimal CLI for interfacing https://ifconfig.co
- Host: GitHub
- URL: https://github.com/inthehack/ifconfig-cli
- Owner: inthehack
- License: mit
- Created: 2023-05-18T10:52:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-18T15:08:27.000Z (about 2 years ago)
- Last Synced: 2025-03-08T21:40:10.301Z (3 months ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ifconfig CLI
# Introduction
This little CLI is a client to https://ifconfig.co. It retrieves the information from the API
and displays it in the terminal.This project is a toy CLI that demonstrates an implementation of clean architecture.
It also serves as a skeleton for other projects.
# Usage
The call to the CLI does not need an argument. As a result of the call, it prints the JSON
output directly from the API.# Code organization
The repository uses the workspace organization offered by Cargo and Rust. Each package
belongs to at most one layer as described in clean architecture.```
app/ (use cases) the applicative code that integrates all use cases and provides
a clear view of functionalities.
cmd/ (adapter) the command line code that provides decoding of options and calls
the applicative code.
domain/ (domain) the core of business types and interfaces (i.e. use cases).
ifconfig/ (adapter) implementation to fetch ifconfig data from public API,
implementing the domain::Fetcher trait.
```