Remove deprecated options
This commit is contained in:
parent
bee86b5ac7
commit
a3e4c85ec0
62 changed files with 43 additions and 985 deletions
|
@ -35,8 +35,7 @@ const (
|
|||
const pluginsURL = "https://plugins.traefik.io/public/"
|
||||
|
||||
const (
|
||||
hashHeader = "X-Plugin-Hash"
|
||||
tokenHeader = "X-Token"
|
||||
hashHeader = "X-Plugin-Hash"
|
||||
)
|
||||
|
||||
// ClientOptions the options of a Traefik plugins client.
|
||||
|
@ -49,7 +48,6 @@ type Client struct {
|
|||
HTTPClient *http.Client
|
||||
baseURL *url.URL
|
||||
|
||||
token string
|
||||
archives string
|
||||
stateFile string
|
||||
goPath string
|
||||
|
@ -158,10 +156,6 @@ func (c *Client) Download(ctx context.Context, pName, pVersion string) (string,
|
|||
req.Header.Set(hashHeader, hash)
|
||||
}
|
||||
|
||||
if c.token != "" {
|
||||
req.Header.Set(tokenHeader, c.token)
|
||||
}
|
||||
|
||||
resp, err := c.HTTPClient.Do(req)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to call service: %w", err)
|
||||
|
@ -222,10 +216,6 @@ func (c *Client) Check(ctx context.Context, pName, pVersion, hash string) error
|
|||
req.Header.Set(hashHeader, hash)
|
||||
}
|
||||
|
||||
if c.token != "" {
|
||||
req.Header.Set(tokenHeader, c.token)
|
||||
}
|
||||
|
||||
resp, err := c.HTTPClient.Do(req)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to call service: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue