Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownResource = errors.New("unknown resource")
View Source
var ErrUnknownVerb = errors.New("unknown verb")
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct { Model Owner string Site string Name string `gorm:"not null"` HourlyAPIRequestLimit uint `gorm:"not null;default:1000"` KeyPrefix string KeyHash string `gorm:"index"` UsedAt time.Time Scopes datatypes.JSONSlice[*Scope] ExpiresAt time.Time }
type CachedSite ¶
type EmailVerificationCode ¶
type Membership ¶ added in v0.0.16
type ScopeList ¶ added in v0.0.13
func ParseScopes ¶ added in v0.0.13
type Site ¶
type Site struct { Model Domain string `gorm:"uniqueIndex" json:"domain"` Timezone string `gorm:"default:UTC" json:"timezone"` Public bool `gorm:"not null;default:false" json:"public"` Description string StatsStartDate time.Time `json:"statsStartDate"` IngestRateLimit sql.NullFloat64 UserID uint64 Goals []*Goal }
type User ¶
type User struct { Model Name string `gorm:"uniqueIndex"` FullName string Email string `gorm:"uniqueIndex"` PasswordHash string Sites []*Site EmailVerificationCodes []*EmailVerificationCode `gorm:"constraint:OnDelete:CASCADE;"` APIKeys []*APIKey `gorm:"foreignKey:Owner;references:Name"` LastSeen time.Time EmailVerified bool `gorm:"not null;default:false"` }
Click to show internal directories.
Click to hide internal directories.