Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserGenHandler ¶
func UserGenHandler(generator Type) interface{}
Types ¶
type CircularUsers ¶
type CircularUsers struct { UserList []*User `json:"userlist" displayname:"User list"` Password Password `json:"password,omitempty" displayname:"Password"` Directory string `json:"directory,omitempty" displayname:"User directory"` // contains filtered or unexported fields }
func NewCircularUsers ¶
func NewCircularUsers() *CircularUsers
NewCircularUsers creates a circular list of users
func (*CircularUsers) Iterate ¶
func (users *CircularUsers) Iterate(iteration uint64) *User
Iterate returns the next user in a circular manner, iteration should always be > 0
func (*CircularUsers) Validate ¶
func (users *CircularUsers) Validate() error
Validate validates settings
type GeneratorCore ¶
type GeneratorCore struct {
GeneratorType Type `json:"type" displayname:"User generator type" doc-key:"config.loginSettings.type"`
}
type NoneUsers ¶
type NoneUsers struct { }
type Password ¶
type Password string
Password
func (*Password) MarshalJSON ¶
MarshalJSON marshal password to json: replace with ***
func (*Password) UnmarshalJSON ¶
UnmarshalJSON unmarshal password from json
type PrefixUsers ¶
type PrefixUsers struct { Prefix string `json:"prefix" displayname:"Prefix" doc-key:"config.loginSettings.settings.prefix"` Directory string `json:"directory,omitempty" displayname:"User directory" doc-key:"config.loginSettings.settings.directory"` }
func (*PrefixUsers) Iterate ¶
func (users *PrefixUsers) Iterate(iteration uint64) *User
Iterate returns the next user in a circular manner
func (*PrefixUsers) Validate ¶
func (users *PrefixUsers) Validate() error
Validate validates settings
type Type ¶
type Type int
Type type of scheduler
const ( // UserGeneratorUnknown unknown user generator UserGeneratorUnknown Type = iota // UserGeneratorCircular users according to userlist UserGeneratorCircular // UserGeneratorPrefix users with a prefix and an enumeration UserGeneratorPrefix // UserGeneratorNone no user creation UserGeneratorNone )
func (Type) GetEnumMap ¶
func (Type) MarshalJSON ¶
MarshalJSON marshal scheduler type to json
func (*Type) UnmarshalJSON ¶
UnmarshalJSON unmarshal user generator type from json
type UserGenerator ¶
type UserGenerator struct { GeneratorCore Settings Settings `json:"settings" doc-key:"config.loginSettings.settings"` }
UserGenerator of users
func NewUserGeneratorCircular ¶
func NewUserGeneratorCircular(users []*User) UserGenerator
NewUserGeneratorCircular create new circular user generator
func NewUserGeneratorNone ¶
func NewUserGeneratorNone() UserGenerator
NewUserGeneratorNone create new "none" user generator (to be used with e.g. Qlik Core)
func NewUserGeneratorPrefix ¶
func NewUserGeneratorPrefix(prefix string) UserGenerator
NewUserGeneratorPrefix create new prefix user generator
func (*UserGenerator) GetNext ¶
func (value *UserGenerator) GetNext(counters *statistics.ExecutionCounters) *User
GetNext user to simulate
func (*UserGenerator) UnmarshalJSON ¶
func (value *UserGenerator) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal scheduler from json