chore: move '/internal/pkg' to '/pkg'

This commit is contained in:
Fu Diwei
2025-06-17 15:54:21 +08:00
parent 30840bbba5
commit 205275b52d
611 changed files with 693 additions and 693 deletions

View File

@@ -0,0 +1,3 @@
package common
const BASE_URL = "https://api.gcore.com"

View File

@@ -0,0 +1,24 @@
package common
import (
"net/http"
"github.com/G-Core/gcorelabscdn-go/gcore"
)
type AuthRequestSigner struct {
apiToken string
}
var _ gcore.RequestSigner = (*AuthRequestSigner)(nil)
func NewAuthRequestSigner(apiToken string) *AuthRequestSigner {
return &AuthRequestSigner{
apiToken: apiToken,
}
}
func (s *AuthRequestSigner) Sign(req *http.Request) error {
req.Header.Set("Authorization", "APIKey "+s.apiToken)
return nil
}