config

package
v0.2.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 DebugViperConfig() (string, error)

func GetAPIKey

func GetAPIKey() string

func GetBaseURL

func GetBaseURL() string

func GetEndpointURL

func GetEndpointURL(endpoint string) (string, error)

func GetUserAgentHeader added in v0.2.13

func GetUserAgentHeader() string

func ReadConfigFile

func ReadConfigFile(filePath string) error

func RedactedReqInfo added in v0.2.13

func RedactedReqInfo(req *http.Request) string

func SaveURLToConfig

func SaveURLToConfig(newURL string) error

func SchemeHostOnly added in v0.2.7

func SchemeHostOnly(longURL string) (string, error)

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

func VerifyToken(datarobotHost, token string) (bool, error)

VerifyToken verifies if the datarobot host + api key pair correspond to a valid pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL