Documentation
¶
Index ¶
- Variables
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (x *Condition) GetHasValue() bool
- func (x *Condition) GetOp() string
- func (x *Condition) GetPath() string
- func (x *Condition) GetSub() []*Condition
- func (x *Condition) GetValue() []byte
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetFrom() string
- func (x *Operation) GetHasNew() bool
- func (x *Operation) GetHasOld() bool
- func (x *Operation) GetIf() *Condition
- func (x *Operation) GetKind() string
- func (x *Operation) GetNew() []byte
- func (x *Operation) GetOld() []byte
- func (x *Operation) GetPath() string
- func (x *Operation) GetUnless() *Condition
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- type Patch
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) GetHasValue ¶
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶
func (x *Condition) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Patch) ProtoMessage()
func (*Patch) ProtoReflect ¶
func (x *Patch) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.