mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
35 lines
763 B
Go
35 lines
763 B
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package config
|
|
|
|
import (
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/retry"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
type HTTPClient interface {
|
|
Do(req *http.Request) (*http.Response, error)
|
|
}
|
|
|
|
type SDKConfiguration struct {
|
|
Client HTTPClient
|
|
Security func(context.Context) (interface{}, error)
|
|
ServerURL string
|
|
ServerIndex int
|
|
ServerList []string
|
|
ServerVariables []map[string]string
|
|
UserAgent string
|
|
RetryConfig *retry.Config
|
|
Timeout *time.Duration
|
|
}
|
|
|
|
func (c *SDKConfiguration) GetServerDetails() (string, map[string]string) {
|
|
if c.ServerURL != "" {
|
|
return c.ServerURL, nil
|
|
}
|
|
|
|
return c.ServerList[c.ServerIndex], c.ServerVariables[c.ServerIndex]
|
|
}
|