database

package
v0.0.0-...-f6da3f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       ulid.ULID
	Username string
	Email    string
	Password []byte
}

Account is a single account. It can own many Blogs.

func (Account) PasswordValid

func (a Account) PasswordValid(input string) bool

PasswordValid returns true if the given password is valid.

type Blog

type Blog struct {
	ID     ulid.ULID
	Name   string
	Domain *string

	Bio string

	AccountID *ulid.ULID

	PublicKey  string
	PrivateKey *string
}

Blog is a blog, or Person in ActivityPub terms.

func (Blog) Remote

func (b Blog) Remote() bool

type Post

type Post struct {
	ID      ulid.ULID
	BlogID  ulid.ULID
	Content string
	Source  string
	Remote  bool
}

Post is a single post.

Directories

Path Synopsis
Package sql implements the SQL storage layer.
Package sql implements the SQL storage layer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL