Skip to content

Commit

Permalink
Dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Dec 12, 2024
1 parent 19a63a2 commit 93c5f9a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 48 deletions.
27 changes: 12 additions & 15 deletions backuper/confluence/confluence-backuper.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ func (b *ConfluenceBackuper) GetReader(backupFile string) (io.ReadCloser, error)
log.Debug("Downloading file from %s", backupFileURL)

resp, err := req.Request{
URL: backupFileURL,
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
AutoDiscard: true,
URL: backupFileURL,
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
AutoDiscard: true,
}.Get()

if err != nil {
Expand All @@ -245,11 +244,10 @@ func (b *ConfluenceBackuper) GetReader(backupFile string) (io.ReadCloser, error)
// startBackup starts backup process
func (b *ConfluenceBackuper) startBackup() error {
resp, err := req.Request{
URL: b.config.AccountURL() + "/wiki/rest/obm/1.0/runbackup",
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
URL: b.config.AccountURL() + "/wiki/rest/obm/1.0/runbackup",
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
Body: &BackupPrefs{
WithAttachments: b.config.WithAttachments,
ForCloud: b.config.ForCloud,
Expand All @@ -270,12 +268,11 @@ func (b *ConfluenceBackuper) startBackup() error {
// getBackupProgress returns backup progress info
func (b *ConfluenceBackuper) getBackupProgress() (*BackupProgressInfo, error) {
resp, err := req.Request{
URL: b.config.AccountURL() + "/wiki/rest/obm/1.0/getprogress",
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
AutoDiscard: true,
URL: b.config.AccountURL() + "/wiki/rest/obm/1.0/getprogress",
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
AutoDiscard: true,
}.Get()

if err != nil {
Expand Down
40 changes: 18 additions & 22 deletions backuper/jira/jira-backuper.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,9 @@ func (b *JiraBackuper) GetReader(backupFile string) (io.ReadCloser, error) {
log.Debug("Downloading file from %s", backupFileURL)

resp, err := req.Request{
URL: backupFileURL,
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
AutoDiscard: true,
URL: backupFileURL,
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
AutoDiscard: true,
}.Get()

if err != nil {
Expand All @@ -254,11 +253,10 @@ func (b *JiraBackuper) GetReader(backupFile string) (io.ReadCloser, error) {
// startBackup starts backup process
func (b *JiraBackuper) startBackup() (string, error) {
resp, err := req.Request{
URL: b.config.AccountURL() + "/rest/backup/1/export/runbackup",
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
URL: b.config.AccountURL() + "/rest/backup/1/export/runbackup",
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
Body: &BackupPrefs{
WithAttachments: b.config.WithAttachments,
ForCloud: b.config.ForCloud,
Expand Down Expand Up @@ -286,12 +284,11 @@ func (b *JiraBackuper) startBackup() (string, error) {
// getLastTaskID returns ID of the last task for backup
func (b *JiraBackuper) getLastTaskID() (string, error) {
resp, err := req.Request{
URL: b.config.AccountURL() + "/rest/backup/1/export/lastTaskId",
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
AutoDiscard: true,
URL: b.config.AccountURL() + "/rest/backup/1/export/lastTaskId",
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
AutoDiscard: true,
}.Get()

if err != nil {
Expand All @@ -308,13 +305,12 @@ func (b *JiraBackuper) getLastTaskID() (string, error) {
// getTaskProgress returns progress for task
func (b *JiraBackuper) getTaskProgress(taskID string) (*BackupProgressInfo, error) {
resp, err := req.Request{
URL: b.config.AccountURL() + "/rest/backup/1/export/getProgress",
BasicAuthUsername: b.config.Email,
BasicAuthPassword: b.config.APIKey,
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
Query: req.Query{"taskId": taskID},
AutoDiscard: true,
URL: b.config.AccountURL() + "/rest/backup/1/export/getProgress",
Auth: req.AuthBasic{b.config.Email, b.config.APIKey},
Accept: req.CONTENT_TYPE_JSON,
ContentType: req.CONTENT_TYPE_JSON,
Query: req.Query{"taskId": taskID},
AutoDiscard: true,
}.Get()

if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.17.47
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.43
github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0
github.com/essentialkaos/ek/v13 v13.14.1
github.com/essentialkaos/ek/v13 v13.15.1
github.com/essentialkaos/katana v0.4.1
github.com/pkg/sftp v1.13.7
golang.org/x/crypto v0.29.0
golang.org/x/crypto v0.31.0
)

require (
Expand All @@ -26,5 +26,5 @@ require (
github.com/essentialkaos/depsy v1.3.1 // indirect
github.com/essentialkaos/sio v1.1.0 // indirect
github.com/kr/fs v0.1.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/sys v0.28.0 // indirect
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/essentialkaos/check v1.4.1 h1:SuxXzrbokPGTPWxGRnzy0hXvtb44mtVrdNxgPa1
github.com/essentialkaos/check v1.4.1/go.mod h1:xQOYwFvnxfVZyt5Qvjoa1SxcRqu5VyP77pgALr3iu+M=
github.com/essentialkaos/depsy v1.3.1 h1:00k9QcMsdPM4IzDaEFHsTHBD/zoM0oxtB5+dMUwbQa8=
github.com/essentialkaos/depsy v1.3.1/go.mod h1:B5+7Jhv2a2RacOAxIKU2OeJp9QfZjwIpEEPI5X7auWM=
github.com/essentialkaos/ek/v13 v13.14.1 h1:LAAS8OZFseAQSigrU4IAL0JeUj1G80M2WXm6B6+7ojY=
github.com/essentialkaos/ek/v13 v13.14.1/go.mod h1:GAoS44v5gtd3Yc1qqfgXsaJNoC0dMw1ueW5Fc9TTHUg=
github.com/essentialkaos/ek/v13 v13.15.1 h1:11m8g8SaW2B7N6y9q3c/5p9qMi7ElwXUD8HxKc2fE+Q=
github.com/essentialkaos/ek/v13 v13.15.1/go.mod h1:FnKbXv0qaoT7Ocqg0oAhlkgQZKVQFAP32wKEmrf7xNw=
github.com/essentialkaos/katana v0.4.1 h1:+yLk5ngPOu5SKQ7LdUQ7Bip0vD9BLU4/CzmL589wD38=
github.com/essentialkaos/katana v0.4.1/go.mod h1:r2/CwIhVo9T8bhJd9eQlEqfZNAJJ0191s6h6LTdw2QM=
github.com/essentialkaos/sio v1.1.0 h1:XPyScH8G08NIC94373ZHs+afPjZT5OKxQCuudbdFaIc=
Expand All @@ -70,8 +70,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand All @@ -90,15 +90,15 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
Expand Down

0 comments on commit 93c5f9a

Please sign in to comment.