Skip to content

Commit 9221771

Browse files
committed
test: integrate test
1 parent bece620 commit 9221771

File tree

10 files changed

+632
-144
lines changed

10 files changed

+632
-144
lines changed

api/aksk_opts.go

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package api
2+
3+
import (
4+
"context"
5+
"net/http"
6+
7+
"github.com/jiaozifs/jiaozifs/auth/aksk"
8+
)
9+
10+
func AkSkOption(ak, sk string) ClientOption {
11+
return func(client *Client) error {
12+
client.RequestEditors = append(client.RequestEditors, func(_ context.Context, req *http.Request) error {
13+
signer := aksk.NewV0Signer(ak, sk)
14+
return signer.Sign(req)
15+
})
16+
return nil
17+
}
18+
}

0 commit comments

Comments
 (0)