storage

package
v0.0.0-...-6005b74 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ISO8601 = "2006-01-02T15:04:05-0700"

ISO8601 is the layout used for fields representing dates.

Variables

View Source
var ErrFailedCondition = errors.New("failed condition")

ErrFailedCondition when condition expression fails.

Functions

func PageCreate

func PageCreate(p *Page) error

PageCreate writes the page to storage. Returns "ErrFailedCondition" when page address is already in use.

func PageUpdateDocument

func PageUpdateDocument(addr string, document string, authTimestamp *time.Time) error

PageUpdateDocument updates a stored page's document.

func PageUpdatePassword

func PageUpdatePassword(addr, pass string) error

PageUpdatePassword updates a stored page's password hash.

Types

type Page

type Page struct {
	Addr               string `json:"addr"` // pageKey
	Email              string `json:"email"`
	Password           string `json:"password"`
	PasswordLastUpdate string `json:"password_last_update"`
	Published          bool   `json:"published"`
	Document           string `json:"document"`
}

Page represents a DynamoDB page item.

func PageRead

func PageRead(addr string) (*Page, error)

PageRead reads a page from storage. A null value pointer for page indicates the address was not found.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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