Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthenticPerson ¶
type Person ¶
type Person struct {
Birthdate string `json:"birthdate,omitempty"`
Department string `json:"department,omitempty"`
Email string `json:"email,omitempty"`
FamilyName string `json:"family_name,omitempty"`
GivenName string `json:"given_name,omitempty"`
Groups []string `json:"groups,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
RoomNumber string `json:"room_number,omitempty"`
StreetAddress string `json:"street_address,omitempty"`
Locality string `json:"locality,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
}
type PersonDetails ¶ added in v0.7.1
type PersonDetails struct {
Birthdate sql.NullString `db:"birthdate"`
Department sql.NullString `db:"department"`
Email sql.NullString `db:"email"`
FamilyName sql.NullString `db:"family_name"`
GivenName sql.NullString `db:"given_name"`
PhoneNumber sql.NullString `db:"phone_number"`
RoomNumber sql.NullString `db:"room_number"`
StreetAddress sql.NullString `db:"street_address"`
Locality sql.NullString `db:"locality"`
PostalCode sql.NullString `db:"postal_code"`
}
func (PersonDetails) Person ¶ added in v0.7.1
func (p PersonDetails) Person() *Person
type Store ¶
type Store interface {
Authenticate(userID, password string) (string, error)
Lookup(userID string) (*Person, error)
Ping() error
ReadOnly() bool
Put(userID string, person *Person) error
ChangePassword(userID, password string) error
}
func NewInMemoryStore ¶ added in v0.8.0
func NewInMemoryStore(users map[string]AuthenticPerson) Store
func NewLdapStore ¶
func NewLdapStore(users map[string]AuthenticPerson, settings *StoreSettings) (Store, error)
func NewSqlStore ¶
func NewSqlStore(users map[string]AuthenticPerson, dbs map[string]*sql.DB, settings *StoreSettings) (Store, error)
type StoreSettings ¶
type StoreSettings struct {
URI string `json:"uri,omitempty"`
CredentialsQuery string `json:"credentials_query,omitempty"`
GroupsQuery string `json:"groups_query,omitempty"`
DetailsQuery string `json:"details_query,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
Update string `json:"update,omitempty"`
ChangePasswordQuery string `json:"change_password_query,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.