Skip to content

Commit 19904ce

Browse files
committed
Add logo to README; Fill out README some more
1 parent 8b6d4d8 commit 19904ce

File tree

2 files changed

+134
-3
lines changed

2 files changed

+134
-3
lines changed

README.md

+40-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# fdwctl
1+
# ![fdwctl](media/fdwctl.svg)
22
A PostgreSQL Foreign Data Wrapper (FDW) management CLI
3+
-
34

5+
![Golang v1.14+](https://img.shields.io/badge/Golang-v1.14+-blue?style=for-the-badge&logo=go&color=00add8&link=https://golang.org)
6+
![PostgreSQL v9.6+](https://img.shields.io/badge/PostgreSQL-v9.6+-blue?style=for-the-badge&logo=postgresql&color=336791&link=https://postgresql.org)
7+
8+
[Features](#features) | [Installation](#installation) | [Usage](#usage) | [Configuration](#configuration)
49

510
### What is it?
611

@@ -19,6 +24,14 @@ The CLI interface is written with the original intention of being used as part o
1924
- Single, statically-linked binary; can be compiled on any platform supporting Golang 1.14+
2025
- Multiple log message formats (Text, JSON; Elasticstack schema support is pending)
2126

27+
### Installation
28+
29+
#### Using Go
30+
31+
```shell script
32+
go install https://github.com/neflyte/fdwctl/cmd/fdwctl
33+
```
34+
2235
### Usage
2336

2437
```
@@ -44,9 +57,33 @@ Flags:
4457
Use "fdwctl [command] --help" for more information about a command.
4558
```
4659

47-
### Example Configuration
60+
#### Examples
61+
62+
##### Create the `postgres_fdw` extension
63+
64+
```shell script
65+
fdwctl create extension postgres_fdw
66+
```
67+
68+
##### Create a foreign server
69+
70+
```shell script
71+
fdwctl create server my-remotedb --serverhost remotedb1 --serverport 5432 --serverdbname remotedb
72+
```
73+
74+
##### Create a user mapping
75+
76+
```shell script
77+
fdwctl create usermap --servername my-remotedb --localuser fdw --remoteuser remoteuser --remotepassword 'r3m0TE!'
78+
```
79+
80+
### Configuration
81+
82+
The application configuration file is in YAML format and is located at `${HOME}/.config/fdwctl/config.yaml`. An explicit configuration file can be specified by using the `--config` argument. In addition to YAML, JSON format is also supported.
83+
84+
#### Example Configuration File
4885

49-
The following is an example of the application configuration file in YAML format. The equivalent in JSON format is also supported.
86+
The following is an example of the application configuration file in YAML format.
5087

5188
```yaml
5289
FDWConnection: "host=localhost port=5432 dbname=fdw user=fdw sslmode=disable"

media/fdwctl.svg

+94
Loading

0 commit comments

Comments
 (0)