options

package
v0.0.0-...-b9c0981 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {

	// KratosAdminURL is the URL where ORY Kratos's Admin API is located at.
	// If this app and ORY Kratos are running in the same private network, this should be the
	// private network address (e.g. kratos-admin.svc.cluster.local).
	KratosAdminURL *url.URL

	// KratosPublicURL is the URL where ORY Kratos's Public API is located at.
	// If this app and ORY Kratos are running in the same private network, this should be the
	// private network address (e.g. kratos-public.svc.cluster.local).
	KratosPublicURL *url.URL

	// KratosBrowserURL is the URL where ORY Kratos's self service browser endpoints are located at.
	KratosBrowserURL *url.URL

	// BaseURL is the base url of this app. If served e.g. behind a proxy or via GitHub pages
	// this would be the path, e.g. https://mywebsite.com/kratos-selfservice-ui-go/. Must be absolute!
	BaseURL *url.URL

	// Host that the app is listening on. Used together with Port
	Host string

	// Port that this app is listening on. Used together with Host
	Port int

	// Duration to wait when asked to shutdown gracefully
	ShutdownWait time.Duration

	// TLSCertPath is an optional Path to certificate file.
	// Should be set up together with TLSKeyPath to enable HTTPS.
	TLSCertPath string
	// TLSCertPath is an optional path to key file.
	// Should be set up together with TLSCertPath to enable HTTPS.
	TLSKeyPath string

	// Pairs of authentication and encryption keys for Cookies
	CookieStoreKeyPairs [][]byte
}

Options holds the application command line options

func NewOptions

func NewOptions() *Options

func (*Options) Address

func (o *Options) Address() string

Address that this application will listen on

func (*Options) LoginFlowURL

func (o *Options) LoginFlowURL() string

LoginFlowURL returns the URL to redirect to that will start the login flow

func (*Options) LoginPageURL

func (o *Options) LoginPageURL() string

LoginURL returns the URL to redirect to that shows the login page

func (*Options) LogoutFlowURL

func (o *Options) LogoutFlowURL() string

LogoutFlowURL returns the URL to redirect to that will start the logout flow

func (*Options) RecoveryFlowURL

func (o *Options) RecoveryFlowURL() string

RecoveryFlowURL returns the URL to redirect to that will start the recovery flow

func (*Options) RegistrationURL

func (o *Options) RegistrationURL() string

RegistrationURL returns the URL to redirect to that will start the registration flow

func (*Options) SetFromCommandLine

func (o *Options) SetFromCommandLine() *Options

SetFromCommandLine will parse the command line, and populate the Options. The special case is when the 'gen-cookie-store-key-pair' is detected, will genrate the keys and exit Will also exit if key-pairs passed in are invalid

func (*Options) SettingsURL

func (o *Options) SettingsURL() string

SettingsURL returns the URL to redirect to that will start the settings flow

func (*Options) Validate

func (o *Options) Validate() error

Validate checks that the options are valid and return nil, or returns an error

func (*Options) WhoAmIURL

func (o *Options) WhoAmIURL() string

WhoAmIURL returns the URL to POST to to get the session

type URLValue

type URLValue struct {
	URL *url.URL
}

URLValue is a custom data type for parsing URL values with the 'flag' package

func MustMakeURLValue

func MustMakeURLValue(s string) URLValue

func (URLValue) Set

func (v URLValue) Set(s string) error

func (URLValue) String

func (v URLValue) String() string

Jump to

Keyboard shortcuts

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