Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
koko
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
koko
Commits
8098fb4e
Commit
8098fb4e
authored
May 22, 2019
by
Eric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] fix s3 upload bugs
parent
03594f23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
Gopkg.lock
Gopkg.lock
+1
-0
recorderstorage.go
pkg/proxy/recorderstorage.go
+11
-2
No files found.
Gopkg.lock
View file @
8098fb4e
...
@@ -301,6 +301,7 @@
...
@@ -301,6 +301,7 @@
"github.com/aws/aws-sdk-go/aws",
"github.com/aws/aws-sdk-go/aws",
"github.com/aws/aws-sdk-go/aws/credentials",
"github.com/aws/aws-sdk-go/aws/credentials",
"github.com/aws/aws-sdk-go/aws/session",
"github.com/aws/aws-sdk-go/aws/session",
"github.com/aws/aws-sdk-go/service/s3",
"github.com/aws/aws-sdk-go/service/s3/s3manager",
"github.com/aws/aws-sdk-go/service/s3/s3manager",
"github.com/elastic/go-elasticsearch",
"github.com/elastic/go-elasticsearch",
"github.com/gliderlabs/ssh",
"github.com/gliderlabs/ssh",
...
...
pkg/proxy/recorderstorage.go
View file @
8098fb4e
...
@@ -61,16 +61,25 @@ func NewReplayStorage() ReplayStorage {
...
@@ -61,16 +61,25 @@ func NewReplayStorage() ReplayStorage {
secretKey
:
cf
[
"SECRET_KEY"
]
.
(
string
),
secretKey
:
cf
[
"SECRET_KEY"
]
.
(
string
),
}
}
case
"s3"
:
case
"s3"
:
var
region
string
var
endpoint
string
bucket
:=
cf
[
"BUCKET"
]
.
(
string
)
bucket
:=
cf
[
"BUCKET"
]
.
(
string
)
endpoint
=
cf
[
"ENDPOINT"
]
.
(
string
)
if
bucket
==
""
{
if
bucket
==
""
{
bucket
=
"jumpserver"
bucket
=
"jumpserver"
}
}
if
cf
[
"REGION"
]
!=
nil
{
region
=
cf
[
"REGION"
]
.
(
string
)
}
else
{
region
=
strings
.
Split
(
endpoint
,
"."
)[
1
]
}
return
&
S3ReplayStorage
{
return
&
S3ReplayStorage
{
bucket
:
bucket
,
bucket
:
bucket
,
region
:
cf
[
"REGION"
]
.
(
string
)
,
region
:
region
,
accessKey
:
cf
[
"ACCESS_KEY"
]
.
(
string
),
accessKey
:
cf
[
"ACCESS_KEY"
]
.
(
string
),
secretKey
:
cf
[
"SECRET_KEY"
]
.
(
string
),
secretKey
:
cf
[
"SECRET_KEY"
]
.
(
string
),
endpoint
:
cf
[
"ENDPOINT"
]
.
(
string
)
,
endpoint
:
endpoint
,
}
}
default
:
default
:
return
defaultReplayStorage
return
defaultReplayStorage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment