(ctx *FmtCtx)
| 163 | var _ NodeFormatter = &ShowBackupOptions{} |
| 164 | |
| 165 | func (o *ShowBackupOptions) Format(ctx *FmtCtx) { |
| 166 | var addSep bool |
| 167 | maybeAddSep := func() { |
| 168 | if addSep { |
| 169 | ctx.WriteString(", ") |
| 170 | } |
| 171 | addSep = true |
| 172 | } |
| 173 | if o.AsJson { |
| 174 | ctx.WriteString("as_json") |
| 175 | addSep = true |
| 176 | } |
| 177 | if o.CheckFiles { |
| 178 | maybeAddSep() |
| 179 | ctx.WriteString("check_files") |
| 180 | } |
| 181 | if o.DebugIDs { |
| 182 | maybeAddSep() |
| 183 | ctx.WriteString("debug_ids") |
| 184 | } |
| 185 | if o.EncryptionPassphrase != nil { |
| 186 | maybeAddSep() |
| 187 | ctx.WriteString("encryption_passphrase = ") |
| 188 | if ctx.flags.HasFlags(FmtShowPasswords) { |
| 189 | ctx.FormatNode(o.EncryptionPassphrase) |
| 190 | } else { |
| 191 | ctx.WriteString(PasswordSubstitution) |
| 192 | } |
| 193 | } |
| 194 | if o.IncrementalStorage != nil { |
| 195 | maybeAddSep() |
| 196 | ctx.WriteString("incremental_location = ") |
| 197 | ctx.FormatURIs(o.IncrementalStorage) |
| 198 | } |
| 199 | |
| 200 | if o.Privileges { |
| 201 | maybeAddSep() |
| 202 | ctx.WriteString("privileges") |
| 203 | } |
| 204 | |
| 205 | if o.EncryptionInfoDir != nil { |
| 206 | maybeAddSep() |
| 207 | ctx.WriteString("encryption_info_dir = ") |
| 208 | ctx.FormatNode(o.EncryptionInfoDir) |
| 209 | } |
| 210 | if o.DecryptionKMSURI != nil { |
| 211 | maybeAddSep() |
| 212 | ctx.WriteString("kms = ") |
| 213 | ctx.FormatURIs(o.DecryptionKMSURI) |
| 214 | } |
| 215 | if o.SkipSize { |
| 216 | maybeAddSep() |
| 217 | ctx.WriteString("skip size") |
| 218 | } |
| 219 | |
| 220 | // The following are only used in connection-check SHOW. |
| 221 | if o.CheckConnectionConcurrency != nil { |
| 222 | maybeAddSep() |
nothing calls this directly
no test coverage detected