Skip to content

Commit 3b52634

Browse files
committed
MINOR: Add getting raw backup config files
1 parent 7f252d1 commit 3b52634

File tree

6 files changed

+62
-2
lines changed

6 files changed

+62
-2
lines changed

embedded_spec.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/go-openapi/strfmt v0.19.0
1313
github.com/go-openapi/swag v0.19.0
1414
github.com/go-openapi/validate v0.19.0
15-
github.com/haproxytech/client-native v1.2.1-0.20190813091531-c13eef260120
15+
github.com/haproxytech/client-native v1.2.1-0.20190813105745-4078525caf6b
1616
github.com/haproxytech/config-parser v1.0.3
1717
github.com/haproxytech/models v1.2.0
1818
github.com/jessevdk/go-flags v1.4.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ github.com/haproxytech/client-native v1.2.0 h1:PRghCtq48SZikYwAmjvT4bySjKBiDYUCi
8181
github.com/haproxytech/client-native v1.2.0/go.mod h1:lj3L8k0WRbtSxsz71ojTmyA99h0K1Ef187JZEmRIe98=
8282
github.com/haproxytech/client-native v1.2.1-0.20190813091531-c13eef260120 h1:70LX5ipIqs0Xob45Cj6qBSty/DWcc2ts+VT6nVk4iEk=
8383
github.com/haproxytech/client-native v1.2.1-0.20190813091531-c13eef260120/go.mod h1:lj3L8k0WRbtSxsz71ojTmyA99h0K1Ef187JZEmRIe98=
84+
github.com/haproxytech/client-native v1.2.1-0.20190813105745-4078525caf6b h1:LwO1Gkoblz3uGfM1JKsTkHExg4xKD/KZDZegmiO9fKk=
85+
github.com/haproxytech/client-native v1.2.1-0.20190813105745-4078525caf6b/go.mod h1:lj3L8k0WRbtSxsz71ojTmyA99h0K1Ef187JZEmRIe98=
8486
github.com/haproxytech/config-parser v1.0.0 h1:x6BQ5o5jzOq2QDApYwfFeidbKlS8d8F474tHbzT/GIY=
8587
github.com/haproxytech/config-parser v1.0.0/go.mod h1:se7v728KDunj+qz1kXFFFl+nDuoBdUaN5eYSi+gYjNM=
8688
github.com/haproxytech/config-parser v1.0.2 h1:IK0COYVxcVWp92j2Af8PA/z4yP3K69XqiT9iAI4e+48=

handlers/raw.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyC
4242
t = *params.TransactionID
4343
}
4444

45-
v, data, err := h.Client.Configuration.GetRawConfiguration(t)
45+
v := int64(0)
46+
if params.Version != nil {
47+
v = *params.Version
48+
}
49+
50+
v, data, err := h.Client.Configuration.GetRawConfiguration(t, v)
4651
if err != nil {
4752
e := misc.HandleError(err)
4853
return configuration.NewGetHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e)

operations/configuration/get_h_a_proxy_configuration_parameters.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operations/configuration/get_h_a_proxy_configuration_urlbuilder.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)