wire

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_deeppatch_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Condition

type Condition struct {

	// op is one of: ==, !=, >, <, >=, <=, exists, in, matches, type, and, or,
	// not.
	Op   string `protobuf:"bytes,1,opt,name=op,proto3" json:"op,omitempty"`
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// value is JSON-encoded; absent for operators that take none.
	Value    []byte       `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	HasValue bool         `protobuf:"varint,4,opt,name=has_value,json=hasValue,proto3" json:"has_value,omitempty"`
	Sub      []*Condition `protobuf:"bytes,5,rep,name=sub,proto3" json:"sub,omitempty"`
	// contains filtered or unexported fields
}

Condition mirrors condition.Condition: a predicate over the target value, or a combination of sub-conditions under "and", "or", "not".

func (*Condition) Descriptor deprecated

func (*Condition) Descriptor() ([]byte, []int)

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetHasValue

func (x *Condition) GetHasValue() bool

func (*Condition) GetOp

func (x *Condition) GetOp() string

func (*Condition) GetPath

func (x *Condition) GetPath() string

func (*Condition) GetSub

func (x *Condition) GetSub() []*Condition

func (*Condition) GetValue

func (x *Condition) GetValue() []byte

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

func (x *Condition) ProtoReflect() protoreflect.Message

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

type Operation

type Operation struct {
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// from is the source path for move, copy and alias.
	From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
	// old and new are JSON-encoded values; absent means none. has_old/has_new
	// distinguish an absent value from JSON null.
	Old    []byte     `protobuf:"bytes,4,opt,name=old,proto3" json:"old,omitempty"`
	New    []byte     `protobuf:"bytes,5,opt,name=new,proto3" json:"new,omitempty"`
	HasOld bool       `protobuf:"varint,6,opt,name=has_old,json=hasOld,proto3" json:"has_old,omitempty"`
	HasNew bool       `protobuf:"varint,7,opt,name=has_new,json=hasNew,proto3" json:"has_new,omitempty"`
	If     *Condition `protobuf:"bytes,8,opt,name=if,proto3" json:"if,omitempty"`
	Unless *Condition `protobuf:"bytes,9,opt,name=unless,proto3" json:"unless,omitempty"`
	// contains filtered or unexported fields
}

Operation mirrors deep.Operation. Kind is the operation name — "add", "remove", "replace", "move", "copy", "log", "alias" — never a number.

func (*Operation) Descriptor deprecated

func (*Operation) Descriptor() ([]byte, []int)

Deprecated: Use Operation.ProtoReflect.Descriptor instead.

func (*Operation) GetFrom

func (x *Operation) GetFrom() string

func (*Operation) GetHasNew

func (x *Operation) GetHasNew() bool

func (*Operation) GetHasOld

func (x *Operation) GetHasOld() bool

func (*Operation) GetIf

func (x *Operation) GetIf() *Condition

func (*Operation) GetKind

func (x *Operation) GetKind() string

func (*Operation) GetNew

func (x *Operation) GetNew() []byte

func (*Operation) GetOld

func (x *Operation) GetOld() []byte

func (*Operation) GetPath

func (x *Operation) GetPath() string

func (*Operation) GetUnless

func (x *Operation) GetUnless() *Condition

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ProtoReflect

func (x *Operation) ProtoReflect() protoreflect.Message

func (*Operation) Reset

func (x *Operation) Reset()

func (*Operation) String

func (x *Operation) String() string

type Patch

type Patch struct {
	Guard  *Condition   `protobuf:"bytes,1,opt,name=guard,proto3" json:"guard,omitempty"`
	Ops    []*Operation `protobuf:"bytes,2,rep,name=ops,proto3" json:"ops,omitempty"`
	Strict bool         `protobuf:"varint,3,opt,name=strict,proto3" json:"strict,omitempty"`
	// contains filtered or unexported fields
}

Patch mirrors deep.Patch: an ordered list of operations, an optional guard that must hold before any of them apply, and a strict flag requiring each operation's recorded old value to match before writing.

func (*Patch) Descriptor deprecated

func (*Patch) Descriptor() ([]byte, []int)

Deprecated: Use Patch.ProtoReflect.Descriptor instead.

func (*Patch) GetGuard

func (x *Patch) GetGuard() *Condition

func (*Patch) GetOps

func (x *Patch) GetOps() []*Operation

func (*Patch) GetStrict

func (x *Patch) GetStrict() bool

func (*Patch) ProtoMessage

func (*Patch) ProtoMessage()

func (*Patch) ProtoReflect

func (x *Patch) ProtoReflect() protoreflect.Message

func (*Patch) Reset

func (x *Patch) Reset()

func (*Patch) String

func (x *Patch) String() string

Jump to

Keyboard shortcuts

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