config

package
v0.0.0-...-45e1d17 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthType

func AuthType() string

func BaseURL

func BaseURL() string

BaseURL returns base URL

func BasicAuthPassword

func BasicAuthPassword() string

func BasicAuthUser

func BasicAuthUser() string

func GoogleCloudStorageBucket

func GoogleCloudStorageBucket() string

func JWTExpiration

func JWTExpiration() int64

func JWTSecret

func JWTSecret() string

func Listen

func Listen() string

func LoadConf

func LoadConf() error

LoadConf Load Configurations

func MainPageSuffix

func MainPageSuffix() string

func NotFoundPage

func NotFoundPage() string

func OIDCAuthorizeURL

func OIDCAuthorizeURL() string

func OIDCClientID

func OIDCClientID() string

func OIDCClientSecret

func OIDCClientSecret() string

func OIDCGoogleHostedDomain

func OIDCGoogleHostedDomain() string

func OIDCProvider

func OIDCProvider() string

func OIDCScopes

func OIDCScopes() []string

func OIDCTokenURL

func OIDCTokenURL() string

func Port

func Port() string

func ValidateBasicAuth

func ValidateBasicAuth() error

func ValidateOIDC

func ValidateOIDC() error

Types

type Config

type Config struct {
	Listen                   string   `envconfig:"listen" default:""`
	Port                     string   `envconfig:"port" default:"8080"`
	GoogleCloudStorageBucket string   `envconfig:"google_cloud_storage_bucket"`
	MainPageSuffix           string   `envconfig:"main_page_suffix" default:"index.html"`
	NotFoundPage             string   `envconfig:"not_found_page" default:""`
	BaseURL                  string   `envconfig:"base_url" default:""`
	AuthType                 string   `envconfig:"auth_type" default:"none"`
	OIDCProvider             string   `envconfig:"oidc_provider" default:"https://accounts.google.com"`
	OIDCScopes               []string `envconfig:"oidc_scopes" default:"openid,profile,email"`
	OIDCAuthorizeURL         string   `envconfig:"oidc_authorize_url" default:""`
	OIDCTokenURL             string   `envconfig:"oidc_token_url" default:""`
	OIDCClientID             string   `envconfig:"oidc_client_id" default:""`
	OIDCClientSecret         string   `envconfig:"oidc_client_secret" default:""`
	OIDCGoogleHostedDomain   string   `envconfig:"oidc_google_hosted_domain" default:""`
	JWTExpiration            int64    `envconfig:"jwt_expiration" default:"3600"`
	JWTSecret                string   `envconfig:"jwt_secret"`
	BasicAuthUser            string   `envconfig:"basic_auth_user" default:""`
	BasicAuthPassword        string   `envconfig:"basic_auth_password" default:""`
}

Jump to

Keyboard shortcuts

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