當前位置: 首頁>>代碼示例>>Golang>>正文


Golang TProtocol.ReadString方法代碼示例

本文整理匯總了Golang中github.com/bcgraham/tsumtsum/external/thrift.TProtocol.ReadString方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.ReadString方法的具體用法?Golang TProtocol.ReadString怎麽用?Golang TProtocol.ReadString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/bcgraham/tsumtsum/external/thrift.TProtocol的用法示例。


在下文中一共展示了TProtocol.ReadString方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: ReadField0

func (p *FindAndAddContactsByUseridResult) ReadField0(iprot thrift.TProtocol) error {
	_, _, size, err := iprot.ReadMapBegin()
	if err != nil {
		return fmt.Errorf("error reading map begin: %s", err)
	}
	tMap := make(map[string]*Contact, size)
	p.Success = tMap
	for i := 0; i < size; i++ {
		var _key1341 string
		if v, err := iprot.ReadString(); err != nil {
			return fmt.Errorf("error reading field 0: %s", err)
		} else {
			_key1341 = v
		}
		_val1342 := &Contact{}
		if err := _val1342.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _val1342, err)
		}
		p.Success[_key1341] = _val1342
	}
	if err := iprot.ReadMapEnd(); err != nil {
		return fmt.Errorf("error reading map end: %s", err)
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:25,代碼來源:findandaddcontactbyuserid.go

示例2: ReadField2

func (p *FindAndAddContactsByUseridArgs) ReadField2(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return fmt.Errorf("error reading field 2: %s", err)
	} else {
		p.Userid = v
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:8,代碼來源:findandaddcontactbyuserid.go

示例3: ReadField2

func (p *GetLastReadMessageIdsArgs) ReadField2(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return fmt.Errorf("error reading field 2: %s", err)
	} else {
		p.ChatId = v
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:8,代碼來源:messageservice.go

示例4: ReadField3

func (p *LoginWithVerifierForCertificateArgs) ReadField3(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return fmt.Errorf("error reading field 3: %s", err)
	} else {
		p.Verifier = v
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:8,代碼來源:loginwithverifierforcertificate.go

示例5: ReadField9

func (p *LoginWithIdentityCredentialForCertificateArgs) ReadField9(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return fmt.Errorf("error reading field 9: %s", err)
	} else {
		p.Certificate = v
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:8,代碼來源:loginwithidentitycredentialforcertificate.go

示例6: ReadField0

func (p *GetAllContactIdsResult) ReadField0(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]string, 0, size)
	p.Success = tSlice
	for i := 0; i < size; i++ {
		var _elem1351 string
		if v, err := iprot.ReadString(); err != nil {
			return fmt.Errorf("error reading field 0: %s", err)
		} else {
			_elem1351 = v
		}
		p.Success = append(p.Success, _elem1351)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
開發者ID:justsurrender,項目名稱:tsumtsum,代碼行數:21,代碼來源:getallcontactids.go


注:本文中的github.com/bcgraham/tsumtsum/external/thrift.TProtocol.ReadString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。