Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argon2 ¶
type Argon2 struct { HashCommon Variant string `name:"variant" enum:"i, id" help:"Variant of argon2 to use" default:"id"` Iterations int `name:"iterations" help:"Number of iterations to use" default:"10"` Memory int `name:"memory" help:"Memory to use in kibibytes" default:"64"` Parallelism int `name:"parallelism" help:" Degree of parallelism to use" default:"1"` }
type Base ¶
type Base struct { Log struct { Format string `name:"format" enum:"text,json" help:"Log format" default:"json"` Level LogLevel `name:"level" help:"Log level" default:"info"` } `embed:"" prefix:"log."` Version bool `name:"version" help:"Print version information and exit"` }
func (Base) BeforeReset ¶
PrintVersionIfNeeded prints the version information and exits if the version flag is set.
type Bcrypt ¶
type Bcrypt struct { HashCommon Rounds int `name:"rounds" help:"Number of iterations to use as 2^rounds" default:"8"` }
type HashCommon ¶
type HashCommon struct { Password string `arg:"" name:"password" help:"Password to hash" required:""` // contains filtered or unexported fields }
type PBKDF2 ¶
type PBKDF2 struct { HashCommon Iterations int `name:"iterations" help:"Number of iterations to use" default:"10"` Digest string `` /* 142-byte string literal not displayed */ }
type Scrypt ¶
type Scrypt struct { HashCommon Blocksize int `name:"block-size" help:"Amount of memory to use in kibibytes" default:"8"` Cost int `name:"cost" help:"CPU/memory cost of the scrypt algorithm" default:"16"` Parallelism int `name:"parallelism" help:"Degree of parallelism to use" default:"1"` }
type Server ¶
type Server struct { *Base `kong:"-"` ListenAddr string `name:"listen-address" help:"Address to listen on" default:":389"` Backend struct { Name string `name:"name" help:"Backend which stores the data" enum:"yaml" required:"" placeholder:"BACKEND"` URL string `name:"url" help:"URL used to connect to the backend" required:"" placeholder:"URL"` } `embed:"" prefix:"backend."` TLS struct { Enable bool `name:"tls" help:"Enable TLS" default:"false" negatable:""` MutualTLS bool `name:"mtls" help:"Enable mutual TLS" default:"false" negatable:""` CAFile []byte `name:"tls.ca" help:"Path to the CA file" optional:"" type:"filecontent" placeholder:"PATH"` CertFile []byte `name:"tls.cert" help:"Path to the certificate file" optional:"" type:"filecontent" placeholder:"PATH"` KeyFile []byte `name:"tls.key" help:"Path to the key file" optional:"" type:"filecontent" placeholder:"PATH"` } `embed:""` SessionTTL time.Duration `name:"session-ttl" help:"Duration of a BIND session before it expires" default:"168h"` }
Click to show internal directories.
Click to hide internal directories.