Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigCMD() *cli.Command
- func GetAgeSecret(ctx context.Context) *age.X25519Identity
- func GetSecuritySecret(ctx context.Context) ed25519.PrivateKey
- func Load(base *Options) (context.Context, error)
- func ParseAlert(txt string) (name, path string, interval time.Duration, err error)
- type Options
Constants ¶
View Source
const ( TestName = "Jane Done" TestEmail = "jane@example.com" TestPassword = "1234" )
Variables ¶
View Source
var ErrInvalidAlertPath = errors.New("invalid alert path : use filename[name,interval] format")
Functions ¶
func GetAgeSecret ¶
func GetAgeSecret(ctx context.Context) *age.X25519Identity
func GetSecuritySecret ¶
func GetSecuritySecret(ctx context.Context) ed25519.PrivateKey
Types ¶
type Options ¶
type Options struct { Listen string URL string Mailer struct { Enabled bool Name, Address string SMTP struct { Address string AuthAnonymous struct { Enabled bool Trace string } AuthOAUTHBearer struct { Enabled bool Username, Token, Host string Port int } AuthPlain struct { Enabled bool Identity, Username, Password string } EnableMailHog bool } } DataPath string LogLevel string Secrets struct { Age, Secret string } Uploads struct { Dir string } Cors struct { Origin string Credentials bool MaxAge int Headers []string Expose []string Methods []string SendPreflightResponse bool } SuperUsers []string Firewall struct { Enabled bool BlockIP []string AllowIP []string } Intervals struct { SiteCache, TSSync, GC, Merge, System time.Duration } Backup struct { Enabled bool Dir string } Acme struct { Enabled bool Domain string CertsPath string Issuer certmagic.ACMEIssuer ExternalAccount acme.EAB } TLS struct { Enabled bool Address, Key, Cert string } Bootstrap struct { Enabled bool Name, FullName, Email, Password, Key string } Alerts struct { Enabled bool Sources []string } EnableProfile bool // If true don't listen on os.Interrupt signal. NoSignal bool }
func Test ¶ added in v0.0.10
Test returns Options with initialized values. This rely only on env Variables for flags.
func (*Options) IsSuperUser ¶
Click to show internal directories.
Click to hide internal directories.