-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix CODE_OF_CONDUCT, CONTRIBUTING, and README lints
- Loading branch information
1 parent
a35cebc
commit 4055e38
Showing
4 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Code of Conduct | ||
|
||
If it ain't broke...[Rust Code of Conduct](https://www.rust-lang.org/conduct.html) | ||
If it ain't broke...[Rust Code of Conduct](https://www.rust-lang.org/conduct.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
# Contributing to Cliflare | ||
|
||
## Please do! | ||
## Please do | ||
|
||
* Fork | ||
* Branch | ||
* Do the things | ||
* Update [CHANGELOG](#changelog) to reflect the things | ||
* Commit | ||
* Push | ||
* Pull request | ||
|
||
This is my first project as a Rustacean, so _**please**_ let me know if I'm missing the mark on anything. It takes a village, and my mom tells me that I'm very easy to work with. | ||
This is my first project as a Rustacean. | ||
_**please**_ let me know if I'm missing the mark on anything. | ||
My mom tells me that I'm very easy to work with. | ||
|
||
Let's stick with the [Rust Code of Conduct](https://www.rust-lang.org/conduct.html). | ||
|
||
## Changelog | ||
|
||
This project follows semantic versioning. | ||
|
||
Possible log types: | ||
|
||
- `[added]` for new features. | ||
- `[changed]` for changes in existing functionality. | ||
- `[deprecated]` for once-stable features removed in upcoming releases. | ||
- `[removed]` for deprecated features removed in this release. | ||
- `[fixed]` for any bug fixes. | ||
- `[security]` to invite users to upgrade in case of vulnerabilities. | ||
* `[Added]` for new features. | ||
* `[Changed]` for changes in existing functionality. | ||
* `[Deprecated]` for once-stable features removed in upcoming releases. | ||
* `[Removed]` for deprecated features removed in this release. | ||
* `[Fixed]` for any bug fixes. | ||
* `[Security]` to invite users to upgrade in case of vulnerabilities. | ||
|
||
Lint markdown locally: | ||
|
||
```bash | ||
docker run --rm \ | ||
-v "$(pwd)/CHANGELOG.md:/CHANGELOG.md:ro" \ | ||
avtodev/markdown-lint:v1 \ | ||
--rules /lint/rules/changelog.js \ | ||
--config /lint/config/changelog.yml \ | ||
/CHANGELOG.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,112 @@ | ||
# βοΈπ cliflare πβοΈ | ||
|
||
![build](https://github.com/davepmiller/cliflare/actions/workflows/ci.yml/badge.svg?branch=main) | ||
![publish](https://github.com/davepmiller/cliflare/actions/workflows/publish.yml/badge.svg?branch=main) | ||
[![Coverage Status](https://coveralls.io/repos/github/davepmiller/cliflare/badge.svg)](https://coveralls.io/github/davepmiller/cliflare) | ||
![crates.io](https://img.shields.io/crates/v/cliflare.svg) | ||
![downloads](https://img.shields.io/crates/d/cliflare) | ||
[![license](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) | ||
|
||
* π CLIοΈ to interact with Cloudflare APIs. | ||
* π CLIοΈ to interact with Cloudflare APIs | ||
* π₯³ An excuse to write some Rust | ||
* π· Under heavy development!!! Happy for help! | ||
* π· Under heavy development | ||
|
||
## Setup | ||
|
||
#### Setup: | ||
* [Install Rust π](https://www.rust-lang.org/tools/install) | ||
|
||
```bash | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
``` | ||
|
||
* Install | ||
|
||
```bash | ||
cargo install cliflare | ||
``` | ||
|
||
* [Generate a Cloudflare API token π](https://developers.cloudflare.com/cloudflare-one/api-terraform/scoped-api-tokens/) | ||
* [Grab Account And Zone IDs π](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/) | ||
* Environment | ||
|
||
```bash | ||
# add your token value to a startup script | ||
echo CLOUDFLARE_TOKEN=abcd1234**API_TOKEN**4321dcba >> ~/.zshrc | ||
echo CLOUDFLARE_ACCOUNT_ID=abcd1234**ACCOUNT_ID**4321dcba >> ~/.zshrc | ||
``` | ||
#### Examples: | ||
|
||
## Examples | ||
|
||
* [Token Verify π](https://developers.cloudflare.com/api/operations/user-api-tokens-verify-token) | ||
|
||
```bash | ||
cliflare token verify | ||
``` | ||
|
||
* [Zone List π](https://developers.cloudflare.com/api/operations/zones-get) | ||
|
||
```bash | ||
# print out all zone info | ||
cliflare zone list | ||
# print only zone "name" field -- i.e. domains | ||
cliflare zone list --domains | ||
``` | ||
|
||
* [Create a Zone π](https://developers.cloudflare.com/api/operations/zones-post) | ||
|
||
```bash | ||
cliflare zone create newzone.com | ||
``` | ||
|
||
* [Delete a Zone π](https://developers.cloudflare.com/api/operations/zones-0-delete) | ||
|
||
```bash | ||
cliflare zone delete newzone.com | ||
``` | ||
|
||
* [List DNS Records For A Zone π](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records) | ||
|
||
```bash | ||
cliflare dns list --zone_id <ZONE_ID> | ||
cliflare dns list -i <ZONE_ID> | ||
cliflare dns list --zone_name <DOMAIN> | ||
cliflare dns list -n <DOMAIN> | ||
``` | ||
|
||
* [Export DNS Records For A Zone π](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-export-dns-records) | ||
|
||
```bash | ||
cliflare dns export --zone_id <ZONE_ID> | ||
cliflare dns export -i <ZONE_ID> | ||
cliflare dns export --zone_name <DOMAIN> | ||
cliflare dns export -n <DOMAIN> | ||
``` | ||
|
||
* [Import DNS Records For A Zone π](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-import-dns-records) | ||
|
||
```bash | ||
cliflare dns import --file <PATH> --zone_id <ZONE_ID> | ||
cliflare dns import -f <PATH> -i <ZONE_ID> | ||
cliflare dns import -file <PATH> --zone_name <DOMAIN> | ||
cliflare dns import -f <PATH> -n <DOMAIN> | ||
``` | ||
|
||
#### Coming Soon: | ||
## Coming Soon | ||
|
||
* [Create DNS Record For A Zone](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-create-dns-record) | ||
* Parameterize [Pagination Options](https://developers.cloudflare.com/fundamentals/api/how-to/make-api-calls/#pagination) | ||
|
||
#### Coming Soonish: | ||
## Coming Soonish | ||
|
||
* Create WAF rules | ||
* Create redirect rules | ||
* Create some other rules | ||
* Add parameters to `zone create` for customization | ||
* Homebrew setup | ||
|
||
### Feature Requests? | ||
Awesome! | ||
|
||
Fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfDBhmvtRn1C3Vzi_nplHV9QyBVbPUfdqhziUj_sWYyi-XIFw/viewform?usp=sf_link) and I'll get back to you. | ||
## Feature Requests | ||
|
||
Awesome! | ||
|
||
Fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfDBhmvtRn1C3Vzi_nplHV9QyBVbPUfdqhziUj_sWYyi-XIFw/viewform?usp=sf_link) | ||
and I'll get back to you. |