patch

package
v0.0.0-...-fa2f347 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryPatch_Assign_DEFAULT standard3.ByteBuffer
View Source
var BoolPatch_Assign_DEFAULT bool
View Source
var BytePatch_Assign_DEFAULT int8
View Source
var DoublePatch_Assign_DEFAULT float64
View Source
var FloatPatch_Assign_DEFAULT float32
View Source
var GoUnusedProtection__ int
View Source
var I16Patch_Assign_DEFAULT int16
View Source
var I32Patch_Assign_DEFAULT int32
View Source
var I64Patch_Assign_DEFAULT int64
View Source
var PatchOpNames = []string{
	"Assign",
	"Clear",
	"PatchPrior",
	"EnsureUnion",
	"EnsureStruct",
	"PatchAfter",
	"Remove",
	"Add",
	"Put",
	"Unspecified",
}
View Source
var PatchOpToName = map[PatchOp]string{
	PatchOp_Assign:       "Assign",
	PatchOp_Clear:        "Clear",
	PatchOp_PatchPrior:   "PatchPrior",
	PatchOp_EnsureUnion:  "EnsureUnion",
	PatchOp_EnsureStruct: "EnsureStruct",
	PatchOp_PatchAfter:   "PatchAfter",
	PatchOp_Remove:       "Remove",
	PatchOp_Add:          "Add",
	PatchOp_Put:          "Put",
	PatchOp_Unspecified:  "Unspecified",
}
View Source
var PatchOpToValue = map[string]PatchOp{
	"Assign":       PatchOp_Assign,
	"Clear":        PatchOp_Clear,
	"PatchPrior":   PatchOp_PatchPrior,
	"EnsureUnion":  PatchOp_EnsureUnion,
	"EnsureStruct": PatchOp_EnsureStruct,
	"PatchAfter":   PatchOp_PatchAfter,
	"Remove":       PatchOp_Remove,
	"Add":          PatchOp_Add,
	"Put":          PatchOp_Put,
	"Unspecified":  PatchOp_Unspecified,
}
View Source
var StringPatch_Assign_DEFAULT string

Functions

This section is empty.

Types

type AssignOnlyPatch

type AssignOnlyPatch struct {
}

func NewAssignOnlyPatch

func NewAssignOnlyPatch() *AssignOnlyPatch

func (*AssignOnlyPatch) Read

func (p *AssignOnlyPatch) Read(iprot thrift.Protocol) error

func (*AssignOnlyPatch) String

func (p *AssignOnlyPatch) String() string

func (*AssignOnlyPatch) Write

func (p *AssignOnlyPatch) Write(oprot thrift.Protocol) error

type AssignOnlyPatchBuilder

type AssignOnlyPatchBuilder struct {
	// contains filtered or unexported fields
}

func NewAssignOnlyPatchBuilder

func NewAssignOnlyPatchBuilder() *AssignOnlyPatchBuilder

func (AssignOnlyPatchBuilder) Emit

type BinaryPatch

type BinaryPatch struct {
	Assign standard3.ByteBuffer `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool                 `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Prepend standard3.ByteBuffer `thrift:"prepend,8" db:"prepend" json:"prepend"`
	Append  standard3.ByteBuffer `thrift:"append,9" db:"append" json:"append"`
}

A patch for a binary value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear a given binary.
  • Prepend: Prepend to a given value.
  • Append: Append to a given value.

func NewBinaryPatch

func NewBinaryPatch() *BinaryPatch

func (*BinaryPatch) GetAppend

func (p *BinaryPatch) GetAppend() standard3.ByteBuffer

func (*BinaryPatch) GetAssign

func (p *BinaryPatch) GetAssign() standard3.ByteBuffer

func (*BinaryPatch) GetClear

func (p *BinaryPatch) GetClear() bool

func (*BinaryPatch) GetPrepend

func (p *BinaryPatch) GetPrepend() standard3.ByteBuffer

func (*BinaryPatch) IsSetAssign

func (p *BinaryPatch) IsSetAssign() bool

func (*BinaryPatch) Read

func (p *BinaryPatch) Read(iprot thrift.Protocol) error

func (*BinaryPatch) ReadField1

func (p *BinaryPatch) ReadField1(iprot thrift.Protocol) error

func (*BinaryPatch) ReadField2

func (p *BinaryPatch) ReadField2(iprot thrift.Protocol) error

func (*BinaryPatch) ReadField8

func (p *BinaryPatch) ReadField8(iprot thrift.Protocol) error

func (*BinaryPatch) ReadField9

func (p *BinaryPatch) ReadField9(iprot thrift.Protocol) error

func (*BinaryPatch) SetAppend

func (b *BinaryPatch) SetAppend(append standard3.ByteBuffer) *BinaryPatch

func (*BinaryPatch) SetAssign

func (b *BinaryPatch) SetAssign(assign standard3.ByteBuffer) *BinaryPatch

func (*BinaryPatch) SetClear

func (b *BinaryPatch) SetClear(clear bool) *BinaryPatch

func (*BinaryPatch) SetPrepend

func (b *BinaryPatch) SetPrepend(prepend standard3.ByteBuffer) *BinaryPatch

func (*BinaryPatch) String

func (p *BinaryPatch) String() string

func (*BinaryPatch) Write

func (p *BinaryPatch) Write(oprot thrift.Protocol) error

type BinaryPatchBuilder

type BinaryPatchBuilder struct {
	// contains filtered or unexported fields
}

func NewBinaryPatchBuilder

func NewBinaryPatchBuilder() *BinaryPatchBuilder

func (*BinaryPatchBuilder) Append

func (*BinaryPatchBuilder) Assign

func (*BinaryPatchBuilder) Clear

func (b *BinaryPatchBuilder) Clear(clear bool) *BinaryPatchBuilder

func (BinaryPatchBuilder) Emit

func (p BinaryPatchBuilder) Emit() *BinaryPatch

func (*BinaryPatchBuilder) Prepend

type BoolPatch

type BoolPatch struct {
	Assign *bool `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool  `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 8
	Invert bool `thrift:"invert,9" db:"invert" json:"invert"`
}

A patch for a boolean value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Invert: If the bool value should be inverted.

func NewBoolPatch

func NewBoolPatch() *BoolPatch

func (*BoolPatch) GetAssign

func (p *BoolPatch) GetAssign() bool

func (*BoolPatch) GetClear

func (p *BoolPatch) GetClear() bool

func (*BoolPatch) GetInvert

func (p *BoolPatch) GetInvert() bool

func (*BoolPatch) IsSetAssign

func (p *BoolPatch) IsSetAssign() bool

func (*BoolPatch) Read

func (p *BoolPatch) Read(iprot thrift.Protocol) error

func (*BoolPatch) ReadField1

func (p *BoolPatch) ReadField1(iprot thrift.Protocol) error

func (*BoolPatch) ReadField2

func (p *BoolPatch) ReadField2(iprot thrift.Protocol) error

func (*BoolPatch) ReadField9

func (p *BoolPatch) ReadField9(iprot thrift.Protocol) error

func (*BoolPatch) SetAssign

func (b *BoolPatch) SetAssign(assign *bool) *BoolPatch

func (*BoolPatch) SetClear

func (b *BoolPatch) SetClear(clear bool) *BoolPatch

func (*BoolPatch) SetInvert

func (b *BoolPatch) SetInvert(invert bool) *BoolPatch

func (*BoolPatch) String

func (p *BoolPatch) String() string

func (*BoolPatch) Write

func (p *BoolPatch) Write(oprot thrift.Protocol) error

type BoolPatchBuilder

type BoolPatchBuilder struct {
	// contains filtered or unexported fields
}

func NewBoolPatchBuilder

func NewBoolPatchBuilder() *BoolPatchBuilder

func (*BoolPatchBuilder) Assign

func (b *BoolPatchBuilder) Assign(assign *bool) *BoolPatchBuilder

func (*BoolPatchBuilder) Clear

func (b *BoolPatchBuilder) Clear(clear bool) *BoolPatchBuilder

func (BoolPatchBuilder) Emit

func (p BoolPatchBuilder) Emit() *BoolPatch

func (*BoolPatchBuilder) Invert

func (b *BoolPatchBuilder) Invert(invert bool) *BoolPatchBuilder

type BytePatch

type BytePatch struct {
	Assign *int8 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool  `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add int8 `thrift:"add,8" db:"add" json:"add"`
}

A patch for an 8-bit integer value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Add: Add to a given value.

func NewBytePatch

func NewBytePatch() *BytePatch

func (*BytePatch) GetAdd

func (p *BytePatch) GetAdd() int8

func (*BytePatch) GetAssign

func (p *BytePatch) GetAssign() int8

func (*BytePatch) GetClear

func (p *BytePatch) GetClear() bool

func (*BytePatch) IsSetAssign

func (p *BytePatch) IsSetAssign() bool

func (*BytePatch) Read

func (p *BytePatch) Read(iprot thrift.Protocol) error

func (*BytePatch) ReadField1

func (p *BytePatch) ReadField1(iprot thrift.Protocol) error

func (*BytePatch) ReadField2

func (p *BytePatch) ReadField2(iprot thrift.Protocol) error

func (*BytePatch) ReadField8

func (p *BytePatch) ReadField8(iprot thrift.Protocol) error

func (*BytePatch) SetAdd

func (b *BytePatch) SetAdd(add int8) *BytePatch

func (*BytePatch) SetAssign

func (b *BytePatch) SetAssign(assign *int8) *BytePatch

func (*BytePatch) SetClear

func (b *BytePatch) SetClear(clear bool) *BytePatch

func (*BytePatch) String

func (p *BytePatch) String() string

func (*BytePatch) Write

func (p *BytePatch) Write(oprot thrift.Protocol) error

type BytePatchBuilder

type BytePatchBuilder struct {
	// contains filtered or unexported fields
}

func NewBytePatchBuilder

func NewBytePatchBuilder() *BytePatchBuilder

func (*BytePatchBuilder) Add

func (b *BytePatchBuilder) Add(add int8) *BytePatchBuilder

func (*BytePatchBuilder) Assign

func (b *BytePatchBuilder) Assign(assign *int8) *BytePatchBuilder

func (*BytePatchBuilder) Clear

func (b *BytePatchBuilder) Clear(clear bool) *BytePatchBuilder

func (BytePatchBuilder) Emit

func (p BytePatchBuilder) Emit() *BytePatch

type DoublePatch

type DoublePatch struct {
	Assign *float64 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool     `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add float64 `thrift:"add,8" db:"add" json:"add"`
}

A patch for an 64-bit floating point value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Add: Add to a given value.

func NewDoublePatch

func NewDoublePatch() *DoublePatch

func (*DoublePatch) GetAdd

func (p *DoublePatch) GetAdd() float64

func (*DoublePatch) GetAssign

func (p *DoublePatch) GetAssign() float64

func (*DoublePatch) GetClear

func (p *DoublePatch) GetClear() bool

func (*DoublePatch) IsSetAssign

func (p *DoublePatch) IsSetAssign() bool

func (*DoublePatch) Read

func (p *DoublePatch) Read(iprot thrift.Protocol) error

func (*DoublePatch) ReadField1

func (p *DoublePatch) ReadField1(iprot thrift.Protocol) error

func (*DoublePatch) ReadField2

func (p *DoublePatch) ReadField2(iprot thrift.Protocol) error

func (*DoublePatch) ReadField8

func (p *DoublePatch) ReadField8(iprot thrift.Protocol) error

func (*DoublePatch) SetAdd

func (d *DoublePatch) SetAdd(add float64) *DoublePatch

func (*DoublePatch) SetAssign

func (d *DoublePatch) SetAssign(assign *float64) *DoublePatch

func (*DoublePatch) SetClear

func (d *DoublePatch) SetClear(clear bool) *DoublePatch

func (*DoublePatch) String

func (p *DoublePatch) String() string

func (*DoublePatch) Write

func (p *DoublePatch) Write(oprot thrift.Protocol) error

type DoublePatchBuilder

type DoublePatchBuilder struct {
	// contains filtered or unexported fields
}

func NewDoublePatchBuilder

func NewDoublePatchBuilder() *DoublePatchBuilder

func (*DoublePatchBuilder) Add

func (*DoublePatchBuilder) Assign

func (d *DoublePatchBuilder) Assign(assign *float64) *DoublePatchBuilder

func (*DoublePatchBuilder) Clear

func (d *DoublePatchBuilder) Clear(clear bool) *DoublePatchBuilder

func (DoublePatchBuilder) Emit

func (p DoublePatchBuilder) Emit() *DoublePatch

type FloatPatch

type FloatPatch struct {
	Assign *float32 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool     `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add float32 `thrift:"add,8" db:"add" json:"add"`
}

A patch for a 32-bit floating point value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Add: Add to a given value.

func NewFloatPatch

func NewFloatPatch() *FloatPatch

func (*FloatPatch) GetAdd

func (p *FloatPatch) GetAdd() float32

func (*FloatPatch) GetAssign

func (p *FloatPatch) GetAssign() float32

func (*FloatPatch) GetClear

func (p *FloatPatch) GetClear() bool

func (*FloatPatch) IsSetAssign

func (p *FloatPatch) IsSetAssign() bool

func (*FloatPatch) Read

func (p *FloatPatch) Read(iprot thrift.Protocol) error

func (*FloatPatch) ReadField1

func (p *FloatPatch) ReadField1(iprot thrift.Protocol) error

func (*FloatPatch) ReadField2

func (p *FloatPatch) ReadField2(iprot thrift.Protocol) error

func (*FloatPatch) ReadField8

func (p *FloatPatch) ReadField8(iprot thrift.Protocol) error

func (*FloatPatch) SetAdd

func (f *FloatPatch) SetAdd(add float32) *FloatPatch

func (*FloatPatch) SetAssign

func (f *FloatPatch) SetAssign(assign *float32) *FloatPatch

func (*FloatPatch) SetClear

func (f *FloatPatch) SetClear(clear bool) *FloatPatch

func (*FloatPatch) String

func (p *FloatPatch) String() string

func (*FloatPatch) Write

func (p *FloatPatch) Write(oprot thrift.Protocol) error

type FloatPatchBuilder

type FloatPatchBuilder struct {
	// contains filtered or unexported fields
}

func NewFloatPatchBuilder

func NewFloatPatchBuilder() *FloatPatchBuilder

func (*FloatPatchBuilder) Add

func (*FloatPatchBuilder) Assign

func (f *FloatPatchBuilder) Assign(assign *float32) *FloatPatchBuilder

func (*FloatPatchBuilder) Clear

func (f *FloatPatchBuilder) Clear(clear bool) *FloatPatchBuilder

func (FloatPatchBuilder) Emit

func (p FloatPatchBuilder) Emit() *FloatPatch

type GeneratePatch

type GeneratePatch struct {
}

An annotation that indicates a patch representation should be generated for the associated definition.

func NewGeneratePatch

func NewGeneratePatch() *GeneratePatch

func (*GeneratePatch) Read

func (p *GeneratePatch) Read(iprot thrift.Protocol) error

func (*GeneratePatch) String

func (p *GeneratePatch) String() string

func (*GeneratePatch) Write

func (p *GeneratePatch) Write(oprot thrift.Protocol) error

type GeneratePatchBuilder

type GeneratePatchBuilder struct {
	// contains filtered or unexported fields
}

func NewGeneratePatchBuilder

func NewGeneratePatchBuilder() *GeneratePatchBuilder

func (GeneratePatchBuilder) Emit

type I16Patch

type I16Patch struct {
	Assign *int16 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool   `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add int16 `thrift:"add,8" db:"add" json:"add"`
}

A patch for a 16-bit integer value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Add: Add to a given value.

func NewI16Patch

func NewI16Patch() *I16Patch

func (*I16Patch) GetAdd

func (p *I16Patch) GetAdd() int16

func (*I16Patch) GetAssign

func (p *I16Patch) GetAssign() int16

func (*I16Patch) GetClear

func (p *I16Patch) GetClear() bool

func (*I16Patch) IsSetAssign

func (p *I16Patch) IsSetAssign() bool

func (*I16Patch) Read

func (p *I16Patch) Read(iprot thrift.Protocol) error

func (*I16Patch) ReadField1

func (p *I16Patch) ReadField1(iprot thrift.Protocol) error

func (*I16Patch) ReadField2

func (p *I16Patch) ReadField2(iprot thrift.Protocol) error

func (*I16Patch) ReadField8

func (p *I16Patch) ReadField8(iprot thrift.Protocol) error

func (*I16Patch) SetAdd

func (i *I16Patch) SetAdd(add int16) *I16Patch

func (*I16Patch) SetAssign

func (i *I16Patch) SetAssign(assign *int16) *I16Patch

func (*I16Patch) SetClear

func (i *I16Patch) SetClear(clear bool) *I16Patch

func (*I16Patch) String

func (p *I16Patch) String() string

func (*I16Patch) Write

func (p *I16Patch) Write(oprot thrift.Protocol) error

type I16PatchBuilder

type I16PatchBuilder struct {
	// contains filtered or unexported fields
}

func NewI16PatchBuilder

func NewI16PatchBuilder() *I16PatchBuilder

func (*I16PatchBuilder) Add

func (i *I16PatchBuilder) Add(add int16) *I16PatchBuilder

func (*I16PatchBuilder) Assign

func (i *I16PatchBuilder) Assign(assign *int16) *I16PatchBuilder

func (*I16PatchBuilder) Clear

func (i *I16PatchBuilder) Clear(clear bool) *I16PatchBuilder

func (I16PatchBuilder) Emit

func (p I16PatchBuilder) Emit() *I16Patch

type I32Patch

type I32Patch struct {
	Assign *int32 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool   `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add int32 `thrift:"add,8" db:"add" json:"add"`
}

A patch for a 32-bit integer value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clears any set value.
  • Add: Add to a given value.

func NewI32Patch

func NewI32Patch() *I32Patch

func (*I32Patch) GetAdd

func (p *I32Patch) GetAdd() int32

func (*I32Patch) GetAssign

func (p *I32Patch) GetAssign() int32

func (*I32Patch) GetClear

func (p *I32Patch) GetClear() bool

func (*I32Patch) IsSetAssign

func (p *I32Patch) IsSetAssign() bool

func (*I32Patch) Read

func (p *I32Patch) Read(iprot thrift.Protocol) error

func (*I32Patch) ReadField1

func (p *I32Patch) ReadField1(iprot thrift.Protocol) error

func (*I32Patch) ReadField2

func (p *I32Patch) ReadField2(iprot thrift.Protocol) error

func (*I32Patch) ReadField8

func (p *I32Patch) ReadField8(iprot thrift.Protocol) error

func (*I32Patch) SetAdd

func (i *I32Patch) SetAdd(add int32) *I32Patch

func (*I32Patch) SetAssign

func (i *I32Patch) SetAssign(assign *int32) *I32Patch

func (*I32Patch) SetClear

func (i *I32Patch) SetClear(clear bool) *I32Patch

func (*I32Patch) String

func (p *I32Patch) String() string

func (*I32Patch) Write

func (p *I32Patch) Write(oprot thrift.Protocol) error

type I32PatchBuilder

type I32PatchBuilder struct {
	// contains filtered or unexported fields
}

func NewI32PatchBuilder

func NewI32PatchBuilder() *I32PatchBuilder

func (*I32PatchBuilder) Add

func (i *I32PatchBuilder) Add(add int32) *I32PatchBuilder

func (*I32PatchBuilder) Assign

func (i *I32PatchBuilder) Assign(assign *int32) *I32PatchBuilder

func (*I32PatchBuilder) Clear

func (i *I32PatchBuilder) Clear(clear bool) *I32PatchBuilder

func (I32PatchBuilder) Emit

func (p I32PatchBuilder) Emit() *I32Patch

type I64Patch

type I64Patch struct {
	Assign *int64 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool   `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Add int64 `thrift:"add,8" db:"add" json:"add"`
}

A patch for a 64-bit integer value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear any set value.
  • Add: Add to a given value.

func NewI64Patch

func NewI64Patch() *I64Patch

func (*I64Patch) GetAdd

func (p *I64Patch) GetAdd() int64

func (*I64Patch) GetAssign

func (p *I64Patch) GetAssign() int64

func (*I64Patch) GetClear

func (p *I64Patch) GetClear() bool

func (*I64Patch) IsSetAssign

func (p *I64Patch) IsSetAssign() bool

func (*I64Patch) Read

func (p *I64Patch) Read(iprot thrift.Protocol) error

func (*I64Patch) ReadField1

func (p *I64Patch) ReadField1(iprot thrift.Protocol) error

func (*I64Patch) ReadField2

func (p *I64Patch) ReadField2(iprot thrift.Protocol) error

func (*I64Patch) ReadField8

func (p *I64Patch) ReadField8(iprot thrift.Protocol) error

func (*I64Patch) SetAdd

func (i *I64Patch) SetAdd(add int64) *I64Patch

func (*I64Patch) SetAssign

func (i *I64Patch) SetAssign(assign *int64) *I64Patch

func (*I64Patch) SetClear

func (i *I64Patch) SetClear(clear bool) *I64Patch

func (*I64Patch) String

func (p *I64Patch) String() string

func (*I64Patch) Write

func (p *I64Patch) Write(oprot thrift.Protocol) error

type I64PatchBuilder

type I64PatchBuilder struct {
	// contains filtered or unexported fields
}

func NewI64PatchBuilder

func NewI64PatchBuilder() *I64PatchBuilder

func (*I64PatchBuilder) Add

func (i *I64PatchBuilder) Add(add int64) *I64PatchBuilder

func (*I64PatchBuilder) Assign

func (i *I64PatchBuilder) Assign(assign *int64) *I64PatchBuilder

func (*I64PatchBuilder) Clear

func (i *I64PatchBuilder) Clear(clear bool) *I64PatchBuilder

func (I64PatchBuilder) Emit

func (p I64PatchBuilder) Emit() *I64Patch

type PatchOp

type PatchOp int64

The meaning of the patch op field ids, in all properly formulated patch definitions.

Patch field ids are interpreted at runtime, as a dynamic patch protocol, without any additional schema derived from IDL patch definitions.

const (
	PatchOp_Assign       PatchOp = 1
	PatchOp_Clear        PatchOp = 2
	PatchOp_PatchPrior   PatchOp = 3
	PatchOp_EnsureUnion  PatchOp = 4
	PatchOp_EnsureStruct PatchOp = 5
	PatchOp_PatchAfter   PatchOp = 6
	PatchOp_Remove       PatchOp = 7
	PatchOp_Add          PatchOp = 8
	PatchOp_Put          PatchOp = 9
	PatchOp_Unspecified  PatchOp = 0
)

func PatchOpFromString

func PatchOpFromString(s string) (PatchOp, error)

func PatchOpPtr

func PatchOpPtr(v PatchOp) *PatchOp

func (PatchOp) String

func (p PatchOp) String() string

type StringPatch

type StringPatch struct {
	Assign *string `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"`
	Clear  bool    `thrift:"clear,2" db:"clear" json:"clear"`
	// unused fields # 3 to 7
	Prepend string `thrift:"prepend,8" db:"prepend" json:"prepend"`
	Append  string `thrift:"append,9" db:"append" json:"append"`
}

A patch for a string value.

Attributes:

  • Assign: Assigns to a (set) value.

If set, all other patch operations are ignored.

Note: Only modifies set field values.

  • Clear: Clear a given string.
  • Prepend: Prepend to a given value.
  • Append: Append to a given value.

func NewStringPatch

func NewStringPatch() *StringPatch

func (*StringPatch) GetAppend

func (p *StringPatch) GetAppend() string

func (*StringPatch) GetAssign

func (p *StringPatch) GetAssign() string

func (*StringPatch) GetClear

func (p *StringPatch) GetClear() bool

func (*StringPatch) GetPrepend

func (p *StringPatch) GetPrepend() string

func (*StringPatch) IsSetAssign

func (p *StringPatch) IsSetAssign() bool

func (*StringPatch) Read

func (p *StringPatch) Read(iprot thrift.Protocol) error

func (*StringPatch) ReadField1

func (p *StringPatch) ReadField1(iprot thrift.Protocol) error

func (*StringPatch) ReadField2

func (p *StringPatch) ReadField2(iprot thrift.Protocol) error

func (*StringPatch) ReadField8

func (p *StringPatch) ReadField8(iprot thrift.Protocol) error

func (*StringPatch) ReadField9

func (p *StringPatch) ReadField9(iprot thrift.Protocol) error

func (*StringPatch) SetAppend

func (s *StringPatch) SetAppend(append string) *StringPatch

func (*StringPatch) SetAssign

func (s *StringPatch) SetAssign(assign *string) *StringPatch

func (*StringPatch) SetClear

func (s *StringPatch) SetClear(clear bool) *StringPatch

func (*StringPatch) SetPrepend

func (s *StringPatch) SetPrepend(prepend string) *StringPatch

func (*StringPatch) String

func (p *StringPatch) String() string

func (*StringPatch) Write

func (p *StringPatch) Write(oprot thrift.Protocol) error

type StringPatchBuilder

type StringPatchBuilder struct {
	// contains filtered or unexported fields
}

func NewStringPatchBuilder

func NewStringPatchBuilder() *StringPatchBuilder

func (*StringPatchBuilder) Append

func (s *StringPatchBuilder) Append(append string) *StringPatchBuilder

func (*StringPatchBuilder) Assign

func (s *StringPatchBuilder) Assign(assign *string) *StringPatchBuilder

func (*StringPatchBuilder) Clear

func (s *StringPatchBuilder) Clear(clear bool) *StringPatchBuilder

func (StringPatchBuilder) Emit

func (p StringPatchBuilder) Emit() *StringPatch

func (*StringPatchBuilder) Prepend

func (s *StringPatchBuilder) Prepend(prepend string) *StringPatchBuilder

Jump to

Keyboard shortcuts

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