Versions in this module Expand all Collapse all v0 v0.20.5 Dec 19, 2022 v0.20.4 Dec 19, 2022 Changes in this version + type AuthHandler interface + AddRecord func(rec *Rec, secret []byte, remoteAddr string) (*Rec, error) + AsTag func(token string) string + Authenticate func(secret []byte, remoteAddr string) (*Rec, []byte, error) + DelRecords func(uid types.Uid) error + GenSecret func(rec *Rec) ([]byte, time.Time, error) + GetRealName func() string + GetResetParams func(uid types.Uid) (map[string]interface{}, error) + Init func(jsonconf json.RawMessage, name string) error + IsInitialized func() bool + IsUnique func(secret []byte, remoteAddr string) (bool, error) + RestrictedTags func() ([]string, error) + UpdateRecord func(rec *Rec, secret []byte, remoteAddr string) (*Rec, error) + type Duration time.Duration + func (d *Duration) UnmarshalJSON(b []byte) error + type Feature uint16 + const FeatureNoLogin + const FeatureValidated + func (f *Feature) UnmarshalJSON(b []byte) error + func (f *Feature) UnmarshalText(b []byte) error + func (f Feature) MarshalJSON() ([]byte, error) + func (f Feature) MarshalText() ([]byte, error) + func (f Feature) String() string + type Level int + const LevelAnon + const LevelAuth + const LevelNone + const LevelRoot + func ParseAuthLevel(name string) Level + func (a *Level) UnmarshalJSON(b []byte) error + func (a *Level) UnmarshalText(b []byte) error + func (a Level) MarshalJSON() ([]byte, error) + func (a Level) MarshalText() ([]byte, error) + func (a Level) String() string + type Rec struct + AuthLevel Level + DefAcs *types.DefaultAccess + Features Feature + Lifetime Duration + Private interface{} + Public interface{} + State types.ObjState + Tags []string + Uid types.Uid