Documentation ¶
Index ¶
- Variables
- type Attribute
- type Count
- func (field *Count) ApplyTemplates(context map[string]interface{}) error
- func (field *Count) FromJSON(in interface{}) error
- func (field *Count) FromLDAP(in map[string][]string) error
- func (field *Count) New() ldap.Field
- func (field *Count) Schema() api.FieldSchema
- func (field *Count) Setup() error
- func (field *Count) ToJSON() interface{}
- func (field *Count) ToLDAP() map[string][]string
- type Email
- func (field *Email) FromJSON(in interface{}) error
- func (field *Email) FromLDAP(in map[string][]string) error
- func (field *Email) Identify(id string) string
- func (field *Email) New() ldap.Field
- func (field *Email) Schema() api.FieldSchema
- func (field *Email) Setup() error
- func (field *Email) ToJSON() interface{}
- func (field *Email) ToLDAP() map[string][]string
- type Fixed
- func (field *Fixed) ApplyTemplates(context map[string]interface{}) error
- func (field *Fixed) FromJSON(in interface{}) error
- func (field *Fixed) FromLDAP(in map[string][]string) error
- func (field *Fixed) New() ldap.Field
- func (field *Fixed) Schema() api.FieldSchema
- func (field *Fixed) Setup() error
- func (field *Fixed) ToJSON() interface{}
- func (field *Fixed) ToLDAP() map[string][]string
- type MemberOf
- func (field *MemberOf) FormatDN(id string) string
- func (field *MemberOf) FromJSON(in interface{}) error
- func (field *MemberOf) FromLDAP(in map[string][]string) error
- func (field *MemberOf) MatchDN(dn string) bool
- func (field *MemberOf) New() ldap.Field
- func (field *MemberOf) Schema() api.FieldSchema
- func (field *MemberOf) Setup() error
- func (field *MemberOf) ToJSON() interface{}
- func (field *MemberOf) ToLDAP() map[string][]string
- func (field *MemberOf) UnwrapDN(dn string) string
- type OrgEmail
- type Password
- func (field *Password) FromJSON(in interface{}) error
- func (field *Password) FromLDAP(in map[string][]string) error
- func (field *Password) New() ldap.Field
- func (field *Password) Schema() api.FieldSchema
- func (field *Password) Setup() error
- func (field *Password) ToJSON() interface{}
- func (field *Password) ToLDAP() map[string][]string
- type Picture
- func (field *Picture) FromJSON(in interface{}) error
- func (field *Picture) FromLDAP(in map[string][]string) error
- func (field *Picture) New() ldap.Field
- func (field *Picture) Schema() api.FieldSchema
- func (field *Picture) Setup() error
- func (field *Picture) ToJSON() interface{}
- func (field *Picture) ToLDAP() map[string][]string
- type Required
- type Separator
- func (field *Separator) FromJSON(in interface{}) error
- func (field *Separator) FromLDAP(in map[string][]string) error
- func (field *Separator) GetViews() api.FieldViews
- func (field *Separator) Name() string
- func (field *Separator) New() ldap.Field
- func (field *Separator) Schema() api.FieldSchema
- func (field *Separator) Setup() error
- func (field *Separator) ToJSON() interface{}
- func (field *Separator) ToLDAP() map[string][]string
- type Text
- func (field *Text) ApplyTemplates(context map[string]interface{}) error
- func (field *Text) FromJSON(in interface{}) error
- func (field *Text) FromLDAP(in map[string][]string) error
- func (field *Text) Identify(id string) string
- func (field *Text) New() ldap.Field
- func (field *Text) Schema() api.FieldSchema
- func (field *Text) Setup() error
- func (field *Text) ToJSON() interface{}
- func (field *Text) ToLDAP() map[string][]string
- type Views
Constants ¶
This section is empty.
Variables ¶
var EmailHostnameRegex = regexp.MustCompile(`^([a-z\d]([a-z\d\-]{0,61}[a-z\d])?\.)+$`)
EmailHostnameRegex must be matched by the domain part of an email address, converted to its lowercase ASCII representation (no punycode), with a trailing dot for easier matching. There is no EmailLocalRegex, as we're just using two simple rules to catch typos: only one @ allowed, and no spaces.
Functions ¶
This section is empty.
Types ¶
type Count ¶
type Count struct { Attribute Views Offset int Resource string // contains filtered or unexported fields }
Count is a field that returns the number of resources of a specific type (plus an offset) if it's nil, and is built for the uidNumber field of LDAP.
func (*Count) ApplyTemplates ¶
func (*Count) Schema ¶
func (field *Count) Schema() api.FieldSchema
type Email ¶
type Email struct { Attribute Views Required Identifier bool Title api.TranslatedString Icon string MaxCount uint MinCount uint // You probably want to set this to 1 to require at least 1 email address! // contains filtered or unexported fields }
Email is an email address of a user
func (*Email) Schema ¶
func (field *Email) Schema() api.FieldSchema
type Fixed ¶
Fixed is a field with a fixed (or templated) value. All fixed fields must be at the end of your configuration!
func (*Fixed) ApplyTemplates ¶
func (*Fixed) Schema ¶
func (field *Fixed) Schema() api.FieldSchema
type MemberOf ¶
type MemberOf struct { Attribute Views DNTemplate string // contains filtered or unexported fields }
MemberOf is an editable list of groups a user is in. Modifications get handled by user-write.go.
func (*MemberOf) Schema ¶
func (field *MemberOf) Schema() api.FieldSchema
type OrgEmail ¶
type OrgEmail struct { Email DomainTemplates map[string][]string // contains filtered or unexported fields }
OrgEmail is an email field, but it replaces all addresses on an organization's domain with a fixed set of addresses from a template.
Example usage:
```go
&OrgEmail{Email{...}, map[string][]string{ "example.org": []string{ `{{ .uid }}`, // jdoe@example.org `{{ .givenName }}.{{ .sn }}`, // jane.doe@example.org }, }
```
func (*OrgEmail) ApplyTemplates ¶
type Password ¶
type Password struct { Attribute Views Title api.TranslatedString Icon string //Complexity uint MinLength uint // contains filtered or unexported fields }
Password is the main UID/Group CN field
func (*Password) Schema ¶
func (field *Password) Schema() api.FieldSchema
type Picture ¶
type Picture struct { Attribute Views Title api.TranslatedString MaxFilesize uint // contains filtered or unexported fields }
Picture is an image file, e.g. for the user avatar
func (*Picture) Schema ¶
func (field *Picture) Schema() api.FieldSchema
type Separator ¶
type Separator struct { Read []string Title api.TranslatedString // contains filtered or unexported fields }
func (*Separator) GetViews ¶
func (field *Separator) GetViews() api.FieldViews
func (*Separator) Schema ¶
func (field *Separator) Schema() api.FieldSchema
type Text ¶
type Text struct { Attribute Views Required Default string // If this is non-empty an empty value will be overwritten with the template value. Identifier bool Long bool Multiple bool Autocomplete string Spellcheck bool Readonly bool Title api.TranslatedString Icon string Choices []string Type string //Choices map[string]string //Suggestions []string Validations []*regexp.Regexp // contains filtered or unexported fields }
Text is a simple text field
func (*Text) ApplyTemplates ¶
func (*Text) Schema ¶
func (field *Text) Schema() api.FieldSchema
type Views ¶
type Views api.FieldViews
func (Views) GetViews ¶
func (v Views) GetViews() api.FieldViews