database

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ItemBucketPrefix = "__"

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func New

func New(dataDir string) (*Database, error)

func (*Database) AdminDataDir added in v0.0.5

func (d *Database) AdminDataDir() string

func (*Database) AllContent

func (d *Database) AllContent(namespace string) [][]byte

func (*Database) AllUploads

func (d *Database) AllUploads() ([][]byte, error)

func (*Database) CheckSlugForDuplicate

func (d *Database) CheckSlugForDuplicate(namespace string, slug string) (string, error)

func (*Database) Close

func (d *Database) Close()

func (*Database) DeleteContent

func (d *Database) DeleteContent(namespace string, id string, slug string) error

func (*Database) DeleteUpload

func (d *Database) DeleteUpload(id string) error

func (*Database) GetContent

func (d *Database) GetContent(namespace string, id string) ([]byte, error)

func (*Database) GetUpload

func (d *Database) GetUpload(id string) ([]byte, error)

func (*Database) LoadConfig

func (d *Database) LoadConfig() ([]byte, error)

func (*Database) NewContent

func (d *Database) NewContent(ci any, data []byte) error

func (*Database) NewUpload

func (d *Database) NewUpload(id, slug string, data []byte) error

func (*Database) NextContentId

func (d *Database) NextContentId(ns string) (uint64, error)

func (*Database) NextUploadId

func (d *Database) NextUploadId() (uint64, error)

func (*Database) NextUserId

func (d *Database) NextUserId(email string) (uint64, error)

func (*Database) Open

func (d *Database) Open(next http.HandlerFunc) http.HandlerFunc

func (*Database) PutConfig

func (d *Database) PutConfig(data []byte) error

func (*Database) PutContent

func (d *Database) PutContent(ci any, data []byte) error

func (*Database) PutSortedContent

func (d *Database) PutSortedContent(namespace string, m map[string][]byte) error

func (*Database) PutUser

func (d *Database) PutUser(email string, data []byte) error

func (*Database) Query

func (d *Database) Query(namespace string, opts db.QueryOptions) (int, [][]byte)

func (*Database) RegisterContentBuckets

func (d *Database) RegisterContentBuckets(contentTypeNames []string)

func (*Database) StartAdminDatabase added in v0.0.5

func (d *Database) StartAdminDatabase(adminTypeNames []string) error

func (*Database) StartUserDatabase

func (d *Database) StartUserDatabase(email string) error

func (*Database) SystemInitComplete

func (d *Database) SystemInitComplete() bool

func (*Database) User

func (d *Database) User(email string) ([]byte, error)

func (*Database) UserDataDir

func (d *Database) UserDataDir() string

func (*Database) UserDir added in v0.0.5

func (d *Database) UserDir() string

Jump to

Keyboard shortcuts

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