We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e021eb commit 2c0c222Copy full SHA for 2c0c222
6 files changed
apps/apps.go
@@ -102,9 +102,9 @@ func Logs(c *drycc.Client, appID string, request api.AppLogsRequest) (*websocket
102
return nil, err
103
}
104
config.Header = http.Header{
105
- "User-Agent": {c.UserAgent},
106
- "Authorization": {"token " + c.Token},
107
- "X-Drycc-Builder-Auth": {c.HooksToken},
+ "User-Agent": {c.UserAgent},
+ "Authorization": {"token " + c.Token},
+ "X-Drycc-Service-Key": {c.ServiceKey},
108
109
conn, err := websocket.DialConfig(config)
110
if err != nil {
drycc.go
@@ -82,10 +82,10 @@ type Client struct {
82
// Token is used to authenticate the request against the API.
83
Token string
84
85
- // HooksToken is the controller token used with the hooks resource.
+ // ServiceKey is the controller token used with the hooks resource.
86
// The hooks resource isn't intended to be used by users, so it requires
87
// a service token rather than a user token.
88
- HooksToken string
+ ServiceKey string
89
90
91
// APIVersion is the api version compatible with the SDK.
go.sum
@@ -4,8 +4,6 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
4
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
6
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7
-golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
8
-golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
9
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
10
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
11
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
http.go
@@ -30,8 +30,8 @@ func (c *Client) Do(req *http.Request) (*http.Response, error) {
30
req.Header.Add("Authorization", "token "+c.Token)
31
32
33
- if c.HooksToken != "" {
34
- req.Header.Add("X-Drycc-Builder-Auth", c.HooksToken)
+ if c.ServiceKey != "" {
+ req.Header.Add("X-Drycc-Service-Key", c.ServiceKey)
35
36
if req.Header.Get("Content-Type") == "" {
37
req.Header.Add("Content-Type", "application/json")
http_test.go
@@ -69,8 +69,8 @@ func (f fakeHTTPServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {
69
70
71
bT := "testing"
72
- if req.Header.Get("X-Drycc-Builder-Auth") != bT {
73
- fmt.Printf("Hook Token Wrong: Expected %s, Got %s\n", bT, req.Header.Get("X-Drycc-Builder-Auth"))
+ if req.Header.Get("X-Drycc-Service-Key") != bT {
+ fmt.Printf("Hook Token Wrong: Expected %s, Got %s\n", bT, req.Header.Get("X-Drycc-Service-Key"))
74
res.WriteHeader(http.StatusInternalServerError)
75
res.Write(nil)
76
return
@@ -161,7 +161,7 @@ func TestBasicRequest(t *testing.T) {
161
t.Fatal(err)
162
163
drycc.UserAgent = "test"
164
- drycc.HooksToken = "testing"
+ drycc.ServiceKey = "testing"
165
166
res, err := drycc.Request("POST", "/request/", []byte("test"))
167
ps/ps.go
@@ -42,9 +42,9 @@ func Exec(c *drycc.Client, appID, podID string, command api.Command) (*websocket
42
43
44
45
46
47
48
49
50
@@ -68,9 +68,9 @@ func Logs(c *drycc.Client, appID, podID string, request api.PodLogsRequest) (*we
68
0 commit comments