patch

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatchField = "patch"
)

Variables

View Source
var NoSuchFieldErr = errors.New("no such field")
View Source
var RequiredPatchRecordFields = restlicodec.NewRequiredFields().Add(PatchField)

Functions

func NewFieldCannotBeDeletedError added in v2.1.0

func NewFieldCannotBeDeletedError(field, recordType string) error

Types

type IllegalPartialUpdateError

type IllegalPartialUpdateError struct {
	Message    string
	RecordType string
	Field      string
}

IllegalPartialUpdateError is returned by PartialUpdateFieldChecker a partial update struct defines an illegal operation, such as deleting and setting the same field.

func (*IllegalPartialUpdateError) Error

func (c *IllegalPartialUpdateError) Error() string

type PartialUpdateFieldChecker

type PartialUpdateFieldChecker struct {
	RecordType string
	HasDeletes bool
	HasSets    bool
}

func (*PartialUpdateFieldChecker) CheckField

func (c *PartialUpdateFieldChecker) CheckField(
	checker restlicodec.KeyChecker,
	fieldName string,
	isDeleteSet bool,
	isSetSet bool,
	isPartialUpdateSet bool,
) error

Jump to

Keyboard shortcuts

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