Documentation ¶
Index ¶
- Variables
- func Init(config config.Config) error
- type Env
- type EnvBuilder
- func (eb *EnvBuilder) Env() *Env
- func (eb *EnvBuilder) LoginLogMax(max int) *EnvBuilder
- func (eb *EnvBuilder) LoginLogMaxPayloadLength(max int) *EnvBuilder
- func (eb *EnvBuilder) ProjectId(id string) *EnvBuilder
- func (eb *EnvBuilder) TOTPMax(max int) *EnvBuilder
- func (eb *EnvBuilder) TOTPSetupTTL(max int) *EnvBuilder
- func (eb *EnvBuilder) TicketMax(max int) *EnvBuilder
- func (eb *EnvBuilder) TicketMaxPayloadLength(max int) *EnvBuilder
- type Project
Constants ¶
This section is empty.
Variables ¶
View Source
var Config config.Config
View Source
var Projects concurrent.Map[*Project]
Functions ¶
Types ¶
type Env ¶
type Env struct { // Reference to the project Project *Project // Anything logged with this logger will automatically have the pid (project id) // and rid (request id) fields Logger log.Logger // records validation errors Validator *validation.Result // contains filtered or unexported fields }
type EnvBuilder ¶
type EnvBuilder struct {
// contains filtered or unexported fields
}
func BuildEnv ¶
func BuildEnv() *EnvBuilder
func (*EnvBuilder) Env ¶
func (eb *EnvBuilder) Env() *Env
func (*EnvBuilder) LoginLogMax ¶ added in v0.0.2
func (eb *EnvBuilder) LoginLogMax(max int) *EnvBuilder
func (*EnvBuilder) LoginLogMaxPayloadLength ¶ added in v0.0.2
func (eb *EnvBuilder) LoginLogMaxPayloadLength(max int) *EnvBuilder
func (*EnvBuilder) ProjectId ¶
func (eb *EnvBuilder) ProjectId(id string) *EnvBuilder
func (*EnvBuilder) TOTPMax ¶
func (eb *EnvBuilder) TOTPMax(max int) *EnvBuilder
func (*EnvBuilder) TOTPSetupTTL ¶
func (eb *EnvBuilder) TOTPSetupTTL(max int) *EnvBuilder
func (*EnvBuilder) TicketMax ¶ added in v0.0.2
func (eb *EnvBuilder) TicketMax(max int) *EnvBuilder
func (*EnvBuilder) TicketMaxPayloadLength ¶ added in v0.0.2
func (eb *EnvBuilder) TicketMaxPayloadLength(max int) *EnvBuilder
type Project ¶
type Project struct { Id string TOTPMax int `json:"totp_max"` TOTPIssuer string `json:"totp_issuer"` TOTPSetupTTL time.Duration `json:"totp_setup_ttl"` TOTPSecretLength int `json:"totp_secret_length"` TicketMax int `json:"ticket_max"` TicketMaxPayloadLength int `json:"ticket_max_payload_length"` LoginLogMax int `json:"login_log_max"` LoginLogMaxPayloadLength int `json:"login_log_max_payload_length"` // contains filtered or unexported fields }
A project instance isn't updated. If the project is changed, a new instance is created.
func (*Project) NextRequestId ¶
Click to show internal directories.
Click to hide internal directories.