config

package
v0.0.0-...-7d26c48 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildInfo *debug.BuildInfo
	Version   string
)
View Source
var C = Config{
	LogLevel: "INFO",
	Web: WebConfig{
		Bind: ":8080",
	},
}

Functions

func Load

func Load(ctx context.Context) error

Types

type Config

type Config struct {
	Database string
	Web      WebConfig
	OAuth2   OAuth2
	LogLevel string
}

type OAuth2

type OAuth2 struct {
	ClientID     string
	ClientSecret string
	ProviderURL  string
	Scopes       []string
	// contains filtered or unexported fields
}

func (OAuth2) GetConfig

func (o OAuth2) GetConfig(postAuthPath string) *oauth2.Config

func (*OAuth2) Load

func (o *OAuth2) Load(ctx context.Context) error

func (OAuth2) UserInfo

func (o OAuth2) UserInfo(ctx context.Context, tokenSource oauth2.TokenSource) (*oidc.UserInfo, error)

type WebConfig

type WebConfig struct {
	Bind       string
	SessionKey string
	BaseURL    string
}

Jump to

Keyboard shortcuts

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