Documentation
¶
Index ¶
- Constants
- Variables
- func CreateConfigFileDirIfNotExists() error
- func DebugViperConfig() (string, error)
- func GetAPIKey() string
- func GetBaseURL() string
- func GetEndpointURL(endpoint string) (string, error)
- func GetUserAgentHeader() string
- func ReadConfigFile(filePath string) error
- func RedactedReqInfo(req *http.Request) string
- func SaveURLToConfig(newURL string) error
- func SchemeHostOnly(longURL string) (string, error)
- func VerifyToken(datarobotHost, token string) (bool, error)
Constants ¶
View Source
const ( DataRobotURL = "endpoint" DataRobotAPIKey = "token" )
Variables ¶
View Source
var ErrInvalidURL = errors.New("Invalid URL.")
Functions ¶
func CreateConfigFileDirIfNotExists ¶
func CreateConfigFileDirIfNotExists() error
func DebugViperConfig ¶ added in v0.1.7
func GetBaseURL ¶
func GetBaseURL() string
func GetEndpointURL ¶
func GetUserAgentHeader ¶ added in v0.2.13
func GetUserAgentHeader() string
func ReadConfigFile ¶
func RedactedReqInfo ¶ added in v0.2.13
func SaveURLToConfig ¶
func SchemeHostOnly ¶ added in v0.2.7
SchemeHostOnly takes a URL like: https://app.datarobot.com/api/v2 and just returns https://app.datarobot.com (no trailing slash)
func VerifyToken ¶ added in v0.2.7
VerifyToken verifies if the datarobot host + api key pair correspond to a valid pair.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.