Versions in this module Expand all Collapse all v0 v0.10.1 Dec 6, 2024 v0.10.0 Dec 6, 2024 Changes in this version + type Restriction struct + ExpiresAt unixtime.UnixTime + NotBefore unixtime.UnixTime + func (r *Restriction) UsedAT(rlog log.Ext1FieldLogger, tx *sqlx.Tx, id mtid.MTID) error + func (r *Restriction) UsedOther(rlog log.Ext1FieldLogger, tx *sqlx.Tx, id mtid.MTID) error + func (r Restriction) ToUsedRestriction(rlog log.Ext1FieldLogger, tx *sqlx.Tx, id mtid.MTID) (UsedRestriction, error) + type Restrictions []*Restriction + func NewRestrictionsFromAPI(apis api.Restrictions) (rs Restrictions) + func Tighten(rlog log.Ext1FieldLogger, old, wanted Restrictions) (res Restrictions, ok bool) + func (r *Restrictions) ClearUnsupportedKeys() + func (r *Restrictions) EnforceMaxLifetime(issuer string) (changed bool) + func (r *Restrictions) GetAudiences() (auds []string) + func (r *Restrictions) GetExpires() unixtime.UnixTime + func (r *Restrictions) GetNotBefore() unixtime.UnixTime + func (r *Restrictions) GetScopes() (scopes []string) + func (r *Restrictions) ReplaceThisIP(ip string) + func (r *Restrictions) Scan(src interface{}) error + func (r *Restrictions) SetMaxAudiences(mAud []string) + func (r *Restrictions) SetMaxScopes(mScopes []string) + func (r Restrictions) GetValidForAT(rlog log.Ext1FieldLogger, tx *sqlx.Tx, ip string, myID mtid.MTID) (ret Restrictions) + func (r Restrictions) GetValidForOther(rlog log.Ext1FieldLogger, tx *sqlx.Tx, ip string, myID mtid.MTID) (ret Restrictions) + func (r Restrictions) ToUsedRestrictions(rlog log.Ext1FieldLogger, tx *sqlx.Tx, id mtid.MTID) (ur []UsedRestriction, err error) + func (r Restrictions) Value() (driver.Value, error) + func (r Restrictions) VerifyForAT(rlog log.Ext1FieldLogger, tx *sqlx.Tx, ip string, id mtid.MTID) bool + func (r Restrictions) VerifyForOther(rlog log.Ext1FieldLogger, tx *sqlx.Tx, ip string, id mtid.MTID) bool + func (r Restrictions) WithAudiences(rlog log.Ext1FieldLogger, audiences []string) (ret Restrictions) + func (r Restrictions) WithScopes(rlog log.Ext1FieldLogger, scopes []string) (ret Restrictions) + type UsedRestriction struct + UsagesATDone *int64 + UsagesOtherDone *int64