update

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 3 Imported by: 39

Documentation

Overview

Package update defines persistence-neutral field update commands.

Index

Constants

View Source
const (
	DeleteField sentinel = iota
	ServerTimestamp
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldPath

type FieldPath []string

FieldPath is a non-empty sequence of non-empty field names.

type Update

type Update interface {
	FieldName() string
	FieldPath() FieldPath
	Value() any
}

Update describes a change to one field.

func ByFieldName

func ByFieldName(fieldName string, value any) Update

func ByFieldPath

func ByFieldPath(fieldPath FieldPath, value any) Update

func DeleteByFieldName

func DeleteByFieldName(fieldName string) Update

func DeleteByFieldPath

func DeleteByFieldPath(path ...string) Update

Jump to

Keyboard shortcuts

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