storage

package
v0.0.0-...-d2c7ade Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	ID          string
	DisplayName string
	Server      string
	Source      string // json source
}

Actor represents an ORM object for a _remote_ actor, not a local one

type Actors

type Actors interface {
	FindActor(id string) (*Actor, error)
	SaveActor(a *Actor) error
}

type Database

type Database interface {
	Open() error
	Close()
}

func NewDatabase

func NewDatabase(connection string) Database

type Follow

type Follow struct {
	ID            string
	RequestID     string
	RequestStatus string // pending or accepted
}

type Followers

type Followers interface {
	GetFollowers() ([]Follow, error)
	FindFollow(id string) (*Follow, error)
	DeleteFollow(id string) error
	SaveFollow(f Follow) error
}

type Note

type Note struct {
	ID        string    `json:"id"`
	Published time.Time `json:"published"`
	Content   string    `json:"content"`
	URL       string    `json:"url"`
	Source    string    // json source
}

Note represents an ORM object to store local or remote note

type Notes

type Notes interface {
	GetLatestNotes(n int) ([]Note, error)
	FindNote(id string) (*Note, error)
	SaveNote(n *Note) error
}

Jump to

Keyboard shortcuts

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