Documentation ¶
Index ¶
- type ArrayProxy
- func (p *ArrayProxy) AddBool(values ...bool) *ArrayProxy
- func (p *ArrayProxy) AddBytes(values ...[]byte) *ArrayProxy
- func (p *ArrayProxy) AddDate(values ...gotime.Time) *ArrayProxy
- func (p *ArrayProxy) AddDouble(values ...float64) *ArrayProxy
- func (p *ArrayProxy) AddInteger(values ...int) *ArrayProxy
- func (p *ArrayProxy) AddLong(values ...int64) *ArrayProxy
- func (p *ArrayProxy) AddNewArray() *ArrayProxy
- func (p *ArrayProxy) AddNull() *ArrayProxy
- func (p *ArrayProxy) AddString(values ...string) *ArrayProxy
- func (p *ArrayProxy) Delete(idx int) json.Element
- func (p *ArrayProxy) InsertIntegerAfter(index int, v int) *ArrayProxy
- func (p *ArrayProxy) Len() int
- func (p *ArrayProxy) MoveBefore(nextCreatedAt, createdAt *time.Ticket)
- type CounterProxy
- type ObjectProxy
- func (p *ObjectProxy) Delete(k string) json.Element
- func (p *ObjectProxy) GetArray(k string) *ArrayProxy
- func (p *ObjectProxy) GetCounter(k string) *CounterProxy
- func (p *ObjectProxy) GetObject(k string) *ObjectProxy
- func (p *ObjectProxy) GetRichText(k string) *RichTextProxy
- func (p *ObjectProxy) GetText(k string) *TextProxy
- func (p *ObjectProxy) SetBool(k string, v bool) *ObjectProxy
- func (p *ObjectProxy) SetBytes(k string, v []byte) *ObjectProxy
- func (p *ObjectProxy) SetDate(k string, v gotime.Time) *ObjectProxy
- func (p *ObjectProxy) SetDouble(k string, v float64) *ObjectProxy
- func (p *ObjectProxy) SetInteger(k string, v int) *ObjectProxy
- func (p *ObjectProxy) SetLong(k string, v int64) *ObjectProxy
- func (p *ObjectProxy) SetNewArray(k string) *ArrayProxy
- func (p *ObjectProxy) SetNewCounter(k string, n interface{}) *CounterProxy
- func (p *ObjectProxy) SetNewObject(k string) *ObjectProxy
- func (p *ObjectProxy) SetNewRichText(k string) *RichTextProxy
- func (p *ObjectProxy) SetNewText(k string) *TextProxy
- func (p *ObjectProxy) SetNull(k string) *ObjectProxy
- func (p *ObjectProxy) SetString(k, v string) *ObjectProxy
- type RichTextProxy
- type TextProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayProxy ¶
ArrayProxy is a proxy representing Array.
func NewArrayProxy ¶
func NewArrayProxy(ctx *change.Context, array *json.Array) *ArrayProxy
NewArrayProxy creates a new instance of ArrayProxy.
func (*ArrayProxy) AddBool ¶
func (p *ArrayProxy) AddBool(values ...bool) *ArrayProxy
AddBool adds the given boolean at the last.
func (*ArrayProxy) AddBytes ¶
func (p *ArrayProxy) AddBytes(values ...[]byte) *ArrayProxy
AddBytes adds the given bytes at the last.
func (*ArrayProxy) AddDate ¶
func (p *ArrayProxy) AddDate(values ...gotime.Time) *ArrayProxy
AddDate adds the given date at the last.
func (*ArrayProxy) AddDouble ¶
func (p *ArrayProxy) AddDouble(values ...float64) *ArrayProxy
AddDouble adds the given double at the last.
func (*ArrayProxy) AddInteger ¶
func (p *ArrayProxy) AddInteger(values ...int) *ArrayProxy
AddInteger adds the given integer at the last.
func (*ArrayProxy) AddLong ¶
func (p *ArrayProxy) AddLong(values ...int64) *ArrayProxy
AddLong adds the given long at the last.
func (*ArrayProxy) AddNewArray ¶
func (p *ArrayProxy) AddNewArray() *ArrayProxy
AddNewArray adds a new array at the last.
func (*ArrayProxy) AddNull ¶ added in v0.1.3
func (p *ArrayProxy) AddNull() *ArrayProxy
AddNull adds the null at the last.
func (*ArrayProxy) AddString ¶
func (p *ArrayProxy) AddString(values ...string) *ArrayProxy
AddString adds the given string at the last.
func (*ArrayProxy) Delete ¶
func (p *ArrayProxy) Delete(idx int) json.Element
Delete deletes the element of the given index.
func (*ArrayProxy) InsertIntegerAfter ¶
func (p *ArrayProxy) InsertIntegerAfter(index int, v int) *ArrayProxy
InsertIntegerAfter inserts the given integer after the given previous element.
func (*ArrayProxy) MoveBefore ¶
func (p *ArrayProxy) MoveBefore(nextCreatedAt, createdAt *time.Ticket)
MoveBefore moves the given element to its new position before the given next element.
type CounterProxy ¶
CounterProxy is a proxy representing counter.
func NewCounterProxy ¶
func NewCounterProxy(ctx *change.Context, counter *json.Counter) *CounterProxy
NewCounterProxy create CounterProxy instance.
func (*CounterProxy) Increase ¶
func (p *CounterProxy) Increase(v interface{}) *CounterProxy
Increase adds an increase operations. Only numeric types are allowed as operand values, excluding uint64 and uintptr.
type ObjectProxy ¶
ObjectProxy is a proxy representing Object.
func NewObjectProxy ¶
func NewObjectProxy(ctx *change.Context, root *json.Object) *ObjectProxy
NewObjectProxy creates a new instance of ObjectProxy.
func (*ObjectProxy) Delete ¶
func (p *ObjectProxy) Delete(k string) json.Element
Delete deletes the value of the given key.
func (*ObjectProxy) GetArray ¶
func (p *ObjectProxy) GetArray(k string) *ArrayProxy
GetArray returns Array of the given key.
func (*ObjectProxy) GetCounter ¶
func (p *ObjectProxy) GetCounter(k string) *CounterProxy
GetCounter returns CounterProxy of the given key.
func (*ObjectProxy) GetObject ¶
func (p *ObjectProxy) GetObject(k string) *ObjectProxy
GetObject returns Object of the given key.
func (*ObjectProxy) GetRichText ¶
func (p *ObjectProxy) GetRichText(k string) *RichTextProxy
GetRichText returns RichText of the given key.
func (*ObjectProxy) GetText ¶
func (p *ObjectProxy) GetText(k string) *TextProxy
GetText returns Text of the given key.
func (*ObjectProxy) SetBool ¶
func (p *ObjectProxy) SetBool(k string, v bool) *ObjectProxy
SetBool sets the given boolean for the given key.
func (*ObjectProxy) SetBytes ¶
func (p *ObjectProxy) SetBytes(k string, v []byte) *ObjectProxy
SetBytes sets the given bytes for the given key.
func (*ObjectProxy) SetDate ¶
func (p *ObjectProxy) SetDate(k string, v gotime.Time) *ObjectProxy
SetDate sets the given date for the given key.
func (*ObjectProxy) SetDouble ¶
func (p *ObjectProxy) SetDouble(k string, v float64) *ObjectProxy
SetDouble sets the given double for the given key.
func (*ObjectProxy) SetInteger ¶
func (p *ObjectProxy) SetInteger(k string, v int) *ObjectProxy
SetInteger sets the given integer for the given key.
func (*ObjectProxy) SetLong ¶
func (p *ObjectProxy) SetLong(k string, v int64) *ObjectProxy
SetLong sets the given long for the given key.
func (*ObjectProxy) SetNewArray ¶
func (p *ObjectProxy) SetNewArray(k string) *ArrayProxy
SetNewArray sets a new Array for the given key.
func (*ObjectProxy) SetNewCounter ¶
func (p *ObjectProxy) SetNewCounter(k string, n interface{}) *CounterProxy
SetNewCounter sets a new NewCounter for the given key.
func (*ObjectProxy) SetNewObject ¶
func (p *ObjectProxy) SetNewObject(k string) *ObjectProxy
SetNewObject sets a new Object for the given key.
func (*ObjectProxy) SetNewRichText ¶
func (p *ObjectProxy) SetNewRichText(k string) *RichTextProxy
SetNewRichText sets a new RichText for the given key.
func (*ObjectProxy) SetNewText ¶
func (p *ObjectProxy) SetNewText(k string) *TextProxy
SetNewText sets a new Text for the given key.
func (*ObjectProxy) SetNull ¶ added in v0.1.3
func (p *ObjectProxy) SetNull(k string) *ObjectProxy
SetNull sets the null for the given key.
func (*ObjectProxy) SetString ¶
func (p *ObjectProxy) SetString(k, v string) *ObjectProxy
SetString sets the given string for the given key.
type RichTextProxy ¶
RichTextProxy is a proxy representing RichText.
func NewRichTextProxy ¶
func NewRichTextProxy(ctx *change.Context, text *json.RichText) *RichTextProxy
NewRichTextProxy creates a new instance of RichTextProxy.
func (*RichTextProxy) Edit ¶
func (p *RichTextProxy) Edit(from, to int, content string, attributes map[string]string) *RichTextProxy
Edit edits the given range with the given content and attributes.
func (*RichTextProxy) SetStyle ¶
func (p *RichTextProxy) SetStyle(from, to int, attributes map[string]string) *RichTextProxy
SetStyle applies the style of the given range.