-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(main): extract common codes for artifact from model and pipelin…
…e backend (#20) Because - common codes will also be used for artifact run logging This commit - extract common codes from model and pipeline backend
- Loading branch information
Showing
16 changed files
with
2,422 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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,2 @@ | ||
# version | ||
GOLANG_VERSION=1.22 |
This file contains 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 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,31 @@ | ||
name: golangci-lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Load .env file | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .env | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GOLANG_VERSION }} | ||
cache: false | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 | ||
args: --timeout=10m |
This file contains 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 @@ | ||
.idea |
This file contains 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,15 @@ | ||
package async | ||
|
||
import "fmt" | ||
|
||
func GoSafe(fn func()) { | ||
go func() { | ||
defer func() { | ||
if r := recover(); r != nil { | ||
fmt.Printf("go routine recovered from panic: %s\n", r) | ||
} | ||
}() | ||
|
||
fn() | ||
}() | ||
} |
This file contains 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,9 @@ | ||
package constant | ||
|
||
const ( | ||
HeaderUserUIDKey = "Instill-User-Uid" | ||
HeaderRequesterUIDKey = "Instill-Requester-Uid" | ||
HeaderUserAgent = "Instill-User-Agent" | ||
|
||
ContentTypeJSON = "application/json" | ||
) |
This file contains 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 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 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,11 @@ | ||
package minio | ||
|
||
// Config is the minio configuration. | ||
type Config struct { | ||
Host string `koanf:"host"` | ||
Port string `koanf:"port"` | ||
RootUser string `koanf:"rootuser"` | ||
RootPwd string `koanf:"rootpwd"` | ||
BucketName string `koanf:"bucketname"` | ||
Secure bool `koanf:"secure"` // Add this line for the Secure option | ||
} |
Oops, something went wrong.