This repository was archived by the owner on Nov 5, 2024. It is now read-only.
File tree 3 files changed +5
-20
lines changed
3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ require (
6
6
github.com/adrg/xdg v0.4.0
7
7
github.com/docker/docker-credential-helpers v0.8.2
8
8
github.com/glebarez/sqlite v1.11.0
9
- github.com/gptscript-ai/gptscript v0.9.4
10
9
gorm.io/gorm v1.25.12
11
10
k8s.io/apimachinery v0.31.1
12
11
k8s.io/apiserver v0.31.1
@@ -20,7 +19,6 @@ require (
20
19
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
21
20
github.com/cespare/xxhash/v2 v2.3.0 // indirect
22
21
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
23
- github.com/docker/cli v26.0.0+incompatible // indirect
24
22
github.com/dustin/go-humanize v1.0.1 // indirect
25
23
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
26
24
github.com/felixge/httpsnoop v1.0.4 // indirect
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
18
18
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
19
19
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM =
20
20
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
21
- github.com/docker/cli v26.0.0+incompatible h1:90BKrx1a1HKYpSnnBFR6AgDq/FqkHxwlUyzJVPxD30I =
22
- github.com/docker/cli v26.0.0+incompatible /go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8 =
23
21
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo =
24
22
github.com/docker/docker-credential-helpers v0.8.2 /go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M =
25
23
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY =
@@ -67,8 +65,6 @@ github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2
67
65
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af /go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo =
68
66
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0 =
69
67
github.com/google/uuid v1.6.0 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
70
- github.com/gptscript-ai/gptscript v0.9.4 h1:8msPI7zdzNv6kElLqP/mIFFoir2CWbyf+1OJiC479FY =
71
- github.com/gptscript-ai/gptscript v0.9.4 /go.mod h1:STd/eyhAkkC0YUL8B0tBs15m+uxm7yliur8HicZJL68 =
72
68
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0 =
73
69
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 /go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k =
74
70
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8 =
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"github.com/adrg/xdg"
11
11
"github.com/docker/docker-credential-helpers/credentials"
12
12
"github.com/glebarez/sqlite"
13
- "github.com/gptscript-ai/gptscript/pkg/config"
14
13
"gorm.io/gorm"
15
14
"gorm.io/gorm/logger"
16
15
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -32,20 +31,15 @@ var groupResource = schema.GroupResource{
32
31
}
33
32
34
33
type Sqlite struct {
35
- cfg * config.CLIConfig
36
34
db * gorm.DB
37
35
transformer value.Transformer
38
36
}
39
37
40
38
func NewSqlite (ctx context.Context ) (Sqlite , error ) {
41
- // Passing the empty string here will first look for the config location in GPTSCRIPT_CONFIG_FILE.
42
- // If that is not set, it will look at xdg.ConfigFile("gptscript/config.json"), the default location.
43
- cfg , err := config .ReadCLIConfig ("" )
44
- if err != nil {
45
- return Sqlite {}, fmt .Errorf ("error reading CLI config: %w" , err )
46
- }
47
-
48
- var dbPath string
39
+ var (
40
+ dbPath string
41
+ err error
42
+ )
49
43
if os .Getenv ("GPTSCRIPT_SQLITE_FILE" ) != "" {
50
44
dbPath = os .Getenv ("GPTSCRIPT_SQLITE_FILE" )
51
45
} else {
@@ -69,10 +63,7 @@ func NewSqlite(ctx context.Context) (Sqlite, error) {
69
63
return Sqlite {}, fmt .Errorf ("failed to auto migrate GptscriptCredential: %w" , err )
70
64
}
71
65
72
- s := Sqlite {
73
- cfg : cfg ,
74
- db : db ,
75
- }
66
+ s := Sqlite {db : db }
76
67
77
68
encryptionConf , err := readEncryptionConfig (ctx )
78
69
if err != nil {
You can’t perform that action at this time.
0 commit comments