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


Golang TProtocol.WriteI64方法代碼示例

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


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

示例1: writeField1

func (p *NoStdJson) writeField1(oprot thrift.TProtocol) (err error) {
	if p.IsSetOne() {
		if err := oprot.WriteFieldBegin("one", thrift.MAP, 1); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:one: ", p), err)
		}
		if err := oprot.WriteMapBegin(thrift.I64, thrift.STRING, len(p.One)); err != nil {
			return thrift.PrependError("error writing map begin: ", err)
		}
		for k, v := range p.One {
			if err := oprot.WriteI64(int64(k)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
			if err := oprot.WriteString(string(v)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
		}
		if err := oprot.WriteMapEnd(); err != nil {
			return thrift.PrependError("error writing map end: ", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 1:one: ", p), err)
		}
	}
	return err
}
開發者ID:peter-edge,項目名稱:lion-go,代碼行數:25,代碼來源:ttypes.go

示例2: writeField2

func (p *BoltProcessTimerArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("time", thrift.I64, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:time: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Time)); err != nil {
		return fmt.Errorf("%T.time (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:time: %s", p, err)
	}
	return err
}
開發者ID:concord,項目名稱:concord-go,代碼行數:12,代碼來源:computationservice.go

示例3: writeField1

func (p *GetPrivateMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("uid", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:uid: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Uid)); err != nil {
		return fmt.Errorf("%T.uid (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:uid: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:privatemessagemanagersync.go

示例4: writeField3

func (p *GetPrivateMessageListArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("endReceiveTime", thrift.I64, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:endReceiveTime: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.EndReceiveTime)); err != nil {
		return fmt.Errorf("%T.endReceiveTime (3) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:endReceiveTime: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:privatemessagemanagersync.go

示例5: writeField2

func (p *DeleteResourceViewHistoryArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("viewTime", thrift.I64, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:viewTime: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.ViewTime)); err != nil {
		return fmt.Errorf("%T.viewTime (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:viewTime: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:resourcehistorymanager.go

示例6: writeField2

func (p *DadoTransporteThrift) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("tipoDadoSerializado", thrift.I64, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:tipoDadoSerializado: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.TipoDadoSerializado)); err != nil {
		return fmt.Errorf("%T.tipoDadoSerializado (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:tipoDadoSerializado: %s", p, err)
	}
	return err
}
開發者ID:esusab,項目名稱:integracao,代碼行數:12,代碼來源:ttypes.go

示例7: writeField1

func (p *AuditLogEntry) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:id: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Id)); err != nil {
		return fmt.Errorf("%T.id (1) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:id: %s", p, err)
	}
	return err
}
開發者ID:vonwenm,項目名稱:gosnowflake-1,代碼行數:12,代碼來源:ttypes.go

示例8: writeField1

func (p *Person) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("ID", thrift.I64, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ID: ", p), err)
	}
	if err := oprot.WriteI64(int64(p.ID)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.ID (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ID: ", p), err)
	}
	return err
}
開發者ID:dynastymasra,項目名稱:GoGinThrift,代碼行數:12,代碼來源:ttypes.go

示例9: writeField1

func (p *GetComplaintsArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("startCreateTime", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:startCreateTime: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.StartCreateTime)); err != nil {
		return fmt.Errorf("%T.startCreateTime (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:startCreateTime: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:complaintmanagersync.go

示例10: writeField2

func (p *UpdateComplaintArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("mask", thrift.I64, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:mask: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Mask)); err != nil {
		return fmt.Errorf("%T.mask (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:mask: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:complaintmanagersync.go

示例11: writeField3

func (p *GetGroupMessagesArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("startMid", thrift.I64, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:startMid: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.StartMid)); err != nil {
		return fmt.Errorf("%T.startMid (3) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:startMid: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:chatmanagersync.go

示例12: writeField2

func (p *GetGroupMessagesArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("startDeliverTime", thrift.I64, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:startDeliverTime: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.StartDeliverTime)); err != nil {
		return fmt.Errorf("%T.startDeliverTime (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:startDeliverTime: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:chatmanagersync.go

示例13: writeField1

func (p *SignalArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("topologyId", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:topologyId: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.TopologyId)); err != nil {
		return fmt.Errorf("%T.topologyId (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:topologyId: %s", p, err)
	}
	return err
}
開發者ID:concord,項目名稱:concord-go,代碼行數:12,代碼來源:boltmanagerservice.go

示例14: writeField1

func (p *RpcServiceFunCallArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("callTime", thrift.I64, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:callTime: ", p), err)
	}
	if err := oprot.WriteI64(int64(p.CallTime)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.callTime (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:callTime: ", p), err)
	}
	return err
}
開發者ID:gityf,項目名稱:go,代碼行數:12,代碼來源:rpcservice.go

示例15: writeField1

func (p *DestroyArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("user_id", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:user_id: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.UserId)); err != nil {
		return fmt.Errorf("%T.user_id (1) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:user_id: %s", p, err)
	}
	return err
}
開發者ID:huacnlee,項目名稱:thrift_example,代碼行數:12,代碼來源:common_service.go


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