Documentation
¶
Index ¶
- type FieldMask
- func (self *FieldMask) All() bool
- func (self *FieldMask) Exist() bool
- func (self *FieldMask) Field(id int16) (*FieldMask, bool)
- func (self *FieldMask) Int(id int) (*FieldMask, bool)
- func (cur *FieldMask) PathInMask(curDesc *thrift_reflection.TypeDescriptor, path string) bool
- func (self *FieldMask) Recycle()
- func (self *FieldMask) Str(id string) (*FieldMask, bool)
- func (self FieldMask) String(desc *thrift_reflection.TypeDescriptor) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldMask ¶
type FieldMask struct {
// contains filtered or unexported fields
}
FieldMask represents a collection of thrift pathes See
func GetFieldMask ¶
func GetFieldMask(desc *thrift_reflection.TypeDescriptor, paths ...string) (*FieldMask, error)
GetFieldMask reuse fieldmask from pool
func NewFieldMask ¶
func NewFieldMask(desc *thrift_reflection.TypeDescriptor, pathes ...string) (*FieldMask, error)
NewFieldMask create a new fieldmask
func (*FieldMask) Field ¶
Field returns the specific sub mask for a given id, and tells if the id in the mask
func (*FieldMask) Int ¶
Int returns the specific sub mask for a given index, and tells if the index in the mask
func (*FieldMask) PathInMask ¶
func (cur *FieldMask) PathInMask(curDesc *thrift_reflection.TypeDescriptor, path string) bool
PathInMask tells if a given path is already in current fieldmask
func (*FieldMask) Str ¶
Field returns the specific sub mask for a given string, and tells if the string in the mask
func (FieldMask) String ¶
func (self FieldMask) String(desc *thrift_reflection.TypeDescriptor) string
String pretty prints the structure a FieldMask represents
For example: pathes `[]string{"$.Extra[0].List", "$.Extra[*].Set", "$.Meta.F2{0}", "$.Meta.F2{*}.Addr"}` will print:
(Base)
.Extra (list<ExtraInfo>)
[
*
]
.Meta (MetaInfo)
.F2 (map<i8,Base>)
{
*
}
WARING: This is unstable API, the printer format is not guaranteed