config

package
v0.0.0-...-bcb0865 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitProvider

type GitProvider struct {
	Id             string `json:"id"`
	AccessTokenUrl string `json:"access_token_url"`
}

type GitProxyConfig

type GitProxyConfig struct {
	// The port where the proxy is listening on
	ProxyPort int `mapstructure:"port"`
	// The port (separate from the proxy) where the proxy will respond to status probes
	HealthPort int `mapstructure:"health_port"`
	// True if this is an anonymous session
	AnonymousSession bool `mapstructure:"anonymous_session"`
	// The oauth access token issued by Keycloak to a logged in Renku user
	RenkuAccessToken string `mapstructure:"renku_access_token"`
	// The oauth refresh token issued by Keycloak to a logged in Renku user
	// It is assumed that the refresh tokens do not expire after use and can be reused.
	// This means that the 'Revoke Refresh Token' setting in the Renku realm in Keycloak
	// is not enabled.
	RenkuRefreshToken string `mapstructure:"renku_refresh_token"`
	// The url of the renku deployment
	RenkuURL *url.URL `mapstructure:"renku_url"`
	// The name of the Renku realm in Keycloak
	RenkuRealm string `mapstructure:"renku_realm"`
	// The Keycloak client ID to which the access token and refresh tokens were issued to
	RenkuClientID string `mapstructure:"renku_client_id"`
	// The client secret for the client ID
	RenkuClientSecret string `mapstructure:"renku_client_secret"`
	// The git repositories to proxy
	Repositories []GitRepository `mapstructure:"repositories"`
	// The git providers
	Providers []GitProvider `mapstructure:"providers"`
	// The time interval used for refreshing renku tokens
	RefreshCheckPeriodSeconds int64 `mapstructure:"refresh_check_period_seconds"`
}

func GetConfig

func GetConfig() (GitProxyConfig, error)

func (*GitProxyConfig) GetExpirationLeeway

func (c *GitProxyConfig) GetExpirationLeeway() time.Duration

func (*GitProxyConfig) GetRefreshCheckPeriod

func (c *GitProxyConfig) GetRefreshCheckPeriod() time.Duration

func (*GitProxyConfig) Validate

func (c *GitProxyConfig) Validate() error

type GitRepository

type GitRepository struct {
	Url      string `json:"url"`
	Provider string `json:"provider"`
}

Jump to

Keyboard shortcuts

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