Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HostFlag = &cli.StringFlag{ Name: "host", Usage: "specify the host address for the server to listen on", Sources: cli.EnvVars("EXPRESSO_HOST"), Value: defaultHost, OnlyOnce: true, } PortFlag = &cli.Uint16Flag{ Name: "port", Usage: "specify the port number for the server to listen on", Sources: cli.EnvVars("EXPRESSO_PORT"), Value: defaultPort, OnlyOnce: true, } DevelopmentModeFlag = &cli.BoolFlag{ Name: "dev", Usage: "enable development mode for the server", Sources: cli.EnvVars("EXPRESSO_DEV"), OnlyOnce: true, } SignInWithEthereumStatementFlag = &cli.StringFlag{ Name: "siwe-statement", Usage: "specify the statement clients must use when generating their SIWE signature", Sources: cli.EnvVars("EXPRESSO_SIWE_STATEMENT"), OnlyOnce: true, } SignInWithEthereumMaxValidityFlag = &cli.DurationFlag{ Name: "siwe-max-validity", Usage: "specify the maximum duration accepted SIWE signatures may be valid for", Sources: cli.EnvVars("EXPRESSO_SIWE_MAX_VALIDITY"), OnlyOnce: true, } )
Functions ¶
func NewCommand ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds configuration settings for the server.
func NewConfig ¶
func NewConfig(host string, port uint16, options ...ConfigOption) (*Config, error)
NewConfig creates a new Config instance with the provided host and port, and applies any configuration options.
func (Config) GetDevelopmentMode ¶
GetDevelopmentMode returns whether the server is running in development mode.
type ConfigOption ¶
ConfigOption is a functional option pattern type used to configure various aspects of the server.
func WithDevelopmentMode ¶
func WithDevelopmentMode() ConfigOption
WithDevelopmentMode enables development mode for the server configuration.
func WithSignInWithEthereum ¶
func WithSignInWithEthereum(statement string, maxValidity time.Duration) ConfigOption
WithSignInWithEthereum configures the server to use Ethereum-based sign-in with a given statement and maximum signature validity.
Click to show internal directories.
Click to hide internal directories.