persistence

package
v0.0.0-...-5584581 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 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 Defaulter

type Defaulter interface {
	Default()
}

Objects can be able to have default values, triggered by calling Default

type Identifiable

type Identifiable interface {
	ID() string
}

Objects must be able to return a unique key

type Store

type Store[i Identifiable] struct {
	// contains filtered or unexported fields
}

func GetStorage

func GetStorage[i Identifiable](bucketname string, cached bool) Store[i]

func (Store[p]) Delete

func (s Store[p]) Delete(id string) error

func (Store[p]) Get

func (s Store[p]) Get(id string) (*p, bool)

func (Store[p]) List

func (s Store[p]) List() ([]p, error)

func (Store[p]) Put

func (s Store[p]) Put(saveme p) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳