requestf

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: BSD-3-Clause Imports: 2 Imported by: 90

Documentation

Overview

Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from RequestF.tars Package requestf comment

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestPacket

type RequestPacket struct {
	IVersion     int16             `json:"iVersion" tars:"iVersion,tag:1,require:true"`
	CPacketType  int8              `json:"cPacketType" tars:"cPacketType,tag:2,require:true"`
	IMessageType int32             `json:"iMessageType" tars:"iMessageType,tag:3,require:true"`
	IRequestId   int32             `json:"iRequestId" tars:"iRequestId,tag:4,require:true"`
	SServantName string            `json:"sServantName" tars:"sServantName,tag:5,require:true"`
	SFuncName    string            `json:"sFuncName" tars:"sFuncName,tag:6,require:true"`
	SBuffer      []int8            `json:"sBuffer" tars:"sBuffer,tag:7,require:true"`
	ITimeout     int32             `json:"iTimeout" tars:"iTimeout,tag:8,require:true"`
	Context      map[string]string `json:"context" tars:"context,tag:9,require:true"`
	Status       map[string]string `json:"status" tars:"status,tag:10,require:true"`
}

RequestPacket struct implement

func (*RequestPacket) AddMessageType added in v1.1.2

func (st *RequestPacket) AddMessageType(t int32)

AddMessageType add message type t to message

func (*RequestPacket) HasMessageType added in v1.1.2

func (st *RequestPacket) HasMessageType(t int32) bool

HasMessageType check whether message contain type t

func (*RequestPacket) ReadBlock

func (st *RequestPacket) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

ReadBlock reads struct from the given tag , require or optional.

func (*RequestPacket) ReadFrom

func (st *RequestPacket) ReadFrom(readBuf *codec.Reader) error

ReadFrom reads from readBuf and put into struct.

func (*RequestPacket) ResetDefault added in v1.1.2

func (st *RequestPacket) ResetDefault()

func (*RequestPacket) WriteBlock

func (st *RequestPacket) WriteBlock(buf *codec.Buffer, tag byte) error

WriteBlock encode struct

func (*RequestPacket) WriteTo

func (st *RequestPacket) WriteTo(buf *codec.Buffer) (err error)

WriteTo encode struct to buffer

type ResponsePacket

type ResponsePacket struct {
	IVersion     int16             `json:"iVersion" tars:"iVersion,tag:1,require:true"`
	CPacketType  int8              `json:"cPacketType" tars:"cPacketType,tag:2,require:true"`
	IRequestId   int32             `json:"iRequestId" tars:"iRequestId,tag:3,require:true"`
	IMessageType int32             `json:"iMessageType" tars:"iMessageType,tag:4,require:true"`
	IRet         int32             `json:"iRet" tars:"iRet,tag:5,require:true"`
	SBuffer      []int8            `json:"sBuffer" tars:"sBuffer,tag:6,require:true"`
	Status       map[string]string `json:"status" tars:"status,tag:7,require:true"`
	SResultDesc  string            `json:"sResultDesc" tars:"sResultDesc,tag:8,require:false"`
	Context      map[string]string `json:"context" tars:"context,tag:9,require:false"`
}

ResponsePacket struct implement

func (*ResponsePacket) ReadBlock

func (st *ResponsePacket) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

ReadBlock reads struct from the given tag , require or optional.

func (*ResponsePacket) ReadFrom

func (st *ResponsePacket) ReadFrom(readBuf *codec.Reader) error

ReadFrom reads from readBuf and put into struct.

func (*ResponsePacket) ResetDefault added in v1.1.2

func (st *ResponsePacket) ResetDefault()

func (*ResponsePacket) WriteBlock

func (st *ResponsePacket) WriteBlock(buf *codec.Buffer, tag byte) error

WriteBlock encode struct

func (*ResponsePacket) WriteTo

func (st *ResponsePacket) WriteTo(buf *codec.Buffer) (err error)

WriteTo encode struct to buffer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL