Exemplo n.º 1
0
func NewUserGroupFromBytes(data []byte) *UserGroup {
	o := new(UserGroup)
	transport := thrift.NewStreamTransportR(bytes.NewBuffer(data))
	protocol := thrift.NewTCompactProtocol(transport)
	o.Read(protocol)
	return o
}
Exemplo n.º 2
0
func (p *UserGroup) ToBytes() []byte {
	transport := thrift.NewTMemoryBuffer()
	protocol := thrift.NewTCompactProtocol(transport)
	p.Write(protocol)
	protocol.Flush()

	return transport.Bytes()
}