forked from mittwald/brudi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.go
67 lines (64 loc) · 3.28 KB
/
cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package pgdump
const (
binary = "pg_dump"
)
type Options struct {
Flags *Flags
AdditionalArgs []string
}
type Flags struct {
File string `flag:"--file="`
Format string `flag:"--format="`
Jobs int `flag:"--jobs="`
Verbose bool `flag:"--verbose"`
Compress int `flag:"--compress="`
LockWaitTimeout string `flag:"--lock-wait-timeout="`
NoSync bool `flag:"--no-sync"`
DataOnly bool `flag:"--data-only"`
Blobs bool `flag:"--blobs"`
Clean bool `flag:"--clean"`
Create bool `flag:"--create"`
Encoding string `flag:"--encoding="`
Schema string `flag:"--schema="`
ExcludeSchema string `flag:"--exclude-schema="`
NoOwner bool `flag:"--no-owner"`
SchemaOnly bool `flag:"--schema-only"`
Superuser string `flag:"--superuser="`
Table string `flag:"--table="`
ExcludeTable string `flag:"--exclude-table="`
NoPrivileges bool `flag:"--no-privileges"`
BinaryUpgrade bool `flag:"--binary-upgrade"`
ColumnInserts bool `flag:"--column-inserts"`
DisableDollarQuoting bool `flag:"--disable-dollar-quoting"`
DisableTriggers bool `flag:"--disable-triggers"`
EnableRowSecurity bool `flag:"--enable-row-security"`
ExcludeTableData string `flag:"--exclude-table-data="`
ExtraFloatDigits int `flag:"--extra-float-digits="`
IfExists bool `flag:"--if-exists"`
Inserts bool `flag:"--inserts"`
LoadViaPartitionRoot bool `flag:"--load-via-partition-root"`
NoComments bool `flag:"--no-comments"`
NoPublications bool `flag:"--no-publications"`
NoSecurityLabels bool `flag:"--no-security-labels"`
NoSubscriptions bool `flag:"--no-subscriptions"`
NoSynchronizedSnapshots bool `flag:"--no-synchronized-snapshots"`
NoTablespaces bool `flag:"--no-tablespaces"`
NoUnloggedTableData bool `flag:"--no-unlogged-table-data"`
OnConflictDoNothing bool `flag:"--on-conflict-do-nothing"`
QuoteAllIdentifiers bool `flag:"--quote-all-identifiers"`
RowsPerInsert int `flag:"--rows-per-insert="`
Section string `flag:"--section="`
SerializableDeferrable bool `flag:"--serializable-deferrable"`
Snapshots string `flag:"--snapshot="`
StrictNames bool `flag:"--strict-names"`
UseSetSessionAuthorization bool `flag:"--use-set-session-authorization"`
DBName string `flag:"--dbname="`
Host string `flag:"--host="`
Port int `flag:"--port="`
Username string `flag:"--username="`
NoPassword bool `flag:"--no-password"`
// unfortunately pg_dump has no cli-option to specify the password
// therefore we have to workaround by setting the corresponding password env-var
Password string `flag:"-" env:"PGPASSWORD"`
Role string `flag:"--role="`
}