package
Version:
v0.0.0-...-1d47ab2
Opens a new window with list of versions in this module.
Published: Nov 21, 2024
License: AGPL-3.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
create tables if they don't exist
type Paste struct {
bun.BaseModel `bun:"table:pastes,alias:p"`
ID int64 `bun:"id,pk,autoincrement"`
Content string `bun:"content,notnull"`
Language string `bun:"language,notnull"`
Expiry string `bun:"expiry,notnull"`
Size uint64 `bun:"size"`
}
type SshKey struct {
Fingerprint string `bun:"user_id"`
Type string `bun:"key,notnull"`
}
type User struct {
bun.BaseModel `bun:"table:users,alias:u"`
ID int64 `bun:"id,pk,autoincrement"`
Name string `bun:"name,notnull,unique"`
SshKeys []SshKey `bun:"ssh_keys,type:jsonb"`
Pastes []int64 `bun:"pastes,type:jsonb"`
PastesSize uint64 `bun:"pastes_size"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.