Documentation
¶
Index ¶
- Variables
- func AutoMigrate(db *gorm.DB) error
- func ExtractRecords(ctx context.Context, b io.Reader, signingKey string) (map[string]json.RawMessage, error)
- func GetLang(ctx context.Context, value json.RawMessage) ([]string, time.Time, error)
- func GetRev(ctx context.Context, b io.Reader) (string, error)
- type BadRecord
- type Record
- type Repo
- type SignatureValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSignature = fmt.Errorf("commit signature is not valid")
View Source
var ErrZeroBlocks = fmt.Errorf("zero blocks found")
Functions ¶
func AutoMigrate ¶
func ExtractRecords ¶
Types ¶
type Record ¶
type Record struct { ID models.ID `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time `gorm:"autoUpdateTime:false"` Repo models.ID `gorm:"index:idx_repo_record_key,unique,priority:1;not null;index:idx_repo_rev"` Collection string `gorm:"index:idx_repo_record_key,unique,priority:2;not null"` Rkey string `gorm:"index:idx_repo_record_key,unique,priority:3"` AtRev string `gorm:"index:idx_repo_rev"` Content json.RawMessage `gorm:"type:JSONB"` Deleted bool `gorm:"default:false"` }
type Repo ¶
type Repo struct { ID models.ID `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time PDS models.ID `` /* 297-byte string literal not displayed */ DID string `gorm:"uniqueIndex;column:did"` LastIndexedRev string `` /* 185-byte string literal not displayed */ FirstRevSinceReset string LastFirehoseRev string FirstCursorSinceReset int64 `gorm:"index:indexed_count,priority:2"` TombstonedAt time.Time LastIndexAttempt time.Time LastError string FailedAttempts int `gorm:"default:0"` LastKnownKey string }
Click to show internal directories.
Click to hide internal directories.