config

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedToken added in v1.4.0

type CachedToken struct {
	RefreshToken string
	AccessToken  string
	ExpiryDate   time.Time
	Type         string
}

type Config

type Config struct {
	// Required: API authentication credentials
	Credentials struct {
		ClientID     string
		ClientSecret string
	}

	// Optional: open a browser to complete authentication if user interaction is required
	OpenBrowser   bool
	Authenticator InteractiveAuthenticator

	// Optional: token cache if caching previous credentials
	TokenCache *CachedToken

	// Optional: logger instance
	Logger *logrus.Logger

	// Optional: the API scope permissions that the token should have
	// limit this as much as possible to limit token leakage impact
	// https://intigriti.readme.io/reference/api-token-scopes
	APIScopes []string
}

type InteractiveAuthenticator added in v1.4.0

type InteractiveAuthenticator interface {
	OpenURL(url string) error
}

Jump to

Keyboard shortcuts

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