tokenstore

package
v0.0.0-...-ff97f34 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenSet

type TokenSet struct {
	AccessToken string
	ExpiresAt   int64
}

type TokenStore

type TokenStore struct {
	// The git proxy config
	Config *config.GitProxyConfig
	// The git providers
	Providers map[string]config.GitProvider
	// Period used to refresh renku tokens
	RefreshTickerPeriod time.Duration
	// Safety margin for when to consider a token expired. For example if this is set to
	// 30 seconds then the token is considered expired if it expires in the next 30 seconds.
	ExpirationLeeway time.Duration
	// contains filtered or unexported fields
}

func New

func (*TokenStore) GetGitAccessToken

func (s *TokenStore) GetGitAccessToken(provider string, encode bool) (string, error)

Returns a valid access token for the corresponding git provider. If the token is expired, a new one will be retrieved using the renku access token.

Jump to

Keyboard shortcuts

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