-
Notifications
You must be signed in to change notification settings - Fork 33
feat(artifacts): Object storage integration and artifacts key #1385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
256 commits
Select commit
Hold shift + click to select a range
58718a1
ground work
8e9cd8e
working admin endpoints for bucket management
3239b53
working admin endpoints for object operations
8a95775
all endpoints for storage
a4f29d0
some working test
41df509
working tests
86d822d
keys for test report step
83afd15
feat: deployment config for expected params and targets (#1214)
ecrupper 8b5b79f
resolve conflicts with buildkite
9328ecd
feat: opt-in gh app integration (#1217)
plyr4 b16622f
chore(yaml): add go-yaml types package (#1225)
ecrupper 3156794
resolve conflicts
57f8f9a
rebase
09da5df
enhance(yaml): allow for users to set version legacy for buildkite (#…
ecrupper 114ae7b
refactor(db/build): drop source index, add event index (#1228)
wass3rw3rk fd16b7b
feat(repo)!: add pending approval timeout (#1227)
ecrupper 68547d6
enhance(yaml): silent fix anchor merges in YAML maps (#1231)
ecrupper c7c1d0a
fix(webhook): use correct repo variable for enqueue (#1234)
ecrupper f43e2d1
feat(pipeline)!: add warnings to pipelines that use legacy YAML lib o…
ecrupper f1a98ac
feat: status endpoints (#1235)
plyr4 bf2313d
enhance(deploy): validate on CreateDeployment (#1236)
ecrupper 9a532cf
enhance(metrics): include route specific queue length (#1237)
ecrupper 9f13f97
chore(deps): update codecov/codecov-action action to v5 (#1222)
renovate[bot] 3920eab
fix(deps): update module github.com/google/go-github/v65 to v68 (#1229)
renovate[bot] 084fea3
chore: bump go (#1238)
wass3rw3rk 52df828
fix(deployment): use Config instead of ConfigBackoff when fetching de…
ecrupper 4eee25d
fix(build): use item build host (#1241)
ecrupper df21b7a
fix(build): ensure count/pagination links account for filter/query pa…
wass3rw3rk d24fd37
fix(yaml): improved messaging (#1243)
wass3rw3rk a051afa
keys for test report step
5254aad
resolve conflicts with buildkite
a138127
Merge branch 'main' into feat_test_report
timhuynh94 14660f5
mod tidy
05a09bb
fields for buildkite and ymal
657fe54
updates to storage client
d190aaf
upload with content type and size
2dab20b
feat(testreports): add initial tables
KellyMerrick f7942af
working model
f61dd12
remove test-report types
446c021
remove test-report.go and build/storage.go
06a2a52
remove test-report step from compiler validate
e861dc9
remove test-report step from compiler yaml and buildkite
05f7df9
white line
6a8c948
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 638c15a
mod tidy
d87c9d2
fixing upload test
0825d49
fix setup test
6a7de50
clean up some endpoints
c6adfae
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 5d12205
rename to client
6b41dc0
Potential fix for code scanning alert no. 472: Uncontrolled data used…
timhuynh94 e6ce703
make clean
203e6b7
gci fix
7b8bec6
clean up
73f78a8
mod tidy
6b6f9fa
gci fix
b2b717a
typo
8b0af38
fixing swagger
8a4997f
remove unused endpoint
4055774
fix api spec
fcfda99
Merge branch 'main' of github.com:go-vela/server into feat_reports_db
KellyMerrick d8c3c41
add test for minio
fdcc0b2
updated test
135783e
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 889d1ff
fix gci and spec
c80a2bf
fix some test
73cb815
lint fix
47d8912
update gci to be what main has
2da23b6
golint ci fix
6e07e6c
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 feb3400
make clean
c34f5fd
fix(linter): migrate to v2 due to breaking changes
e2b95c9
fix linter
eb0ce66
meger new golangci yml
033cee7
remove comments
470a166
comments
bb78f51
presingurl will work on 9002
782109d
fix test
bd0665a
lint fix
ca76bd4
feat(test reports): adding test report functionality
KellyMerrick 9b5142b
copy / pasta
KellyMerrick 3381037
fix minio UI issues
ef27334
changes to nginx and local dev
f7fcd81
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 0860045
fix linter
b274ea0
add status forbidden if storage is disable
59c3a33
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 6b75406
fix linter
5d4954b
trying to make reviewdog happy
7e2aa0c
missing comment
7286b5c
make linter happy
fd358ff
Merge branch 'main' into feat_test_report_key
timhuynh94 4abd985
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 18d3e89
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 90487e6
Merge branch 'main' into feat_test_report_key
timhuynh94 22457cb
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 4aa63ca
Merge branch 'main' into feat_test_report_storage_addition
timhuynh94 676e374
Merge branch 'main' into feat_test_report_key
timhuynh94 971163d
fix conflicts
83f56c8
fix conflicts
efef696
Merge branch 'feat_test_report_key' into test_feat_test_report
16458a9
change comments
67436c6
Merge branch 'main' into test_feat_test_report
timhuynh94 8aeb275
Merge branch 'main' of github.com:go-vela/server into feat_reports_db
KellyMerrick 9ff8305
change comments
087b96b
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick b4048dc
Merge branch 'main' into feat_reports_db
KellyMerrick 164b9f8
Merge branch 'feat_reports_db' of github.com:go-vela/server into feat…
KellyMerrick 7b4a233
feat(test attachments): add presigned url to table
KellyMerrick aeb45f1
Merge branch 'main' into test_feat_test_report
KellyMerrick 26b0ad6
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick 068ba05
Merge branch 'feat_reports_db' of github.com:go-vela/server into test…
KellyMerrick 824539e
test report db functions - need tests
ddf34ea
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick 77eea35
fix resources test but list and update still fail
a3cf898
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick a5c547e
working update test and move test attachments out of testreport
907729d
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick 0aff96c
passing tests for all list functions
fe97fd3
add count_test
d9df473
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick bcc8ee5
test(test reports): adding tests for create and get
KellyMerrick 937a518
add all tests
584bfdf
Merge branch 'main' into test_feat_test_report
timhuynh94 7241bf2
Merge branch 'main' into test_feat_test_report
timhuynh94 fc0c3f7
test(test attachments): adding tests for create, fix naming collisions
KellyMerrick 6b26e49
feat(test attachments): adding functions and tests for get, update, d…
KellyMerrick b271c3d
refactor(test attachments): linter fixes for test reports and attachm…
KellyMerrick 59410d6
test(test attachments): adding count and list, and their tests
KellyMerrick 70a427f
refactor(reports): consistent naming of test reports and test attachm…
KellyMerrick 0e25f56
Merge branch 'main' into test_feat_test_report
KellyMerrick a696f0e
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick 11610a7
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick 94591fd
merge main, fix conflicts
KellyMerrick 8297a79
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick 859b2ec
Merge branch 'main' into test_feat_test_report
timhuynh94 8ac045b
feat(test attachments): list build objects
KellyMerrick 1fce84e
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick bbceec2
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick 997500e
feat(test reports and attachments): add create endpoints
KellyMerrick fb28884
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick d6d64c2
feat(test reports): ability to create record in db
KellyMerrick 0e0637e
Merge branch 'main' of github.com:go-vela/server into test_feat_test_…
KellyMerrick 4891071
fix(test reports): we don't need a body
KellyMerrick ea9533c
add mock for testreport
40f9f09
Merge branch 'main' into test_feat_test_report
timhuynh94 67dde86
feat(test attachments): ability to create record in db
KellyMerrick 928bc8c
Merge branch 'test_feat_test_report' of github.com:go-vela/server int…
KellyMerrick 5b48bde
add filetype constants
a488259
feat(test attachments): post to put, and now update
KellyMerrick de62cdc
modified comments
092be1b
add flags_test for storage
5d32af0
fix setup and test
31fb17f
fix storage test
a48f80c
fixing test
ba647b1
Merge branch 'main' into test_feat_test_report
timhuynh94 4c7fee2
fix liniting
1839bc4
fix test
030e915
golanci run fix
68d866f
fix liniting
eea6f8a
add and fix tests
4975ca8
golanci run fix
a9dc2bb
Merge branch 'main' into test_feat_test_report
timhuynh94 23f3576
add feature flag for storage
75345c5
refactor
3790af6
refactor
8c88556
fixed conflicts
8a4c26d
Merge branch 'main' into test_feat_test_report
timhuynh94 4bbdce1
fix linters
fad495a
fix linters
13ade3f
cleanup 1st round
d996763
revert scm to source
39c4a61
fix typos
082ceef
cleanup 2nd round
1f77845
fix gci
d7455d7
Merge branch 'main' into test_feat_test_report
timhuynh94 833a64d
Merge branch 'main' into test_feat_test_report
wass3rw3rk 98cf9a5
feat(test attachments): list test attachments for a build
KellyMerrick 9a5585f
feat(test attachments): address linter and fix test
KellyMerrick 83531d9
feat(test attachments): fix swagger
KellyMerrick 9d7aa03
rename to artifacts and paths
4ef9d0d
rename to artifacts and paths
d677bde
feat(artifacts): remove reports layer and chg test attachments to art…
KellyMerrick c758c09
feat(artifacts): fix conflicts
KellyMerrick 5fa0f19
Merge branch 'main' into feat_artifacts
KellyMerrick 0e774b6
feat(artifacts): fix conflicts
KellyMerrick 4c840d6
feat(artifacts): address linter
KellyMerrick 14e852b
feat(artifacts): .env_ flexibility for local dev
KellyMerrick 1b076c9
feat(artifacts): rename TextFileExtensions
KellyMerrick 78bfa38
Merge branch 'main' into feat_artifacts
timhuynh94 8ebdbb0
switch to sts for storage
Z003J76_tgt 9db8997
remove artifacts table
Z003J76_tgt b8a3e9e
Merge branch 'main' into feat_artifacts
timhuynh94 1a88bf1
remove getinfo for storage
Z003J76_tgt 90deb1b
add mock for sts creds
Z003J76_tgt 38613c2
add presignurl for list build
Z003J76_tgt fff49a1
removed comments
Z003J76_tgt 9a8f2f0
move sts under build for build token
Z003J76_tgt a8b246e
fix mock
Z003J76_tgt 6fc569a
Merge branch 'main' into feat_artifacts
timhuynh94 5a05cad
fix tests and lint
Z003J76_tgt da01877
fix lints
Z003J76_tgt 64f399c
fix swagger
Z003J76_tgt 8ffbbae
fix swagger
Z003J76_tgt 1cfeda0
fix api types artifacts
Z003J76_tgt c68c57f
remove storage admin endpoints
Z003J76_tgt 49cc31c
Merge branch 'main' into feat_artifacts
timhuynh94 6fa3dc6
clean up unused code
Z003J76_tgt 3559838
feat(artifacts): add artifacts flag to pipeline table, merge main
KellyMerrick 24b83f3
feat(artifacts): add artifacts getter setter
KellyMerrick 3c2d30f
feat(artifacts): address failing tests
KellyMerrick a06e4ca
feat(artifacts): oops, another failing test
KellyMerrick 906fc3e
feat(artifacts): oops, another another failing test
KellyMerrick 87d02aa
feat(artifacts): address linter
KellyMerrick 6611a66
clean up unused code and move config under service
Z003J76_tgt fd2e8f4
fix lints
Z003J76_tgt c554a6a
add header
Z003J76_tgt d3c58bd
Update compiler/types/yaml/artifacts.go
timhuynh94 ba70dd5
Update cmd/vela-server/server.go
timhuynh94 1ebcf22
Update mock/server/worker.go
timhuynh94 104d820
remove white line
Z003J76_tgt aa1bc67
fix lintes and address Mays comments
Z003J76_tgt 46a6085
move middleware storage
timhuynh94 15ea3a3
fix swagger
timhuynh94 825e308
fix linters
timhuynh94 fed1d0e
fix linters
timhuynh94 f64d7b3
Merge branch 'main' into feat_artifacts
KellyMerrick f5f1e48
feat(artifacts): address linter
KellyMerrick 3e0f5e3
Merge branch 'feat_artifacts' of github.com:go-vela/server into feat_…
KellyMerrick 0f9801e
address Mays comments
timhuynh94 6e92f6c
fix tests and linters
timhuynh94 7897fa1
remove filetypes
timhuynh94 6e9b57b
Merge branch 'main' into feat_artifacts
timhuynh94 3d187e3
fix gosec lint
timhuynh94 b1da27e
fix gosec lint
timhuynh94 b5b3437
fix gosec lint
timhuynh94 15349b7
reword some storage context for STS
timhuynh94 bed3922
fix docker compose and removed tests
timhuynh94 1d5551e
fix linters
timhuynh94 a799f38
Merge branch 'main' into feat_artifacts
ecrupper 940d6e8
Update api/storage/storage.go
timhuynh94 fec4e95
fix docs
timhuynh94 7c75d03
fix linters config
timhuynh94 148826f
change port
timhuynh94 d4cb9bd
fix docs and remove comment
timhuynh94 16f405c
Update docker-compose.yml
timhuynh94 482cbb7
fix comments
timhuynh94 117c24f
change env
timhuynh94 524ee86
remove queue addr
timhuynh94 6d66c69
remove queue addr
timhuynh94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ secrets.env | |
|
|
||
| # Dotenv environment file | ||
| .env | ||
| .env_* | ||
| .env.test | ||
|
|
||
| # Files to be excluded. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| // Package storage provides the storage handlers for the Vela API. | ||
| // | ||
| // Usage: | ||
| // | ||
| // import "github.com/go-vela/server/api/storage" | ||
| package storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package storage | ||
|
|
||
| import ( | ||
| "net/http" | ||
| "strconv" | ||
|
|
||
| "github.com/gin-gonic/gin" | ||
| "github.com/sirupsen/logrus" | ||
|
|
||
| "github.com/go-vela/server/router/middleware/build" | ||
| "github.com/go-vela/server/router/middleware/repo" | ||
| "github.com/go-vela/server/storage" | ||
| ) | ||
|
|
||
| // swagger:operation GET /api/v1/repos/{org}/{repo}/builds/{build}/storage storage ListBuildObjectNames | ||
| // | ||
| // List object names for a specific build in a bucket. | ||
| // | ||
| // --- | ||
| // produces: | ||
| // - application/json | ||
| // parameters: | ||
| // - name: org | ||
| // in: path | ||
| // description: Organization name | ||
| // required: true | ||
| // type: string | ||
| // - name: repo | ||
| // in: path | ||
| // description: Repository name | ||
| // required: true | ||
| // type: string | ||
| // - name: build | ||
| // in: path | ||
| // description: Build number | ||
| // required: true | ||
| // type: integer | ||
| // format: int64 | ||
| // security: | ||
| // - ApiKeyAuth: [] | ||
| // responses: | ||
| // 200: | ||
| // description: Successfully listed object names for the build | ||
| // 400: | ||
| // description: Bad request due to invalid parameters | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 403: | ||
| // description: Storage is not enabled or invalid token | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 404: | ||
| // description: Repo not found | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 500: | ||
| // description: Unexpected server error | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
|
|
||
| // ListBuildObjectNames represents the API handler to list object names for a specific build. | ||
| func ListBuildObjectNames(c *gin.Context) { | ||
| enable := c.MustGet("storage-enable").(bool) | ||
| if !enable { | ||
| l := c.MustGet("logger").(*logrus.Entry) | ||
| l.Info("storage is not enabled, skipping credentials request") | ||
| c.JSON(http.StatusForbidden, gin.H{"error": "storage is not enabled"}) | ||
|
|
||
| return | ||
| } | ||
|
|
||
| l := c.MustGet("logger").(*logrus.Entry) | ||
|
|
||
| r := repo.Retrieve(c) | ||
| b := build.Retrieve(c) | ||
| org := r.GetOrg() | ||
| buildNum := b.GetNumber() | ||
|
|
||
| l.Debugf("listing object names in bucket for %s/%s build #%d", org, r.GetName(), buildNum) | ||
|
|
||
| // Call the ListBuildObjectNames method that handles prefix filtering | ||
| objectNames, err := storage.FromGinContext(c).ListBuildObjectNames( | ||
| c.Request.Context(), | ||
| org, | ||
| r.GetName(), | ||
| strconv.FormatInt(buildNum, 10), | ||
| ) | ||
| if err != nil { | ||
| l.Errorf("unable to list objects for %s/%s build #%d: %v", org, r.GetName(), buildNum, err) | ||
| c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) | ||
|
|
||
| return | ||
| } | ||
|
|
||
| c.JSON(http.StatusOK, gin.H{"names": objectNames}) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package storage | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "net/http" | ||
|
|
||
| "github.com/gin-gonic/gin" | ||
| "github.com/sirupsen/logrus" | ||
|
|
||
| "github.com/go-vela/server/router/middleware/build" | ||
| "github.com/go-vela/server/router/middleware/repo" | ||
| "github.com/go-vela/server/storage" | ||
| ) | ||
|
|
||
| // swagger:operation GET /api/v1/repos/{org}/{repo}/builds/{build}/storage/sts storage GetSTSCreds | ||
| // | ||
| // Get temporary STS credentials for build storage uploads. | ||
| // | ||
| // Generates temporary AWS STS credentials scoped to allow PUT operations | ||
| // into the configured storage bucket under the build-specific prefix. | ||
| // | ||
| // --- | ||
| // produces: | ||
| // - application/json | ||
| // parameters: | ||
| // - name: org | ||
| // in: path | ||
| // description: Organization name | ||
| // required: true | ||
| // type: string | ||
| // - name: repo | ||
| // in: path | ||
| // description: Repository name | ||
| // required: true | ||
| // type: string | ||
| // - name: build | ||
| // in: path | ||
| // description: Build number | ||
| // required: true | ||
| // type: integer | ||
| // format: int64 | ||
| // security: | ||
| // - ApiKeyAuth: [] | ||
| // responses: | ||
| // 200: | ||
| // description: Successfully generated temporary STS credentials | ||
| // schema: | ||
| // $ref: '#/definitions/STSCreds' | ||
| // 400: | ||
| // description: Bad request due to invalid parameters | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 403: | ||
| // description: Storage is not enabled or invalid token | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 404: | ||
| // description: Repo not found | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
| // 500: | ||
| // description: Unable to assume role or generate credentials | ||
| // schema: | ||
| // $ref: '#/definitions/Error' | ||
|
|
||
| // GetSTSCreds represents the API handler to generate temporary STS credentials for build storage uploads. | ||
| func GetSTSCreds(c *gin.Context) { | ||
| l := c.MustGet("logger").(*logrus.Entry) | ||
|
|
||
| enabled := c.MustGet("storage-enable").(bool) | ||
| if !enabled { | ||
| l.Info("storage is not enabled, skipping credentials request") | ||
| c.JSON(http.StatusForbidden, gin.H{"error": "storage is not enabled"}) | ||
|
|
||
| return | ||
| } | ||
|
|
||
| r := repo.Retrieve(c) | ||
| org := r.GetOrg() | ||
| b := build.Retrieve(c) | ||
| repoName := r.GetName() | ||
| buildNum := b.GetNumber() | ||
| ctx := c.Request.Context() | ||
|
|
||
| prefix := fmt.Sprintf("%s/%s/%d/", org, repoName, buildNum) | ||
|
|
||
| sessionName := fmt.Sprintf("vela-%s-%s-%d", org, repoName, buildNum) | ||
|
|
||
| creds, err := storage.FromGinContext(c).AssumeRole(ctx, int(r.GetTimeout())*60, prefix, sessionName) | ||
|
timhuynh94 marked this conversation as resolved.
|
||
| if creds == nil { | ||
| l.Errorf("unable to assume role and generate temporary credentials without error %s", err) | ||
| c.JSON(http.StatusInternalServerError, gin.H{"error": "unable to assume role and generate temporary credentials"}) | ||
|
|
||
| return | ||
| } | ||
|
|
||
| if err != nil { | ||
| l.Errorf("unable to assume role: %v", err) | ||
| c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) | ||
|
|
||
| return | ||
| } | ||
|
|
||
| c.JSON(http.StatusOK, creds) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package types | ||
|
|
||
| import ( | ||
| "github.com/minio/minio-go/v7" | ||
| ) | ||
|
|
||
| // Bucket is the API types representation of an object storage. | ||
| // | ||
| // swagger:model CreateBucket | ||
| type Bucket struct { | ||
| BucketName string `json:"bucket_name,omitempty"` | ||
| MakeBucketOptions minio.MakeBucketOptions `json:"make_bucket_options,omitempty"` | ||
| ListObjectsOptions minio.ListObjectsOptions `json:"list_objects_options,omitempty"` | ||
| Recursive bool `json:"recursive"` | ||
| } | ||
|
|
||
| type Object struct { | ||
| ObjectName string `json:"object_name,omitempty"` | ||
| Bucket Bucket `json:"bucket,omitempty"` | ||
| FilePath string `json:"file_path,omitempty"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package types | ||
|
|
||
| import "time" | ||
|
|
||
| // STSCreds defines the structure for temporary credentials used for object storage access. | ||
| // | ||
| // swagger:model STSCreds | ||
| type STSCreds struct { | ||
| AccessKey string `json:"access_key"` | ||
|
timhuynh94 marked this conversation as resolved.
|
||
| SecretKey string `json:"secret_key"` | ||
| SessionToken string `json:"session_token"` | ||
|
|
||
| Endpoint string `json:"endpoint"` | ||
| Bucket string `json:"bucket"` | ||
| Region string `json:"region,omitempty"` | ||
| Prefix string `json:"prefix,omitempty"` | ||
| Secure bool `json:"secure,omitempty"` | ||
|
|
||
| ExpiresAt time.Time `json:"expires_at,omitempty"` | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.