Skip to content

Commit 05c9303

Browse files
committed
Add dependencies and remove proxy configuration
1 parent d1b5a6c commit 05c9303

File tree

4 files changed

+9
-73
lines changed

4 files changed

+9
-73
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.21
55
require (
66
github.com/PuerkitoBio/goquery v1.9.1
77
github.com/google/uuid v1.6.0
8+
github.com/robertkrimen/otto v0.3.0
89
github.com/stretchr/testify v1.9.0
910
go.uber.org/zap v1.27.0
1011
golang.org/x/net v0.22.0
@@ -17,5 +18,7 @@ require (
1718
github.com/stretchr/objx v0.5.2 // indirect
1819
go.uber.org/multierr v1.10.0 // indirect
1920
golang.org/x/sys v0.18.0 // indirect
21+
golang.org/x/text v0.14.0 // indirect
22+
gopkg.in/sourcemap.v1 v1.0.5 // indirect
2023
gopkg.in/yaml.v3 v3.0.1 // indirect
2124
)

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
88
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
99
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1010
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
11+
github.com/robertkrimen/otto v0.3.0 h1:5RI+8860NSxvXywDY9ddF5HcPw0puRsd8EgbXV0oqRE=
12+
github.com/robertkrimen/otto v0.3.0/go.mod h1:uW9yN1CYflmUQYvAMS0m+ZiNo3dMzRUDQJX0jWbzgxw=
1113
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
1214
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
1315
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
@@ -51,12 +53,16 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
5153
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
5254
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
5355
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
56+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
57+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
5458
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
5559
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
5660
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
5761
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
5862
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
5963
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
6064
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
65+
gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI=
66+
gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=
6167
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
6268
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

httpclient/httpclient_client.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"time"
1414

1515
"github.com/deploymenttheory/go-api-http-client/logger"
16-
"github.com/deploymenttheory/go-api-http-client/proxy"
1716
"github.com/deploymenttheory/go-api-http-client/redirecthandler"
1817
"go.uber.org/zap"
1918
)
@@ -39,7 +38,6 @@ type ClientConfig struct {
3938
Auth AuthConfig // User can either supply these values manually or pass from LoadAuthConfig/Env vars
4039
Environment EnvironmentConfig // User can either supply these values manually or pass from LoadAuthConfig/Env vars
4140
ClientOptions ClientOptions // Optional configuration options for the HTTP Client
42-
Proxy ProxyConfig // Proxy configuration options for the HTTP Client
4341
}
4442

4543
// AuthConfig represents the structure to read authentication details from a JSON configuration file.
@@ -74,13 +72,6 @@ type ClientOptions struct {
7472
CustomTimeout time.Duration
7573
}
7674

77-
type ProxyConfig struct {
78-
ProxyURL string `json:"ProxyURL,omitempty"`
79-
ProxyUsername string `json:"ProxyUsername,omitempty"`
80-
ProxyPassword string `json:"ProxyPassword,omitempty"`
81-
ProxyAuthToken string `json:"ProxyAuthToken,omitempty"`
82-
}
83-
8475
// ClientPerformanceMetrics captures various metrics related to the client's
8576
// interactions with the API, providing insights into its performance and behavior.
8677
type PerformanceMetrics struct {
@@ -136,11 +127,6 @@ func BuildClient(config ClientConfig) (*Client, error) {
136127
return nil, err
137128
}
138129

139-
// Conditionally Initialize the proxy if provided in the configuration
140-
if err := proxy.InitializeProxy(httpClient, config.Proxy.ProxyURL, config.Proxy.ProxyUsername, config.Proxy.ProxyPassword, config.Proxy.ProxyAuthToken, log); err != nil {
141-
return nil, err
142-
}
143-
144130
// Create a new HTTP client with the provided configuration.
145131
client := &Client{
146132
APIHandler: apiHandler,

proxy/proxy.go

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)