| // Code generated by Thrift Compiler (0.23.0). DO NOT EDIT. | |
| package rpc | |
| import ( | |
| "bytes" | |
| "context" | |
| "database/sql/driver" | |
| "errors" | |
| "fmt" | |
| "iter" | |
| "log/slog" | |
| "time" | |
| thrift "github.com/apache/thrift/lib/go/thrift" | |
| "strings" | |
| "regexp" | |
| "github.com/apache/iotdb-client-go/v2/common" | |
| ) | |
| // (needed to ensure safety because of naive import list construction.) | |
| var _ = bytes.Equal | |
| var _ = context.Background | |
| var _ = errors.New | |
| var _ = fmt.Printf | |
| var _ = iter.Pull[int] | |
| var _ = slog.Log | |
| var _ = time.Now | |
| var _ = thrift.ZERO | |
| // (needed by validator.) | |
| var _ = strings.Contains | |
| var _ = regexp.MatchString | |
| var _ = common.GoUnusedProtection__ | |
| type TSProtocolVersion int64 | |
| const ( | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V1 TSProtocolVersion = 0 | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V2 TSProtocolVersion = 1 | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3 TSProtocolVersion = 2 | |
| ) | |
| var knownTSProtocolVersionValues = []TSProtocolVersion{ | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V1, | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V2, | |
| TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, | |
| } | |
| func TSProtocolVersionValues() iter.Seq[TSProtocolVersion] { | |
| return func(yield func(TSProtocolVersion) bool) { | |
| for _, v := range knownTSProtocolVersionValues { | |
| if !yield(v) { | |
| return | |
| } | |
| } | |
| } | |
| } | |
| func (p TSProtocolVersion) String() string { | |
| switch p { | |
| case TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V1: return "IOTDB_SERVICE_PROTOCOL_V1" | |
| case TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V2: return "IOTDB_SERVICE_PROTOCOL_V2" | |
| case TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3: return "IOTDB_SERVICE_PROTOCOL_V3" | |
| } | |
| return "<UNSET>" | |
| } | |
| func TSProtocolVersionFromString(s string) (TSProtocolVersion, error) { | |
| switch s { | |
| case "IOTDB_SERVICE_PROTOCOL_V1": return TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V1, nil | |
| case "IOTDB_SERVICE_PROTOCOL_V2": return TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V2, nil | |
| case "IOTDB_SERVICE_PROTOCOL_V3": return TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, nil | |
| } | |
| return TSProtocolVersion(0), fmt.Errorf("not a valid TSProtocolVersion string") | |
| } | |
| func TSProtocolVersionPtr(v TSProtocolVersion) *TSProtocolVersion { return &v } | |
| func (p TSProtocolVersion) MarshalText() ([]byte, error) { | |
| return []byte(p.String()), nil | |
| } | |
| func (p *TSProtocolVersion) UnmarshalText(text []byte) error { | |
| q, err := TSProtocolVersionFromString(string(text)) | |
| if err != nil { | |
| return err | |
| } | |
| *p = q | |
| return nil | |
| } | |
| func (p *TSProtocolVersion) Scan(value interface{}) error { | |
| v, ok := value.(int64) | |
| if !ok { | |
| return errors.New("Scan value is not int64") | |
| } | |
| *p = TSProtocolVersion(v) | |
| return nil | |
| } | |
| func (p *TSProtocolVersion) Value() (driver.Value, error) { | |
| if p == nil { | |
| return nil, nil | |
| } | |
| return int64(*p), nil | |
| } | |
| type TSConnectionType int64 | |
| const ( | |
| TSConnectionType_THRIFT_BASED TSConnectionType = 0 | |
| TSConnectionType_MQTT_BASED TSConnectionType = 1 | |
| TSConnectionType_INTERNAL TSConnectionType = 2 | |
| TSConnectionType_REST_BASED TSConnectionType = 3 | |
| ) | |
| var knownTSConnectionTypeValues = []TSConnectionType{ | |
| TSConnectionType_THRIFT_BASED, | |
| TSConnectionType_MQTT_BASED, | |
| TSConnectionType_INTERNAL, | |
| TSConnectionType_REST_BASED, | |
| } | |
| func TSConnectionTypeValues() iter.Seq[TSConnectionType] { | |
| return func(yield func(TSConnectionType) bool) { | |
| for _, v := range knownTSConnectionTypeValues { | |
| if !yield(v) { | |
| return | |
| } | |
| } | |
| } | |
| } | |
| func (p TSConnectionType) String() string { | |
| switch p { | |
| case TSConnectionType_THRIFT_BASED: return "THRIFT_BASED" | |
| case TSConnectionType_MQTT_BASED: return "MQTT_BASED" | |
| case TSConnectionType_INTERNAL: return "INTERNAL" | |
| case TSConnectionType_REST_BASED: return "REST_BASED" | |
| } | |
| return "<UNSET>" | |
| } | |
| func TSConnectionTypeFromString(s string) (TSConnectionType, error) { | |
| switch s { | |
| case "THRIFT_BASED": return TSConnectionType_THRIFT_BASED, nil | |
| case "MQTT_BASED": return TSConnectionType_MQTT_BASED, nil | |
| case "INTERNAL": return TSConnectionType_INTERNAL, nil | |
| case "REST_BASED": return TSConnectionType_REST_BASED, nil | |
| } | |
| return TSConnectionType(0), fmt.Errorf("not a valid TSConnectionType string") | |
| } | |
| func TSConnectionTypePtr(v TSConnectionType) *TSConnectionType { return &v } | |
| func (p TSConnectionType) MarshalText() ([]byte, error) { | |
| return []byte(p.String()), nil | |
| } | |
| func (p *TSConnectionType) UnmarshalText(text []byte) error { | |
| q, err := TSConnectionTypeFromString(string(text)) | |
| if err != nil { | |
| return err | |
| } | |
| *p = q | |
| return nil | |
| } | |
| func (p *TSConnectionType) Scan(value interface{}) error { | |
| v, ok := value.(int64) | |
| if !ok { | |
| return errors.New("Scan value is not int64") | |
| } | |
| *p = TSConnectionType(v) | |
| return nil | |
| } | |
| func (p *TSConnectionType) Value() (driver.Value, error) { | |
| if p == nil { | |
| return nil, nil | |
| } | |
| return int64(*p), nil | |
| } | |
| // Attributes: | |
| // - Time | |
| // - ValueList | |
| // - BitmapList | |
| // | |
| type TSQueryDataSet struct { | |
| Time []byte `thrift:"time,1,required" db:"time" json:"time"` | |
| ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` | |
| BitmapList [][]byte `thrift:"bitmapList,3,required" db:"bitmapList" json:"bitmapList"` | |
| } | |
| func NewTSQueryDataSet() *TSQueryDataSet { | |
| return &TSQueryDataSet{} | |
| } | |
| func (p *TSQueryDataSet) GetTime() []byte { | |
| return p.Time | |
| } | |
| func (p *TSQueryDataSet) GetValueList() [][]byte { | |
| return p.ValueList | |
| } | |
| func (p *TSQueryDataSet) GetBitmapList() [][]byte { | |
| return p.BitmapList | |
| } | |
| func (p *TSQueryDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetTime bool = false; | |
| var issetValueList bool = false; | |
| var issetBitmapList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValueList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetBitmapList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")) | |
| } | |
| if !issetValueList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")) | |
| } | |
| if !issetBitmapList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field BitmapList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.Time = v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.ValueList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem0 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem0 = v | |
| } | |
| p.ValueList = append(p.ValueList, _elem0) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryDataSet) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.BitmapList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem1 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem1 = v | |
| } | |
| p.BitmapList = append(p.BitmapList, _elem1) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSQueryDataSet"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "time", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:time: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Time); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.time (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:time: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValueList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryDataSet) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "bitmapList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bitmapList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.BitmapList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.BitmapList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bitmapList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryDataSet) Equals(other *TSQueryDataSet) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if bytes.Compare(p.Time, other.Time) != 0 { return false } | |
| if len(p.ValueList) != len(other.ValueList) { return false } | |
| for i, _tgt := range p.ValueList { | |
| _src2 := other.ValueList[i] | |
| if bytes.Compare(_tgt, _src2) != 0 { return false } | |
| } | |
| if len(p.BitmapList) != len(other.BitmapList) { return false } | |
| for i, _tgt := range p.BitmapList { | |
| _src3 := other.BitmapList[i] | |
| if bytes.Compare(_tgt, _src3) != 0 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSQueryDataSet) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSQueryDataSet(%+v)", *p) | |
| } | |
| func (p *TSQueryDataSet) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSQueryDataSet", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSQueryDataSet)(nil) | |
| func (p *TSQueryDataSet) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - TimeList | |
| // - ValueList | |
| // | |
| type TSQueryNonAlignDataSet struct { | |
| TimeList [][]byte `thrift:"timeList,1,required" db:"timeList" json:"timeList"` | |
| ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` | |
| } | |
| func NewTSQueryNonAlignDataSet() *TSQueryNonAlignDataSet { | |
| return &TSQueryNonAlignDataSet{} | |
| } | |
| func (p *TSQueryNonAlignDataSet) GetTimeList() [][]byte { | |
| return p.TimeList | |
| } | |
| func (p *TSQueryNonAlignDataSet) GetValueList() [][]byte { | |
| return p.ValueList | |
| } | |
| func (p *TSQueryNonAlignDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetTimeList bool = false; | |
| var issetValueList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimeList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValueList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetTimeList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeList is not set")) | |
| } | |
| if !issetValueList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryNonAlignDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.TimeList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem4 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem4 = v | |
| } | |
| p.TimeList = append(p.TimeList, _elem4) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryNonAlignDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.ValueList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem5 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem5 = v | |
| } | |
| p.ValueList = append(p.ValueList, _elem5) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryNonAlignDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSQueryNonAlignDataSet"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryNonAlignDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timeList", thrift.LIST, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timeList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.TimeList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.TimeList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timeList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryNonAlignDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValueList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryNonAlignDataSet) Equals(other *TSQueryNonAlignDataSet) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if len(p.TimeList) != len(other.TimeList) { return false } | |
| for i, _tgt := range p.TimeList { | |
| _src6 := other.TimeList[i] | |
| if bytes.Compare(_tgt, _src6) != 0 { return false } | |
| } | |
| if len(p.ValueList) != len(other.ValueList) { return false } | |
| for i, _tgt := range p.ValueList { | |
| _src7 := other.ValueList[i] | |
| if bytes.Compare(_tgt, _src7) != 0 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSQueryNonAlignDataSet) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSQueryNonAlignDataSet(%+v)", *p) | |
| } | |
| func (p *TSQueryNonAlignDataSet) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSQueryNonAlignDataSet", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSQueryNonAlignDataSet)(nil) | |
| func (p *TSQueryNonAlignDataSet) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - ActivityList | |
| // - ElapsedTimeList | |
| // - SeriesPathNum | |
| // - SeqFileNum | |
| // - UnSeqFileNum | |
| // - SequenceChunkNum | |
| // - SequenceChunkPointNum | |
| // - UnsequenceChunkNum | |
| // - UnsequenceChunkPointNum | |
| // - TotalPageNum | |
| // - OverlappedPageNum | |
| // | |
| type TSTracingInfo struct { | |
| ActivityList []string `thrift:"activityList,1,required" db:"activityList" json:"activityList"` | |
| ElapsedTimeList []int64 `thrift:"elapsedTimeList,2,required" db:"elapsedTimeList" json:"elapsedTimeList"` | |
| SeriesPathNum *int32 `thrift:"seriesPathNum,3" db:"seriesPathNum" json:"seriesPathNum,omitempty"` | |
| SeqFileNum *int32 `thrift:"seqFileNum,4" db:"seqFileNum" json:"seqFileNum,omitempty"` | |
| UnSeqFileNum *int32 `thrift:"unSeqFileNum,5" db:"unSeqFileNum" json:"unSeqFileNum,omitempty"` | |
| SequenceChunkNum *int32 `thrift:"sequenceChunkNum,6" db:"sequenceChunkNum" json:"sequenceChunkNum,omitempty"` | |
| SequenceChunkPointNum *int64 `thrift:"sequenceChunkPointNum,7" db:"sequenceChunkPointNum" json:"sequenceChunkPointNum,omitempty"` | |
| UnsequenceChunkNum *int32 `thrift:"unsequenceChunkNum,8" db:"unsequenceChunkNum" json:"unsequenceChunkNum,omitempty"` | |
| UnsequenceChunkPointNum *int64 `thrift:"unsequenceChunkPointNum,9" db:"unsequenceChunkPointNum" json:"unsequenceChunkPointNum,omitempty"` | |
| TotalPageNum *int32 `thrift:"totalPageNum,10" db:"totalPageNum" json:"totalPageNum,omitempty"` | |
| OverlappedPageNum *int32 `thrift:"overlappedPageNum,11" db:"overlappedPageNum" json:"overlappedPageNum,omitempty"` | |
| } | |
| func NewTSTracingInfo() *TSTracingInfo { | |
| return &TSTracingInfo{} | |
| } | |
| func (p *TSTracingInfo) GetActivityList() []string { | |
| return p.ActivityList | |
| } | |
| func (p *TSTracingInfo) GetElapsedTimeList() []int64 { | |
| return p.ElapsedTimeList | |
| } | |
| var TSTracingInfo_SeriesPathNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetSeriesPathNum() int32 { | |
| if !p.IsSetSeriesPathNum() { | |
| return TSTracingInfo_SeriesPathNum_DEFAULT | |
| } | |
| return *p.SeriesPathNum | |
| } | |
| var TSTracingInfo_SeqFileNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetSeqFileNum() int32 { | |
| if !p.IsSetSeqFileNum() { | |
| return TSTracingInfo_SeqFileNum_DEFAULT | |
| } | |
| return *p.SeqFileNum | |
| } | |
| var TSTracingInfo_UnSeqFileNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetUnSeqFileNum() int32 { | |
| if !p.IsSetUnSeqFileNum() { | |
| return TSTracingInfo_UnSeqFileNum_DEFAULT | |
| } | |
| return *p.UnSeqFileNum | |
| } | |
| var TSTracingInfo_SequenceChunkNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetSequenceChunkNum() int32 { | |
| if !p.IsSetSequenceChunkNum() { | |
| return TSTracingInfo_SequenceChunkNum_DEFAULT | |
| } | |
| return *p.SequenceChunkNum | |
| } | |
| var TSTracingInfo_SequenceChunkPointNum_DEFAULT int64 | |
| func (p *TSTracingInfo) GetSequenceChunkPointNum() int64 { | |
| if !p.IsSetSequenceChunkPointNum() { | |
| return TSTracingInfo_SequenceChunkPointNum_DEFAULT | |
| } | |
| return *p.SequenceChunkPointNum | |
| } | |
| var TSTracingInfo_UnsequenceChunkNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetUnsequenceChunkNum() int32 { | |
| if !p.IsSetUnsequenceChunkNum() { | |
| return TSTracingInfo_UnsequenceChunkNum_DEFAULT | |
| } | |
| return *p.UnsequenceChunkNum | |
| } | |
| var TSTracingInfo_UnsequenceChunkPointNum_DEFAULT int64 | |
| func (p *TSTracingInfo) GetUnsequenceChunkPointNum() int64 { | |
| if !p.IsSetUnsequenceChunkPointNum() { | |
| return TSTracingInfo_UnsequenceChunkPointNum_DEFAULT | |
| } | |
| return *p.UnsequenceChunkPointNum | |
| } | |
| var TSTracingInfo_TotalPageNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetTotalPageNum() int32 { | |
| if !p.IsSetTotalPageNum() { | |
| return TSTracingInfo_TotalPageNum_DEFAULT | |
| } | |
| return *p.TotalPageNum | |
| } | |
| var TSTracingInfo_OverlappedPageNum_DEFAULT int32 | |
| func (p *TSTracingInfo) GetOverlappedPageNum() int32 { | |
| if !p.IsSetOverlappedPageNum() { | |
| return TSTracingInfo_OverlappedPageNum_DEFAULT | |
| } | |
| return *p.OverlappedPageNum | |
| } | |
| func (p *TSTracingInfo) IsSetSeriesPathNum() bool { | |
| return p.SeriesPathNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetSeqFileNum() bool { | |
| return p.SeqFileNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetUnSeqFileNum() bool { | |
| return p.UnSeqFileNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetSequenceChunkNum() bool { | |
| return p.SequenceChunkNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetSequenceChunkPointNum() bool { | |
| return p.SequenceChunkPointNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetUnsequenceChunkNum() bool { | |
| return p.UnsequenceChunkNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetUnsequenceChunkPointNum() bool { | |
| return p.UnsequenceChunkPointNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetTotalPageNum() bool { | |
| return p.TotalPageNum != nil | |
| } | |
| func (p *TSTracingInfo) IsSetOverlappedPageNum() bool { | |
| return p.OverlappedPageNum != nil | |
| } | |
| func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetActivityList bool = false; | |
| var issetElapsedTimeList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetActivityList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetElapsedTimeList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 11: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField11(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetActivityList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ActivityList is not set")) | |
| } | |
| if !issetElapsedTimeList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ElapsedTimeList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.ActivityList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem8 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem8 = v | |
| } | |
| p.ActivityList = append(p.ActivityList, _elem8) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int64, 0, size) | |
| p.ElapsedTimeList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem9 int64 | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem9 = v | |
| } | |
| p.ElapsedTimeList = append(p.ElapsedTimeList, _elem9) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.SeriesPathNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.SeqFileNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.UnSeqFileNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.SequenceChunkNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.SequenceChunkPointNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.UnsequenceChunkNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.UnsequenceChunkPointNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 10: ", err) | |
| } else { | |
| p.TotalPageNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 11: ", err) | |
| } else { | |
| p.OverlappedPageNum = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSTracingInfo"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| if err := p.writeField11(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSTracingInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "activityList", thrift.LIST, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:activityList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ActivityList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ActivityList { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:activityList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "elapsedTimeList", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:elapsedTimeList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.ElapsedTimeList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ElapsedTimeList { | |
| if err := oprot.WriteI64(ctx, int64(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:elapsedTimeList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSeriesPathNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "seriesPathNum", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:seriesPathNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.SeriesPathNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.seriesPathNum (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:seriesPathNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSeqFileNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "seqFileNum", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:seqFileNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.SeqFileNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.seqFileNum (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:seqFileNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetUnSeqFileNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "unSeqFileNum", thrift.I32, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:unSeqFileNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.UnSeqFileNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.unSeqFileNum (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:unSeqFileNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSequenceChunkNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "sequenceChunkNum", thrift.I32, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:sequenceChunkNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.SequenceChunkNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkNum (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:sequenceChunkNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSequenceChunkPointNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "sequenceChunkPointNum", thrift.I64, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:sequenceChunkPointNum: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.SequenceChunkPointNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkPointNum (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:sequenceChunkPointNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetUnsequenceChunkNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkNum", thrift.I32, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:unsequenceChunkNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.UnsequenceChunkNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkNum (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:unsequenceChunkNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetUnsequenceChunkPointNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkPointNum", thrift.I64, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:unsequenceChunkPointNum: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.UnsequenceChunkPointNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkPointNum (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:unsequenceChunkPointNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTotalPageNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "totalPageNum", thrift.I32, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:totalPageNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.TotalPageNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.totalPageNum (10) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:totalPageNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetOverlappedPageNum() { | |
| if err := oprot.WriteFieldBegin(ctx, "overlappedPageNum", thrift.I32, 11); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:overlappedPageNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.OverlappedPageNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.overlappedPageNum (11) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 11:overlappedPageNum: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSTracingInfo) Equals(other *TSTracingInfo) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if len(p.ActivityList) != len(other.ActivityList) { return false } | |
| for i, _tgt := range p.ActivityList { | |
| _src10 := other.ActivityList[i] | |
| if _tgt != _src10 { return false } | |
| } | |
| if len(p.ElapsedTimeList) != len(other.ElapsedTimeList) { return false } | |
| for i, _tgt := range p.ElapsedTimeList { | |
| _src11 := other.ElapsedTimeList[i] | |
| if _tgt != _src11 { return false } | |
| } | |
| if p.SeriesPathNum != other.SeriesPathNum { | |
| if p.SeriesPathNum == nil || other.SeriesPathNum == nil { | |
| return false | |
| } | |
| if (*p.SeriesPathNum) != (*other.SeriesPathNum) { return false } | |
| } | |
| if p.SeqFileNum != other.SeqFileNum { | |
| if p.SeqFileNum == nil || other.SeqFileNum == nil { | |
| return false | |
| } | |
| if (*p.SeqFileNum) != (*other.SeqFileNum) { return false } | |
| } | |
| if p.UnSeqFileNum != other.UnSeqFileNum { | |
| if p.UnSeqFileNum == nil || other.UnSeqFileNum == nil { | |
| return false | |
| } | |
| if (*p.UnSeqFileNum) != (*other.UnSeqFileNum) { return false } | |
| } | |
| if p.SequenceChunkNum != other.SequenceChunkNum { | |
| if p.SequenceChunkNum == nil || other.SequenceChunkNum == nil { | |
| return false | |
| } | |
| if (*p.SequenceChunkNum) != (*other.SequenceChunkNum) { return false } | |
| } | |
| if p.SequenceChunkPointNum != other.SequenceChunkPointNum { | |
| if p.SequenceChunkPointNum == nil || other.SequenceChunkPointNum == nil { | |
| return false | |
| } | |
| if (*p.SequenceChunkPointNum) != (*other.SequenceChunkPointNum) { return false } | |
| } | |
| if p.UnsequenceChunkNum != other.UnsequenceChunkNum { | |
| if p.UnsequenceChunkNum == nil || other.UnsequenceChunkNum == nil { | |
| return false | |
| } | |
| if (*p.UnsequenceChunkNum) != (*other.UnsequenceChunkNum) { return false } | |
| } | |
| if p.UnsequenceChunkPointNum != other.UnsequenceChunkPointNum { | |
| if p.UnsequenceChunkPointNum == nil || other.UnsequenceChunkPointNum == nil { | |
| return false | |
| } | |
| if (*p.UnsequenceChunkPointNum) != (*other.UnsequenceChunkPointNum) { return false } | |
| } | |
| if p.TotalPageNum != other.TotalPageNum { | |
| if p.TotalPageNum == nil || other.TotalPageNum == nil { | |
| return false | |
| } | |
| if (*p.TotalPageNum) != (*other.TotalPageNum) { return false } | |
| } | |
| if p.OverlappedPageNum != other.OverlappedPageNum { | |
| if p.OverlappedPageNum == nil || other.OverlappedPageNum == nil { | |
| return false | |
| } | |
| if (*p.OverlappedPageNum) != (*other.OverlappedPageNum) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSTracingInfo) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSTracingInfo(%+v)", *p) | |
| } | |
| func (p *TSTracingInfo) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSTracingInfo", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSTracingInfo)(nil) | |
| func (p *TSTracingInfo) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - QueryId | |
| // - Columns | |
| // - OperationType | |
| // - IgnoreTimeStamp | |
| // - DataTypeList | |
| // - QueryDataSet | |
| // - NonAlignQueryDataSet | |
| // - ColumnNameIndexMap | |
| // - SgColumns | |
| // - AliasColumns | |
| // - TracingInfo | |
| // - QueryResult_ | |
| // - MoreData | |
| // - Database | |
| // - TableModel | |
| // - ColumnIndex2TsBlockColumnIndexList | |
| // | |
| type TSExecuteStatementResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| QueryId *int64 `thrift:"queryId,2" db:"queryId" json:"queryId,omitempty"` | |
| Columns []string `thrift:"columns,3" db:"columns" json:"columns,omitempty"` | |
| OperationType *string `thrift:"operationType,4" db:"operationType" json:"operationType,omitempty"` | |
| IgnoreTimeStamp *bool `thrift:"ignoreTimeStamp,5" db:"ignoreTimeStamp" json:"ignoreTimeStamp,omitempty"` | |
| DataTypeList []string `thrift:"dataTypeList,6" db:"dataTypeList" json:"dataTypeList,omitempty"` | |
| QueryDataSet *TSQueryDataSet `thrift:"queryDataSet,7" db:"queryDataSet" json:"queryDataSet,omitempty"` | |
| NonAlignQueryDataSet *TSQueryNonAlignDataSet `thrift:"nonAlignQueryDataSet,8" db:"nonAlignQueryDataSet" json:"nonAlignQueryDataSet,omitempty"` | |
| ColumnNameIndexMap map[string]int32 `thrift:"columnNameIndexMap,9" db:"columnNameIndexMap" json:"columnNameIndexMap,omitempty"` | |
| SgColumns []string `thrift:"sgColumns,10" db:"sgColumns" json:"sgColumns,omitempty"` | |
| AliasColumns []int8 `thrift:"aliasColumns,11" db:"aliasColumns" json:"aliasColumns,omitempty"` | |
| TracingInfo *TSTracingInfo `thrift:"tracingInfo,12" db:"tracingInfo" json:"tracingInfo,omitempty"` | |
| QueryResult_ [][]byte `thrift:"queryResult,13" db:"queryResult" json:"queryResult,omitempty"` | |
| MoreData *bool `thrift:"moreData,14" db:"moreData" json:"moreData,omitempty"` | |
| Database *string `thrift:"database,15" db:"database" json:"database,omitempty"` | |
| TableModel *bool `thrift:"tableModel,16" db:"tableModel" json:"tableModel,omitempty"` | |
| ColumnIndex2TsBlockColumnIndexList []int32 `thrift:"columnIndex2TsBlockColumnIndexList,17" db:"columnIndex2TsBlockColumnIndexList" json:"columnIndex2TsBlockColumnIndexList,omitempty"` | |
| } | |
| func NewTSExecuteStatementResp() *TSExecuteStatementResp { | |
| return &TSExecuteStatementResp{} | |
| } | |
| var TSExecuteStatementResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSExecuteStatementResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSExecuteStatementResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| var TSExecuteStatementResp_QueryId_DEFAULT int64 | |
| func (p *TSExecuteStatementResp) GetQueryId() int64 { | |
| if !p.IsSetQueryId() { | |
| return TSExecuteStatementResp_QueryId_DEFAULT | |
| } | |
| return *p.QueryId | |
| } | |
| var TSExecuteStatementResp_Columns_DEFAULT []string | |
| func (p *TSExecuteStatementResp) GetColumns() []string { | |
| return p.Columns | |
| } | |
| var TSExecuteStatementResp_OperationType_DEFAULT string | |
| func (p *TSExecuteStatementResp) GetOperationType() string { | |
| if !p.IsSetOperationType() { | |
| return TSExecuteStatementResp_OperationType_DEFAULT | |
| } | |
| return *p.OperationType | |
| } | |
| var TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT bool | |
| func (p *TSExecuteStatementResp) GetIgnoreTimeStamp() bool { | |
| if !p.IsSetIgnoreTimeStamp() { | |
| return TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT | |
| } | |
| return *p.IgnoreTimeStamp | |
| } | |
| var TSExecuteStatementResp_DataTypeList_DEFAULT []string | |
| func (p *TSExecuteStatementResp) GetDataTypeList() []string { | |
| return p.DataTypeList | |
| } | |
| var TSExecuteStatementResp_QueryDataSet_DEFAULT *TSQueryDataSet | |
| func (p *TSExecuteStatementResp) GetQueryDataSet() *TSQueryDataSet { | |
| if !p.IsSetQueryDataSet() { | |
| return TSExecuteStatementResp_QueryDataSet_DEFAULT | |
| } | |
| return p.QueryDataSet | |
| } | |
| var TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT *TSQueryNonAlignDataSet | |
| func (p *TSExecuteStatementResp) GetNonAlignQueryDataSet() *TSQueryNonAlignDataSet { | |
| if !p.IsSetNonAlignQueryDataSet() { | |
| return TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT | |
| } | |
| return p.NonAlignQueryDataSet | |
| } | |
| var TSExecuteStatementResp_ColumnNameIndexMap_DEFAULT map[string]int32 | |
| func (p *TSExecuteStatementResp) GetColumnNameIndexMap() map[string]int32 { | |
| return p.ColumnNameIndexMap | |
| } | |
| var TSExecuteStatementResp_SgColumns_DEFAULT []string | |
| func (p *TSExecuteStatementResp) GetSgColumns() []string { | |
| return p.SgColumns | |
| } | |
| var TSExecuteStatementResp_AliasColumns_DEFAULT []int8 | |
| func (p *TSExecuteStatementResp) GetAliasColumns() []int8 { | |
| return p.AliasColumns | |
| } | |
| var TSExecuteStatementResp_TracingInfo_DEFAULT *TSTracingInfo | |
| func (p *TSExecuteStatementResp) GetTracingInfo() *TSTracingInfo { | |
| if !p.IsSetTracingInfo() { | |
| return TSExecuteStatementResp_TracingInfo_DEFAULT | |
| } | |
| return p.TracingInfo | |
| } | |
| var TSExecuteStatementResp_QueryResult__DEFAULT [][]byte | |
| func (p *TSExecuteStatementResp) GetQueryResult_() [][]byte { | |
| return p.QueryResult_ | |
| } | |
| var TSExecuteStatementResp_MoreData_DEFAULT bool | |
| func (p *TSExecuteStatementResp) GetMoreData() bool { | |
| if !p.IsSetMoreData() { | |
| return TSExecuteStatementResp_MoreData_DEFAULT | |
| } | |
| return *p.MoreData | |
| } | |
| var TSExecuteStatementResp_Database_DEFAULT string | |
| func (p *TSExecuteStatementResp) GetDatabase() string { | |
| if !p.IsSetDatabase() { | |
| return TSExecuteStatementResp_Database_DEFAULT | |
| } | |
| return *p.Database | |
| } | |
| var TSExecuteStatementResp_TableModel_DEFAULT bool | |
| func (p *TSExecuteStatementResp) GetTableModel() bool { | |
| if !p.IsSetTableModel() { | |
| return TSExecuteStatementResp_TableModel_DEFAULT | |
| } | |
| return *p.TableModel | |
| } | |
| var TSExecuteStatementResp_ColumnIndex2TsBlockColumnIndexList_DEFAULT []int32 | |
| func (p *TSExecuteStatementResp) GetColumnIndex2TsBlockColumnIndexList() []int32 { | |
| return p.ColumnIndex2TsBlockColumnIndexList | |
| } | |
| func (p *TSExecuteStatementResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetQueryId() bool { | |
| return p.QueryId != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetColumns() bool { | |
| return p.Columns != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetOperationType() bool { | |
| return p.OperationType != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetIgnoreTimeStamp() bool { | |
| return p.IgnoreTimeStamp != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetDataTypeList() bool { | |
| return p.DataTypeList != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetQueryDataSet() bool { | |
| return p.QueryDataSet != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetNonAlignQueryDataSet() bool { | |
| return p.NonAlignQueryDataSet != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetColumnNameIndexMap() bool { | |
| return p.ColumnNameIndexMap != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetSgColumns() bool { | |
| return p.SgColumns != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetAliasColumns() bool { | |
| return p.AliasColumns != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetTracingInfo() bool { | |
| return p.TracingInfo != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetQueryResult_() bool { | |
| return p.QueryResult_ != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetMoreData() bool { | |
| return p.MoreData != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetDatabase() bool { | |
| return p.Database != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetTableModel() bool { | |
| return p.TableModel != nil | |
| } | |
| func (p *TSExecuteStatementResp) IsSetColumnIndex2TsBlockColumnIndexList() bool { | |
| return p.ColumnIndex2TsBlockColumnIndexList != nil | |
| } | |
| func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 11: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField11(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 12: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField12(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 13: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField13(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 14: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField14(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 15: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField15(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 16: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField16(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 17: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField17(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.QueryId = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Columns = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem12 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem12 = v | |
| } | |
| p.Columns = append(p.Columns, _elem12) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.OperationType = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.IgnoreTimeStamp = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.DataTypeList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem13 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem13 = v | |
| } | |
| p.DataTypeList = append(p.DataTypeList, _elem13) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.QueryDataSet = &TSQueryDataSet{} | |
| if err := p.QueryDataSet.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryDataSet), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.NonAlignQueryDataSet = &TSQueryNonAlignDataSet{} | |
| if err := p.NonAlignQueryDataSet.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonAlignQueryDataSet), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]int32, size) | |
| p.ColumnNameIndexMap = tMap | |
| for i := 0; i < size; i++ { | |
| var _key14 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key14 = v | |
| } | |
| var _val15 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val15 = v | |
| } | |
| p.ColumnNameIndexMap[_key14] = _val15 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.SgColumns = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem16 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem16 = v | |
| } | |
| p.SgColumns = append(p.SgColumns, _elem16) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int8, 0, size) | |
| p.AliasColumns = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem17 int8 | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| temp := int8(v) | |
| _elem17 = temp | |
| } | |
| p.AliasColumns = append(p.AliasColumns, _elem17) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.TracingInfo = &TSTracingInfo{} | |
| if err := p.TracingInfo.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TracingInfo), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.QueryResult_ = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem18 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem18 = v | |
| } | |
| p.QueryResult_ = append(p.QueryResult_, _elem18) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 14: ", err) | |
| } else { | |
| p.MoreData = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField15(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 15: ", err) | |
| } else { | |
| p.Database = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField16(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 16: ", err) | |
| } else { | |
| p.TableModel = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.ColumnIndex2TsBlockColumnIndexList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem19 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem19 = v | |
| } | |
| p.ColumnIndex2TsBlockColumnIndexList = append(p.ColumnIndex2TsBlockColumnIndexList, _elem19) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSExecuteStatementResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| if err := p.writeField11(ctx, oprot); err != nil { return err } | |
| if err := p.writeField12(ctx, oprot); err != nil { return err } | |
| if err := p.writeField13(ctx, oprot); err != nil { return err } | |
| if err := p.writeField14(ctx, oprot); err != nil { return err } | |
| if err := p.writeField15(ctx, oprot); err != nil { return err } | |
| if err := p.writeField16(ctx, oprot); err != nil { return err } | |
| if err := p.writeField17(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryId() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.QueryId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumns() { | |
| if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columns: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Columns)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Columns { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columns: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetOperationType() { | |
| if err := oprot.WriteFieldBegin(ctx, "operationType", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:operationType: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.OperationType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.operationType (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:operationType: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIgnoreTimeStamp() { | |
| if err := oprot.WriteFieldBegin(ctx, "ignoreTimeStamp", thrift.BOOL, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:ignoreTimeStamp: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IgnoreTimeStamp)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.ignoreTimeStamp (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:ignoreTimeStamp: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetDataTypeList() { | |
| if err := oprot.WriteFieldBegin(ctx, "dataTypeList", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:dataTypeList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DataTypeList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.DataTypeList { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:dataTypeList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryDataSet() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryDataSet", thrift.STRUCT, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:queryDataSet: ", p), err) | |
| } | |
| if err := p.QueryDataSet.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryDataSet), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:queryDataSet: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetNonAlignQueryDataSet() { | |
| if err := oprot.WriteFieldBegin(ctx, "nonAlignQueryDataSet", thrift.STRUCT, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:nonAlignQueryDataSet: ", p), err) | |
| } | |
| if err := p.NonAlignQueryDataSet.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonAlignQueryDataSet), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:nonAlignQueryDataSet: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnNameIndexMap() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnNameIndexMap", thrift.MAP, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:columnNameIndexMap: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.I32, len(p.ColumnNameIndexMap)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.ColumnNameIndexMap { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:columnNameIndexMap: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSgColumns() { | |
| if err := oprot.WriteFieldBegin(ctx, "sgColumns", thrift.LIST, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:sgColumns: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SgColumns)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.SgColumns { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:sgColumns: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetAliasColumns() { | |
| if err := oprot.WriteFieldBegin(ctx, "aliasColumns", thrift.LIST, 11); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:aliasColumns: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.AliasColumns)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.AliasColumns { | |
| if err := oprot.WriteByte(ctx, int8(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 11:aliasColumns: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTracingInfo() { | |
| if err := oprot.WriteFieldBegin(ctx, "tracingInfo", thrift.STRUCT, 12); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:tracingInfo: ", p), err) | |
| } | |
| if err := p.TracingInfo.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TracingInfo), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 12:tracingInfo: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryResult_() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryResult", thrift.LIST, 13); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:queryResult: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.QueryResult_)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.QueryResult_ { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 13:queryResult: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMoreData() { | |
| if err := oprot.WriteFieldBegin(ctx, "moreData", thrift.BOOL, 14); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:moreData: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.MoreData)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.moreData (14) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 14:moreData: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField15(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetDatabase() { | |
| if err := oprot.WriteFieldBegin(ctx, "database", thrift.STRING, 15); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:database: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.Database)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.database (15) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 15:database: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField16(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTableModel() { | |
| if err := oprot.WriteFieldBegin(ctx, "tableModel", thrift.BOOL, 16); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 16:tableModel: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.TableModel)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.tableModel (16) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 16:tableModel: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnIndex2TsBlockColumnIndexList() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnIndex2TsBlockColumnIndexList", thrift.LIST, 17); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 17:columnIndex2TsBlockColumnIndexList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.ColumnIndex2TsBlockColumnIndexList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ColumnIndex2TsBlockColumnIndexList { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 17:columnIndex2TsBlockColumnIndexList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementResp) Equals(other *TSExecuteStatementResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.QueryId != other.QueryId { | |
| if p.QueryId == nil || other.QueryId == nil { | |
| return false | |
| } | |
| if (*p.QueryId) != (*other.QueryId) { return false } | |
| } | |
| if len(p.Columns) != len(other.Columns) { return false } | |
| for i, _tgt := range p.Columns { | |
| _src20 := other.Columns[i] | |
| if _tgt != _src20 { return false } | |
| } | |
| if p.OperationType != other.OperationType { | |
| if p.OperationType == nil || other.OperationType == nil { | |
| return false | |
| } | |
| if (*p.OperationType) != (*other.OperationType) { return false } | |
| } | |
| if p.IgnoreTimeStamp != other.IgnoreTimeStamp { | |
| if p.IgnoreTimeStamp == nil || other.IgnoreTimeStamp == nil { | |
| return false | |
| } | |
| if (*p.IgnoreTimeStamp) != (*other.IgnoreTimeStamp) { return false } | |
| } | |
| if len(p.DataTypeList) != len(other.DataTypeList) { return false } | |
| for i, _tgt := range p.DataTypeList { | |
| _src21 := other.DataTypeList[i] | |
| if _tgt != _src21 { return false } | |
| } | |
| if !p.QueryDataSet.Equals(other.QueryDataSet) { return false } | |
| if !p.NonAlignQueryDataSet.Equals(other.NonAlignQueryDataSet) { return false } | |
| if len(p.ColumnNameIndexMap) != len(other.ColumnNameIndexMap) { return false } | |
| for k, _tgt := range p.ColumnNameIndexMap { | |
| _src22 := other.ColumnNameIndexMap[k] | |
| if _tgt != _src22 { return false } | |
| } | |
| if len(p.SgColumns) != len(other.SgColumns) { return false } | |
| for i, _tgt := range p.SgColumns { | |
| _src23 := other.SgColumns[i] | |
| if _tgt != _src23 { return false } | |
| } | |
| if len(p.AliasColumns) != len(other.AliasColumns) { return false } | |
| for i, _tgt := range p.AliasColumns { | |
| _src24 := other.AliasColumns[i] | |
| if _tgt != _src24 { return false } | |
| } | |
| if !p.TracingInfo.Equals(other.TracingInfo) { return false } | |
| if len(p.QueryResult_) != len(other.QueryResult_) { return false } | |
| for i, _tgt := range p.QueryResult_ { | |
| _src25 := other.QueryResult_[i] | |
| if bytes.Compare(_tgt, _src25) != 0 { return false } | |
| } | |
| if p.MoreData != other.MoreData { | |
| if p.MoreData == nil || other.MoreData == nil { | |
| return false | |
| } | |
| if (*p.MoreData) != (*other.MoreData) { return false } | |
| } | |
| if p.Database != other.Database { | |
| if p.Database == nil || other.Database == nil { | |
| return false | |
| } | |
| if (*p.Database) != (*other.Database) { return false } | |
| } | |
| if p.TableModel != other.TableModel { | |
| if p.TableModel == nil || other.TableModel == nil { | |
| return false | |
| } | |
| if (*p.TableModel) != (*other.TableModel) { return false } | |
| } | |
| if len(p.ColumnIndex2TsBlockColumnIndexList) != len(other.ColumnIndex2TsBlockColumnIndexList) { return false } | |
| for i, _tgt := range p.ColumnIndex2TsBlockColumnIndexList { | |
| _src26 := other.ColumnIndex2TsBlockColumnIndexList[i] | |
| if _tgt != _src26 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSExecuteStatementResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSExecuteStatementResp(%+v)", *p) | |
| } | |
| func (p *TSExecuteStatementResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSExecuteStatementResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSExecuteStatementResp)(nil) | |
| func (p *TSExecuteStatementResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - ServerProtocolVersion | |
| // - SessionId | |
| // - Configuration | |
| // | |
| type TSOpenSessionResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| ServerProtocolVersion TSProtocolVersion `thrift:"serverProtocolVersion,2,required" db:"serverProtocolVersion" json:"serverProtocolVersion"` | |
| SessionId *int64 `thrift:"sessionId,3" db:"sessionId" json:"sessionId,omitempty"` | |
| Configuration map[string]string `thrift:"configuration,4" db:"configuration" json:"configuration,omitempty"` | |
| } | |
| func NewTSOpenSessionResp() *TSOpenSessionResp { | |
| return &TSOpenSessionResp{ | |
| ServerProtocolVersion: 0, | |
| } | |
| } | |
| var TSOpenSessionResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSOpenSessionResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSOpenSessionResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| func (p *TSOpenSessionResp) GetServerProtocolVersion() TSProtocolVersion { | |
| return p.ServerProtocolVersion | |
| } | |
| var TSOpenSessionResp_SessionId_DEFAULT int64 | |
| func (p *TSOpenSessionResp) GetSessionId() int64 { | |
| if !p.IsSetSessionId() { | |
| return TSOpenSessionResp_SessionId_DEFAULT | |
| } | |
| return *p.SessionId | |
| } | |
| var TSOpenSessionResp_Configuration_DEFAULT map[string]string | |
| func (p *TSOpenSessionResp) GetConfiguration() map[string]string { | |
| return p.Configuration | |
| } | |
| func (p *TSOpenSessionResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSOpenSessionResp) IsSetSessionId() bool { | |
| return p.SessionId != nil | |
| } | |
| func (p *TSOpenSessionResp) IsSetConfiguration() bool { | |
| return p.Configuration != nil | |
| } | |
| func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| var issetServerProtocolVersion bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetServerProtocolVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| if !issetServerProtocolVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerProtocolVersion is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| temp := TSProtocolVersion(v) | |
| p.ServerProtocolVersion = temp | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.SessionId = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| p.Configuration = tMap | |
| for i := 0; i < size; i++ { | |
| var _key27 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key27 = v | |
| } | |
| var _val28 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val28 = v | |
| } | |
| p.Configuration[_key27] = _val28 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSOpenSessionResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "serverProtocolVersion", thrift.I32, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:serverProtocolVersion: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.ServerProtocolVersion)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.serverProtocolVersion (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:serverProtocolVersion: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSessionId() { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:sessionId: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetConfiguration() { | |
| if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:configuration: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.Configuration { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:configuration: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionResp) Equals(other *TSOpenSessionResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.ServerProtocolVersion != other.ServerProtocolVersion { return false } | |
| if p.SessionId != other.SessionId { | |
| if p.SessionId == nil || other.SessionId == nil { | |
| return false | |
| } | |
| if (*p.SessionId) != (*other.SessionId) { return false } | |
| } | |
| if len(p.Configuration) != len(other.Configuration) { return false } | |
| for k, _tgt := range p.Configuration { | |
| _src29 := other.Configuration[k] | |
| if _tgt != _src29 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSOpenSessionResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSOpenSessionResp(%+v)", *p) | |
| } | |
| func (p *TSOpenSessionResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSOpenSessionResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSOpenSessionResp)(nil) | |
| func (p *TSOpenSessionResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - ClientProtocol | |
| // - ZoneId | |
| // - Username | |
| // - Password | |
| // - Configuration | |
| // | |
| type TSOpenSessionReq struct { | |
| ClientProtocol TSProtocolVersion `thrift:"client_protocol,1,required" db:"client_protocol" json:"client_protocol"` | |
| ZoneId string `thrift:"zoneId,2,required" db:"zoneId" json:"zoneId"` | |
| Username string `thrift:"username,3,required" db:"username" json:"username"` | |
| Password *string `thrift:"password,4" db:"password" json:"password,omitempty"` | |
| Configuration map[string]string `thrift:"configuration,5" db:"configuration" json:"configuration,omitempty"` | |
| } | |
| func NewTSOpenSessionReq() *TSOpenSessionReq { | |
| return &TSOpenSessionReq{ | |
| ClientProtocol: 2, | |
| } | |
| } | |
| func (p *TSOpenSessionReq) GetClientProtocol() TSProtocolVersion { | |
| return p.ClientProtocol | |
| } | |
| func (p *TSOpenSessionReq) GetZoneId() string { | |
| return p.ZoneId | |
| } | |
| func (p *TSOpenSessionReq) GetUsername() string { | |
| return p.Username | |
| } | |
| var TSOpenSessionReq_Password_DEFAULT string | |
| func (p *TSOpenSessionReq) GetPassword() string { | |
| if !p.IsSetPassword() { | |
| return TSOpenSessionReq_Password_DEFAULT | |
| } | |
| return *p.Password | |
| } | |
| var TSOpenSessionReq_Configuration_DEFAULT map[string]string | |
| func (p *TSOpenSessionReq) GetConfiguration() map[string]string { | |
| return p.Configuration | |
| } | |
| func (p *TSOpenSessionReq) IsSetPassword() bool { | |
| return p.Password != nil | |
| } | |
| func (p *TSOpenSessionReq) IsSetConfiguration() bool { | |
| return p.Configuration != nil | |
| } | |
| func (p *TSOpenSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetClientProtocol bool = false; | |
| var issetZoneId bool = false; | |
| var issetUsername bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetClientProtocol = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetZoneId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetUsername = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetClientProtocol{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ClientProtocol is not set")) | |
| } | |
| if !issetZoneId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ZoneId is not set")) | |
| } | |
| if !issetUsername{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Username is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| temp := TSProtocolVersion(v) | |
| p.ClientProtocol = temp | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.ZoneId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Username = v | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Password = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| p.Configuration = tMap | |
| for i := 0; i < size; i++ { | |
| var _key30 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key30 = v | |
| } | |
| var _val31 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val31 = v | |
| } | |
| p.Configuration[_key30] = _val31 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSOpenSessionReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSOpenSessionReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "client_protocol", thrift.I32, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:client_protocol: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.ClientProtocol)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.client_protocol (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:client_protocol: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "zoneId", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:zoneId: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.ZoneId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.zoneId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:zoneId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:username: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Username)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.username (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:username: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetPassword() { | |
| if err := oprot.WriteFieldBegin(ctx, "password", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:password: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.Password)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.password (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:password: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetConfiguration() { | |
| if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:configuration: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.Configuration { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:configuration: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSOpenSessionReq) Equals(other *TSOpenSessionReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.ClientProtocol != other.ClientProtocol { return false } | |
| if p.ZoneId != other.ZoneId { return false } | |
| if p.Username != other.Username { return false } | |
| if p.Password != other.Password { | |
| if p.Password == nil || other.Password == nil { | |
| return false | |
| } | |
| if (*p.Password) != (*other.Password) { return false } | |
| } | |
| if len(p.Configuration) != len(other.Configuration) { return false } | |
| for k, _tgt := range p.Configuration { | |
| _src32 := other.Configuration[k] | |
| if _tgt != _src32 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSOpenSessionReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSOpenSessionReq(%+v)", *p) | |
| } | |
| func (p *TSOpenSessionReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSOpenSessionReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSOpenSessionReq)(nil) | |
| func (p *TSOpenSessionReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // | |
| type TSCloseSessionReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| } | |
| func NewTSCloseSessionReq() *TSCloseSessionReq { | |
| return &TSCloseSessionReq{} | |
| } | |
| func (p *TSCloseSessionReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCloseSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseSessionReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseSessionReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCloseSessionReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseSessionReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCloseSessionReq) Equals(other *TSCloseSessionReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| return true | |
| } | |
| func (p *TSCloseSessionReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCloseSessionReq(%+v)", *p) | |
| } | |
| func (p *TSCloseSessionReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCloseSessionReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCloseSessionReq)(nil) | |
| func (p *TSCloseSessionReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Statement | |
| // - StatementId | |
| // - FetchSize | |
| // - Timeout | |
| // - EnableRedirectQuery | |
| // - JdbcQuery | |
| // | |
| type TSExecuteStatementReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Statement string `thrift:"statement,2,required" db:"statement" json:"statement"` | |
| StatementId int64 `thrift:"statementId,3,required" db:"statementId" json:"statementId"` | |
| FetchSize *int32 `thrift:"fetchSize,4" db:"fetchSize" json:"fetchSize,omitempty"` | |
| Timeout *int64 `thrift:"timeout,5" db:"timeout" json:"timeout,omitempty"` | |
| EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` | |
| JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"` | |
| } | |
| func NewTSExecuteStatementReq() *TSExecuteStatementReq { | |
| return &TSExecuteStatementReq{} | |
| } | |
| func (p *TSExecuteStatementReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSExecuteStatementReq) GetStatement() string { | |
| return p.Statement | |
| } | |
| func (p *TSExecuteStatementReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| var TSExecuteStatementReq_FetchSize_DEFAULT int32 | |
| func (p *TSExecuteStatementReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSExecuteStatementReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| var TSExecuteStatementReq_Timeout_DEFAULT int64 | |
| func (p *TSExecuteStatementReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSExecuteStatementReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSExecuteStatementReq_EnableRedirectQuery_DEFAULT bool | |
| func (p *TSExecuteStatementReq) GetEnableRedirectQuery() bool { | |
| if !p.IsSetEnableRedirectQuery() { | |
| return TSExecuteStatementReq_EnableRedirectQuery_DEFAULT | |
| } | |
| return *p.EnableRedirectQuery | |
| } | |
| var TSExecuteStatementReq_JdbcQuery_DEFAULT bool | |
| func (p *TSExecuteStatementReq) GetJdbcQuery() bool { | |
| if !p.IsSetJdbcQuery() { | |
| return TSExecuteStatementReq_JdbcQuery_DEFAULT | |
| } | |
| return *p.JdbcQuery | |
| } | |
| func (p *TSExecuteStatementReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSExecuteStatementReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSExecuteStatementReq) IsSetEnableRedirectQuery() bool { | |
| return p.EnableRedirectQuery != nil | |
| } | |
| func (p *TSExecuteStatementReq) IsSetJdbcQuery() bool { | |
| return p.JdbcQuery != nil | |
| } | |
| func (p *TSExecuteStatementReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatement bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatement = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatement{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Statement is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Statement = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.EnableRedirectQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.JdbcQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSExecuteStatementReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteStatementReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statement", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statement: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Statement)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statement (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statement: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableRedirectQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetJdbcQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteStatementReq) Equals(other *TSExecuteStatementReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Statement != other.Statement { return false } | |
| if p.StatementId != other.StatementId { return false } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.EnableRedirectQuery != other.EnableRedirectQuery { | |
| if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { | |
| return false | |
| } | |
| if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } | |
| } | |
| if p.JdbcQuery != other.JdbcQuery { | |
| if p.JdbcQuery == nil || other.JdbcQuery == nil { | |
| return false | |
| } | |
| if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSExecuteStatementReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSExecuteStatementReq(%+v)", *p) | |
| } | |
| func (p *TSExecuteStatementReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSExecuteStatementReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSExecuteStatementReq)(nil) | |
| func (p *TSExecuteStatementReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Statements | |
| // | |
| type TSExecuteBatchStatementReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Statements []string `thrift:"statements,2,required" db:"statements" json:"statements"` | |
| } | |
| func NewTSExecuteBatchStatementReq() *TSExecuteBatchStatementReq { | |
| return &TSExecuteBatchStatementReq{} | |
| } | |
| func (p *TSExecuteBatchStatementReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSExecuteBatchStatementReq) GetStatements() []string { | |
| return p.Statements | |
| } | |
| func (p *TSExecuteBatchStatementReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatements bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Statements is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteBatchStatementReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteBatchStatementReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Statements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem33 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem33 = v | |
| } | |
| p.Statements = append(p.Statements, _elem33) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteBatchStatementReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSExecuteBatchStatementReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecuteBatchStatementReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteBatchStatementReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statements", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Statements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Statements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecuteBatchStatementReq) Equals(other *TSExecuteBatchStatementReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Statements) != len(other.Statements) { return false } | |
| for i, _tgt := range p.Statements { | |
| _src34 := other.Statements[i] | |
| if _tgt != _src34 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSExecuteBatchStatementReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSExecuteBatchStatementReq(%+v)", *p) | |
| } | |
| func (p *TSExecuteBatchStatementReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSExecuteBatchStatementReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSExecuteBatchStatementReq)(nil) | |
| func (p *TSExecuteBatchStatementReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - QueryId | |
| // | |
| type TSGetOperationStatusReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| QueryId int64 `thrift:"queryId,2,required" db:"queryId" json:"queryId"` | |
| } | |
| func NewTSGetOperationStatusReq() *TSGetOperationStatusReq { | |
| return &TSGetOperationStatusReq{} | |
| } | |
| func (p *TSGetOperationStatusReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSGetOperationStatusReq) GetQueryId() int64 { | |
| return p.QueryId | |
| } | |
| func (p *TSGetOperationStatusReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetQueryId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetQueryId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetQueryId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSGetOperationStatusReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSGetOperationStatusReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.QueryId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSGetOperationStatusReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSGetOperationStatusReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSGetOperationStatusReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSGetOperationStatusReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.QueryId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSGetOperationStatusReq) Equals(other *TSGetOperationStatusReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.QueryId != other.QueryId { return false } | |
| return true | |
| } | |
| func (p *TSGetOperationStatusReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSGetOperationStatusReq(%+v)", *p) | |
| } | |
| func (p *TSGetOperationStatusReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSGetOperationStatusReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSGetOperationStatusReq)(nil) | |
| func (p *TSGetOperationStatusReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - QueryId | |
| // | |
| type TSCancelOperationReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| QueryId int64 `thrift:"queryId,2,required" db:"queryId" json:"queryId"` | |
| } | |
| func NewTSCancelOperationReq() *TSCancelOperationReq { | |
| return &TSCancelOperationReq{} | |
| } | |
| func (p *TSCancelOperationReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCancelOperationReq) GetQueryId() int64 { | |
| return p.QueryId | |
| } | |
| func (p *TSCancelOperationReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetQueryId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetQueryId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetQueryId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCancelOperationReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCancelOperationReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.QueryId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCancelOperationReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCancelOperationReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCancelOperationReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCancelOperationReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.QueryId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCancelOperationReq) Equals(other *TSCancelOperationReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.QueryId != other.QueryId { return false } | |
| return true | |
| } | |
| func (p *TSCancelOperationReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCancelOperationReq(%+v)", *p) | |
| } | |
| func (p *TSCancelOperationReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCancelOperationReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCancelOperationReq)(nil) | |
| func (p *TSCancelOperationReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - QueryId | |
| // - StatementId | |
| // - PreparedStatementName | |
| // | |
| type TSCloseOperationReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| QueryId *int64 `thrift:"queryId,2" db:"queryId" json:"queryId,omitempty"` | |
| StatementId *int64 `thrift:"statementId,3" db:"statementId" json:"statementId,omitempty"` | |
| PreparedStatementName *string `thrift:"preparedStatementName,4" db:"preparedStatementName" json:"preparedStatementName,omitempty"` | |
| } | |
| func NewTSCloseOperationReq() *TSCloseOperationReq { | |
| return &TSCloseOperationReq{} | |
| } | |
| func (p *TSCloseOperationReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| var TSCloseOperationReq_QueryId_DEFAULT int64 | |
| func (p *TSCloseOperationReq) GetQueryId() int64 { | |
| if !p.IsSetQueryId() { | |
| return TSCloseOperationReq_QueryId_DEFAULT | |
| } | |
| return *p.QueryId | |
| } | |
| var TSCloseOperationReq_StatementId_DEFAULT int64 | |
| func (p *TSCloseOperationReq) GetStatementId() int64 { | |
| if !p.IsSetStatementId() { | |
| return TSCloseOperationReq_StatementId_DEFAULT | |
| } | |
| return *p.StatementId | |
| } | |
| var TSCloseOperationReq_PreparedStatementName_DEFAULT string | |
| func (p *TSCloseOperationReq) GetPreparedStatementName() string { | |
| if !p.IsSetPreparedStatementName() { | |
| return TSCloseOperationReq_PreparedStatementName_DEFAULT | |
| } | |
| return *p.PreparedStatementName | |
| } | |
| func (p *TSCloseOperationReq) IsSetQueryId() bool { | |
| return p.QueryId != nil | |
| } | |
| func (p *TSCloseOperationReq) IsSetStatementId() bool { | |
| return p.StatementId != nil | |
| } | |
| func (p *TSCloseOperationReq) IsSetPreparedStatementName() bool { | |
| return p.PreparedStatementName != nil | |
| } | |
| func (p *TSCloseOperationReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.QueryId = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.StatementId = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.PreparedStatementName = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCloseOperationReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCloseOperationReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCloseOperationReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryId() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.QueryId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCloseOperationReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetStatementId() { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:statementId: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCloseOperationReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetPreparedStatementName() { | |
| if err := oprot.WriteFieldBegin(ctx, "preparedStatementName", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:preparedStatementName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.PreparedStatementName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.preparedStatementName (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:preparedStatementName: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCloseOperationReq) Equals(other *TSCloseOperationReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.QueryId != other.QueryId { | |
| if p.QueryId == nil || other.QueryId == nil { | |
| return false | |
| } | |
| if (*p.QueryId) != (*other.QueryId) { return false } | |
| } | |
| if p.StatementId != other.StatementId { | |
| if p.StatementId == nil || other.StatementId == nil { | |
| return false | |
| } | |
| if (*p.StatementId) != (*other.StatementId) { return false } | |
| } | |
| if p.PreparedStatementName != other.PreparedStatementName { | |
| if p.PreparedStatementName == nil || other.PreparedStatementName == nil { | |
| return false | |
| } | |
| if (*p.PreparedStatementName) != (*other.PreparedStatementName) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSCloseOperationReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCloseOperationReq(%+v)", *p) | |
| } | |
| func (p *TSCloseOperationReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCloseOperationReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCloseOperationReq)(nil) | |
| func (p *TSCloseOperationReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Sql | |
| // - StatementName | |
| // | |
| type TSPrepareReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Sql string `thrift:"sql,2,required" db:"sql" json:"sql"` | |
| StatementName string `thrift:"statementName,3,required" db:"statementName" json:"statementName"` | |
| } | |
| func NewTSPrepareReq() *TSPrepareReq { | |
| return &TSPrepareReq{} | |
| } | |
| func (p *TSPrepareReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSPrepareReq) GetSql() string { | |
| return p.Sql | |
| } | |
| func (p *TSPrepareReq) GetStatementName() string { | |
| return p.StatementName | |
| } | |
| func (p *TSPrepareReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetSql bool = false; | |
| var issetStatementName bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSql = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetSql{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Sql is not set")) | |
| } | |
| if !issetStatementName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementName is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Sql = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.StatementName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSPrepareReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPrepareReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sql", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:sql: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Sql)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sql (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:sql: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPrepareReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementName", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:statementName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.StatementName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementName (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:statementName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPrepareReq) Equals(other *TSPrepareReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Sql != other.Sql { return false } | |
| if p.StatementName != other.StatementName { return false } | |
| return true | |
| } | |
| func (p *TSPrepareReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSPrepareReq(%+v)", *p) | |
| } | |
| func (p *TSPrepareReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSPrepareReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSPrepareReq)(nil) | |
| func (p *TSPrepareReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - ParameterCount | |
| // | |
| type TSPrepareResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| ParameterCount *int32 `thrift:"parameterCount,2" db:"parameterCount" json:"parameterCount,omitempty"` | |
| } | |
| func NewTSPrepareResp() *TSPrepareResp { | |
| return &TSPrepareResp{} | |
| } | |
| var TSPrepareResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSPrepareResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSPrepareResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| var TSPrepareResp_ParameterCount_DEFAULT int32 | |
| func (p *TSPrepareResp) GetParameterCount() int32 { | |
| if !p.IsSetParameterCount() { | |
| return TSPrepareResp_ParameterCount_DEFAULT | |
| } | |
| return *p.ParameterCount | |
| } | |
| func (p *TSPrepareResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSPrepareResp) IsSetParameterCount() bool { | |
| return p.ParameterCount != nil | |
| } | |
| func (p *TSPrepareResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.ParameterCount = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSPrepareResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSPrepareResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPrepareResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetParameterCount() { | |
| if err := oprot.WriteFieldBegin(ctx, "parameterCount", thrift.I32, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:parameterCount: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.ParameterCount)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.parameterCount (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:parameterCount: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSPrepareResp) Equals(other *TSPrepareResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.ParameterCount != other.ParameterCount { | |
| if p.ParameterCount == nil || other.ParameterCount == nil { | |
| return false | |
| } | |
| if (*p.ParameterCount) != (*other.ParameterCount) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSPrepareResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSPrepareResp(%+v)", *p) | |
| } | |
| func (p *TSPrepareResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSPrepareResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSPrepareResp)(nil) | |
| func (p *TSPrepareResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - StatementName | |
| // - Parameters | |
| // - FetchSize | |
| // - Timeout | |
| // - StatementId | |
| // | |
| type TSExecutePreparedReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| StatementName string `thrift:"statementName,2,required" db:"statementName" json:"statementName"` | |
| Parameters []byte `thrift:"parameters,3,required" db:"parameters" json:"parameters"` | |
| FetchSize *int32 `thrift:"fetchSize,4" db:"fetchSize" json:"fetchSize,omitempty"` | |
| Timeout *int64 `thrift:"timeout,5" db:"timeout" json:"timeout,omitempty"` | |
| StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"` | |
| } | |
| func NewTSExecutePreparedReq() *TSExecutePreparedReq { | |
| return &TSExecutePreparedReq{} | |
| } | |
| func (p *TSExecutePreparedReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSExecutePreparedReq) GetStatementName() string { | |
| return p.StatementName | |
| } | |
| func (p *TSExecutePreparedReq) GetParameters() []byte { | |
| return p.Parameters | |
| } | |
| var TSExecutePreparedReq_FetchSize_DEFAULT int32 | |
| func (p *TSExecutePreparedReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSExecutePreparedReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| var TSExecutePreparedReq_Timeout_DEFAULT int64 | |
| func (p *TSExecutePreparedReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSExecutePreparedReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| func (p *TSExecutePreparedReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| func (p *TSExecutePreparedReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSExecutePreparedReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSExecutePreparedReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatementName bool = false; | |
| var issetParameters bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetParameters = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatementName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementName is not set")) | |
| } | |
| if !issetParameters{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Parameters is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.StatementName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Parameters = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSExecutePreparedReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSExecutePreparedReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementName", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.StatementName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementName (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statementName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "parameters", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:parameters: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Parameters); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.parameters (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:parameters: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSExecutePreparedReq) Equals(other *TSExecutePreparedReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.StatementName != other.StatementName { return false } | |
| if bytes.Compare(p.Parameters, other.Parameters) != 0 { return false } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.StatementId != other.StatementId { return false } | |
| return true | |
| } | |
| func (p *TSExecutePreparedReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSExecutePreparedReq(%+v)", *p) | |
| } | |
| func (p *TSExecutePreparedReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSExecutePreparedReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSExecutePreparedReq)(nil) | |
| func (p *TSExecutePreparedReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - StatementName | |
| // | |
| type TSDeallocatePreparedReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| StatementName string `thrift:"statementName,2,required" db:"statementName" json:"statementName"` | |
| } | |
| func NewTSDeallocatePreparedReq() *TSDeallocatePreparedReq { | |
| return &TSDeallocatePreparedReq{} | |
| } | |
| func (p *TSDeallocatePreparedReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSDeallocatePreparedReq) GetStatementName() string { | |
| return p.StatementName | |
| } | |
| func (p *TSDeallocatePreparedReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatementName bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatementName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementName is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSDeallocatePreparedReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDeallocatePreparedReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.StatementName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDeallocatePreparedReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSDeallocatePreparedReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSDeallocatePreparedReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeallocatePreparedReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementName", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.StatementName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementName (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statementName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeallocatePreparedReq) Equals(other *TSDeallocatePreparedReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.StatementName != other.StatementName { return false } | |
| return true | |
| } | |
| func (p *TSDeallocatePreparedReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSDeallocatePreparedReq(%+v)", *p) | |
| } | |
| func (p *TSDeallocatePreparedReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSDeallocatePreparedReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSDeallocatePreparedReq)(nil) | |
| func (p *TSDeallocatePreparedReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Statement | |
| // - FetchSize | |
| // - QueryId | |
| // - IsAlign | |
| // - Timeout | |
| // - StatementId | |
| // | |
| type TSFetchResultsReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Statement string `thrift:"statement,2,required" db:"statement" json:"statement"` | |
| FetchSize int32 `thrift:"fetchSize,3,required" db:"fetchSize" json:"fetchSize"` | |
| QueryId int64 `thrift:"queryId,4,required" db:"queryId" json:"queryId"` | |
| IsAlign bool `thrift:"isAlign,5,required" db:"isAlign" json:"isAlign"` | |
| Timeout *int64 `thrift:"timeout,6" db:"timeout" json:"timeout,omitempty"` | |
| StatementId *int64 `thrift:"statementId,7" db:"statementId" json:"statementId,omitempty"` | |
| } | |
| func NewTSFetchResultsReq() *TSFetchResultsReq { | |
| return &TSFetchResultsReq{} | |
| } | |
| func (p *TSFetchResultsReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSFetchResultsReq) GetStatement() string { | |
| return p.Statement | |
| } | |
| func (p *TSFetchResultsReq) GetFetchSize() int32 { | |
| return p.FetchSize | |
| } | |
| func (p *TSFetchResultsReq) GetQueryId() int64 { | |
| return p.QueryId | |
| } | |
| func (p *TSFetchResultsReq) GetIsAlign() bool { | |
| return p.IsAlign | |
| } | |
| var TSFetchResultsReq_Timeout_DEFAULT int64 | |
| func (p *TSFetchResultsReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSFetchResultsReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSFetchResultsReq_StatementId_DEFAULT int64 | |
| func (p *TSFetchResultsReq) GetStatementId() int64 { | |
| if !p.IsSetStatementId() { | |
| return TSFetchResultsReq_StatementId_DEFAULT | |
| } | |
| return *p.StatementId | |
| } | |
| func (p *TSFetchResultsReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSFetchResultsReq) IsSetStatementId() bool { | |
| return p.StatementId != nil | |
| } | |
| func (p *TSFetchResultsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatement bool = false; | |
| var issetFetchSize bool = false; | |
| var issetQueryId bool = false; | |
| var issetIsAlign bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatement = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetFetchSize = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetQueryId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetIsAlign = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatement{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Statement is not set")) | |
| } | |
| if !issetFetchSize{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FetchSize is not set")) | |
| } | |
| if !issetQueryId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryId is not set")) | |
| } | |
| if !issetIsAlign{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAlign is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Statement = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.FetchSize = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.QueryId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.IsAlign = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.StatementId = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFetchResultsReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statement", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statement: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Statement)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statement (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statement: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:queryId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.QueryId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryId (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:queryId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "isAlign", thrift.BOOL, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:isAlign: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(p.IsAlign)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAlign (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:isAlign: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetStatementId() { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:statementId: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsReq) Equals(other *TSFetchResultsReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Statement != other.Statement { return false } | |
| if p.FetchSize != other.FetchSize { return false } | |
| if p.QueryId != other.QueryId { return false } | |
| if p.IsAlign != other.IsAlign { return false } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.StatementId != other.StatementId { | |
| if p.StatementId == nil || other.StatementId == nil { | |
| return false | |
| } | |
| if (*p.StatementId) != (*other.StatementId) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFetchResultsReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFetchResultsReq(%+v)", *p) | |
| } | |
| func (p *TSFetchResultsReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFetchResultsReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFetchResultsReq)(nil) | |
| func (p *TSFetchResultsReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - HasResultSet | |
| // - IsAlign | |
| // - QueryDataSet | |
| // - NonAlignQueryDataSet | |
| // - QueryResult_ | |
| // - MoreData | |
| // | |
| type TSFetchResultsResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| HasResultSet bool `thrift:"hasResultSet,2,required" db:"hasResultSet" json:"hasResultSet"` | |
| IsAlign bool `thrift:"isAlign,3,required" db:"isAlign" json:"isAlign"` | |
| QueryDataSet *TSQueryDataSet `thrift:"queryDataSet,4" db:"queryDataSet" json:"queryDataSet,omitempty"` | |
| NonAlignQueryDataSet *TSQueryNonAlignDataSet `thrift:"nonAlignQueryDataSet,5" db:"nonAlignQueryDataSet" json:"nonAlignQueryDataSet,omitempty"` | |
| QueryResult_ [][]byte `thrift:"queryResult,6" db:"queryResult" json:"queryResult,omitempty"` | |
| MoreData *bool `thrift:"moreData,7" db:"moreData" json:"moreData,omitempty"` | |
| } | |
| func NewTSFetchResultsResp() *TSFetchResultsResp { | |
| return &TSFetchResultsResp{} | |
| } | |
| var TSFetchResultsResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSFetchResultsResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSFetchResultsResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| func (p *TSFetchResultsResp) GetHasResultSet() bool { | |
| return p.HasResultSet | |
| } | |
| func (p *TSFetchResultsResp) GetIsAlign() bool { | |
| return p.IsAlign | |
| } | |
| var TSFetchResultsResp_QueryDataSet_DEFAULT *TSQueryDataSet | |
| func (p *TSFetchResultsResp) GetQueryDataSet() *TSQueryDataSet { | |
| if !p.IsSetQueryDataSet() { | |
| return TSFetchResultsResp_QueryDataSet_DEFAULT | |
| } | |
| return p.QueryDataSet | |
| } | |
| var TSFetchResultsResp_NonAlignQueryDataSet_DEFAULT *TSQueryNonAlignDataSet | |
| func (p *TSFetchResultsResp) GetNonAlignQueryDataSet() *TSQueryNonAlignDataSet { | |
| if !p.IsSetNonAlignQueryDataSet() { | |
| return TSFetchResultsResp_NonAlignQueryDataSet_DEFAULT | |
| } | |
| return p.NonAlignQueryDataSet | |
| } | |
| var TSFetchResultsResp_QueryResult__DEFAULT [][]byte | |
| func (p *TSFetchResultsResp) GetQueryResult_() [][]byte { | |
| return p.QueryResult_ | |
| } | |
| var TSFetchResultsResp_MoreData_DEFAULT bool | |
| func (p *TSFetchResultsResp) GetMoreData() bool { | |
| if !p.IsSetMoreData() { | |
| return TSFetchResultsResp_MoreData_DEFAULT | |
| } | |
| return *p.MoreData | |
| } | |
| func (p *TSFetchResultsResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSFetchResultsResp) IsSetQueryDataSet() bool { | |
| return p.QueryDataSet != nil | |
| } | |
| func (p *TSFetchResultsResp) IsSetNonAlignQueryDataSet() bool { | |
| return p.NonAlignQueryDataSet != nil | |
| } | |
| func (p *TSFetchResultsResp) IsSetQueryResult_() bool { | |
| return p.QueryResult_ != nil | |
| } | |
| func (p *TSFetchResultsResp) IsSetMoreData() bool { | |
| return p.MoreData != nil | |
| } | |
| func (p *TSFetchResultsResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| var issetHasResultSet bool = false; | |
| var issetIsAlign bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetHasResultSet = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetIsAlign = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| if !issetHasResultSet{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field HasResultSet is not set")) | |
| } | |
| if !issetIsAlign{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAlign is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.HasResultSet = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.IsAlign = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.QueryDataSet = &TSQueryDataSet{} | |
| if err := p.QueryDataSet.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryDataSet), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.NonAlignQueryDataSet = &TSQueryNonAlignDataSet{} | |
| if err := p.NonAlignQueryDataSet.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonAlignQueryDataSet), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.QueryResult_ = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem35 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem35 = v | |
| } | |
| p.QueryResult_ = append(p.QueryResult_, _elem35) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.MoreData = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFetchResultsResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchResultsResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "hasResultSet", thrift.BOOL, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hasResultSet: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(p.HasResultSet)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.hasResultSet (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hasResultSet: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "isAlign", thrift.BOOL, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAlign: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(p.IsAlign)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAlign (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAlign: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryDataSet() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryDataSet", thrift.STRUCT, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:queryDataSet: ", p), err) | |
| } | |
| if err := p.QueryDataSet.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryDataSet), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:queryDataSet: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetNonAlignQueryDataSet() { | |
| if err := oprot.WriteFieldBegin(ctx, "nonAlignQueryDataSet", thrift.STRUCT, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:nonAlignQueryDataSet: ", p), err) | |
| } | |
| if err := p.NonAlignQueryDataSet.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonAlignQueryDataSet), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:nonAlignQueryDataSet: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetQueryResult_() { | |
| if err := oprot.WriteFieldBegin(ctx, "queryResult", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:queryResult: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.QueryResult_)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.QueryResult_ { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:queryResult: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMoreData() { | |
| if err := oprot.WriteFieldBegin(ctx, "moreData", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:moreData: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.MoreData)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.moreData (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:moreData: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchResultsResp) Equals(other *TSFetchResultsResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.HasResultSet != other.HasResultSet { return false } | |
| if p.IsAlign != other.IsAlign { return false } | |
| if !p.QueryDataSet.Equals(other.QueryDataSet) { return false } | |
| if !p.NonAlignQueryDataSet.Equals(other.NonAlignQueryDataSet) { return false } | |
| if len(p.QueryResult_) != len(other.QueryResult_) { return false } | |
| for i, _tgt := range p.QueryResult_ { | |
| _src36 := other.QueryResult_[i] | |
| if bytes.Compare(_tgt, _src36) != 0 { return false } | |
| } | |
| if p.MoreData != other.MoreData { | |
| if p.MoreData == nil || other.MoreData == nil { | |
| return false | |
| } | |
| if (*p.MoreData) != (*other.MoreData) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFetchResultsResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFetchResultsResp(%+v)", *p) | |
| } | |
| func (p *TSFetchResultsResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFetchResultsResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFetchResultsResp)(nil) | |
| func (p *TSFetchResultsResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - MetadataInJson | |
| // - ColumnsList | |
| // - DataType | |
| // | |
| type TSFetchMetadataResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| MetadataInJson *string `thrift:"metadataInJson,2" db:"metadataInJson" json:"metadataInJson,omitempty"` | |
| ColumnsList []string `thrift:"columnsList,3" db:"columnsList" json:"columnsList,omitempty"` | |
| DataType *string `thrift:"dataType,4" db:"dataType" json:"dataType,omitempty"` | |
| } | |
| func NewTSFetchMetadataResp() *TSFetchMetadataResp { | |
| return &TSFetchMetadataResp{} | |
| } | |
| var TSFetchMetadataResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSFetchMetadataResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSFetchMetadataResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| var TSFetchMetadataResp_MetadataInJson_DEFAULT string | |
| func (p *TSFetchMetadataResp) GetMetadataInJson() string { | |
| if !p.IsSetMetadataInJson() { | |
| return TSFetchMetadataResp_MetadataInJson_DEFAULT | |
| } | |
| return *p.MetadataInJson | |
| } | |
| var TSFetchMetadataResp_ColumnsList_DEFAULT []string | |
| func (p *TSFetchMetadataResp) GetColumnsList() []string { | |
| return p.ColumnsList | |
| } | |
| var TSFetchMetadataResp_DataType_DEFAULT string | |
| func (p *TSFetchMetadataResp) GetDataType() string { | |
| if !p.IsSetDataType() { | |
| return TSFetchMetadataResp_DataType_DEFAULT | |
| } | |
| return *p.DataType | |
| } | |
| func (p *TSFetchMetadataResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSFetchMetadataResp) IsSetMetadataInJson() bool { | |
| return p.MetadataInJson != nil | |
| } | |
| func (p *TSFetchMetadataResp) IsSetColumnsList() bool { | |
| return p.ColumnsList != nil | |
| } | |
| func (p *TSFetchMetadataResp) IsSetDataType() bool { | |
| return p.DataType != nil | |
| } | |
| func (p *TSFetchMetadataResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.MetadataInJson = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.ColumnsList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem37 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem37 = v | |
| } | |
| p.ColumnsList = append(p.ColumnsList, _elem37) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.DataType = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFetchMetadataResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMetadataInJson() { | |
| if err := oprot.WriteFieldBegin(ctx, "metadataInJson", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:metadataInJson: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.MetadataInJson)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.metadataInJson (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:metadataInJson: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnsList() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columnsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ColumnsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ColumnsList { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columnsList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetDataType() { | |
| if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataType: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.DataType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.dataType (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataType: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataResp) Equals(other *TSFetchMetadataResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.MetadataInJson != other.MetadataInJson { | |
| if p.MetadataInJson == nil || other.MetadataInJson == nil { | |
| return false | |
| } | |
| if (*p.MetadataInJson) != (*other.MetadataInJson) { return false } | |
| } | |
| if len(p.ColumnsList) != len(other.ColumnsList) { return false } | |
| for i, _tgt := range p.ColumnsList { | |
| _src38 := other.ColumnsList[i] | |
| if _tgt != _src38 { return false } | |
| } | |
| if p.DataType != other.DataType { | |
| if p.DataType == nil || other.DataType == nil { | |
| return false | |
| } | |
| if (*p.DataType) != (*other.DataType) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFetchMetadataResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFetchMetadataResp(%+v)", *p) | |
| } | |
| func (p *TSFetchMetadataResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFetchMetadataResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFetchMetadataResp)(nil) | |
| func (p *TSFetchMetadataResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Type | |
| // - ColumnPath | |
| // | |
| type TSFetchMetadataReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Type string `thrift:"type,2,required" db:"type" json:"type"` | |
| ColumnPath *string `thrift:"columnPath,3" db:"columnPath" json:"columnPath,omitempty"` | |
| } | |
| func NewTSFetchMetadataReq() *TSFetchMetadataReq { | |
| return &TSFetchMetadataReq{} | |
| } | |
| func (p *TSFetchMetadataReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSFetchMetadataReq) GetType() string { | |
| return p.Type | |
| } | |
| var TSFetchMetadataReq_ColumnPath_DEFAULT string | |
| func (p *TSFetchMetadataReq) GetColumnPath() string { | |
| if !p.IsSetColumnPath() { | |
| return TSFetchMetadataReq_ColumnPath_DEFAULT | |
| } | |
| return *p.ColumnPath | |
| } | |
| func (p *TSFetchMetadataReq) IsSetColumnPath() bool { | |
| return p.ColumnPath != nil | |
| } | |
| func (p *TSFetchMetadataReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Type = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.ColumnPath = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFetchMetadataReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFetchMetadataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:type: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Type)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.type (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:type: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnPath() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnPath", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columnPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.ColumnPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.columnPath (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columnPath: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFetchMetadataReq) Equals(other *TSFetchMetadataReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Type != other.Type { return false } | |
| if p.ColumnPath != other.ColumnPath { | |
| if p.ColumnPath == nil || other.ColumnPath == nil { | |
| return false | |
| } | |
| if (*p.ColumnPath) != (*other.ColumnPath) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFetchMetadataReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFetchMetadataReq(%+v)", *p) | |
| } | |
| func (p *TSFetchMetadataReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFetchMetadataReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFetchMetadataReq)(nil) | |
| func (p *TSFetchMetadataReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - TimeZone | |
| // | |
| type TSGetTimeZoneResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| TimeZone string `thrift:"timeZone,2,required" db:"timeZone" json:"timeZone"` | |
| } | |
| func NewTSGetTimeZoneResp() *TSGetTimeZoneResp { | |
| return &TSGetTimeZoneResp{} | |
| } | |
| var TSGetTimeZoneResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSGetTimeZoneResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSGetTimeZoneResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| func (p *TSGetTimeZoneResp) GetTimeZone() string { | |
| return p.TimeZone | |
| } | |
| func (p *TSGetTimeZoneResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSGetTimeZoneResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| var issetTimeZone bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimeZone = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| if !issetTimeZone{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeZone is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSGetTimeZoneResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSGetTimeZoneResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.TimeZone = v | |
| } | |
| return nil | |
| } | |
| func (p *TSGetTimeZoneResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSGetTimeZoneResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSGetTimeZoneResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSGetTimeZoneResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timeZone", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timeZone: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TimeZone)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeZone (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timeZone: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSGetTimeZoneResp) Equals(other *TSGetTimeZoneResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.TimeZone != other.TimeZone { return false } | |
| return true | |
| } | |
| func (p *TSGetTimeZoneResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSGetTimeZoneResp(%+v)", *p) | |
| } | |
| func (p *TSGetTimeZoneResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSGetTimeZoneResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSGetTimeZoneResp)(nil) | |
| func (p *TSGetTimeZoneResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - TimeZone | |
| // | |
| type TSSetTimeZoneReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| TimeZone string `thrift:"timeZone,2,required" db:"timeZone" json:"timeZone"` | |
| } | |
| func NewTSSetTimeZoneReq() *TSSetTimeZoneReq { | |
| return &TSSetTimeZoneReq{} | |
| } | |
| func (p *TSSetTimeZoneReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSSetTimeZoneReq) GetTimeZone() string { | |
| return p.TimeZone | |
| } | |
| func (p *TSSetTimeZoneReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetTimeZone bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimeZone = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetTimeZone{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeZone is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSSetTimeZoneReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSSetTimeZoneReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.TimeZone = v | |
| } | |
| return nil | |
| } | |
| func (p *TSSetTimeZoneReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSSetTimeZoneReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSSetTimeZoneReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSSetTimeZoneReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timeZone", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timeZone: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TimeZone)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeZone (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timeZone: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSSetTimeZoneReq) Equals(other *TSSetTimeZoneReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.TimeZone != other.TimeZone { return false } | |
| return true | |
| } | |
| func (p *TSSetTimeZoneReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSSetTimeZoneReq(%+v)", *p) | |
| } | |
| func (p *TSSetTimeZoneReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSSetTimeZoneReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSSetTimeZoneReq)(nil) | |
| func (p *TSSetTimeZoneReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - Measurements | |
| // - Values | |
| // - Timestamp | |
| // - IsAligned | |
| // - IsWriteToTable | |
| // - ColumnCategoryies | |
| // | |
| type TSInsertRecordReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` | |
| Values []byte `thrift:"values,4,required" db:"values" json:"values"` | |
| Timestamp int64 `thrift:"timestamp,5,required" db:"timestamp" json:"timestamp"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| IsWriteToTable *bool `thrift:"isWriteToTable,7" db:"isWriteToTable" json:"isWriteToTable,omitempty"` | |
| ColumnCategoryies []int8 `thrift:"columnCategoryies,8" db:"columnCategoryies" json:"columnCategoryies,omitempty"` | |
| } | |
| func NewTSInsertRecordReq() *TSInsertRecordReq { | |
| return &TSInsertRecordReq{} | |
| } | |
| func (p *TSInsertRecordReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertRecordReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSInsertRecordReq) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSInsertRecordReq) GetValues() []byte { | |
| return p.Values | |
| } | |
| func (p *TSInsertRecordReq) GetTimestamp() int64 { | |
| return p.Timestamp | |
| } | |
| var TSInsertRecordReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertRecordReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertRecordReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| var TSInsertRecordReq_IsWriteToTable_DEFAULT bool | |
| func (p *TSInsertRecordReq) GetIsWriteToTable() bool { | |
| if !p.IsSetIsWriteToTable() { | |
| return TSInsertRecordReq_IsWriteToTable_DEFAULT | |
| } | |
| return *p.IsWriteToTable | |
| } | |
| var TSInsertRecordReq_ColumnCategoryies_DEFAULT []int8 | |
| func (p *TSInsertRecordReq) GetColumnCategoryies() []int8 { | |
| return p.ColumnCategoryies | |
| } | |
| func (p *TSInsertRecordReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertRecordReq) IsSetIsWriteToTable() bool { | |
| return p.IsWriteToTable != nil | |
| } | |
| func (p *TSInsertRecordReq) IsSetColumnCategoryies() bool { | |
| return p.ColumnCategoryies != nil | |
| } | |
| func (p *TSInsertRecordReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurements bool = false; | |
| var issetValues bool = false; | |
| var issetTimestamp bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValues = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamp = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")) | |
| } | |
| if !issetValues{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Values is not set")) | |
| } | |
| if !issetTimestamp{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamp is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem39 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem39 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem39) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Values = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Timestamp = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.IsWriteToTable = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int8, 0, size) | |
| p.ColumnCategoryies = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem40 int8 | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| temp := int8(v) | |
| _elem40 = temp | |
| } | |
| p.ColumnCategoryies = append(p.ColumnCategoryies, _elem40) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertRecordReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "values", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:values: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Values); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.values (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:values: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamp: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.Timestamp)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timestamp (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamp: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsWriteToTable() { | |
| if err := oprot.WriteFieldBegin(ctx, "isWriteToTable", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:isWriteToTable: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsWriteToTable)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isWriteToTable (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:isWriteToTable: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnCategoryies() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnCategoryies", thrift.LIST, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:columnCategoryies: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.ColumnCategoryies)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ColumnCategoryies { | |
| if err := oprot.WriteByte(ctx, int8(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:columnCategoryies: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordReq) Equals(other *TSInsertRecordReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src41 := other.Measurements[i] | |
| if _tgt != _src41 { return false } | |
| } | |
| if bytes.Compare(p.Values, other.Values) != 0 { return false } | |
| if p.Timestamp != other.Timestamp { return false } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| if p.IsWriteToTable != other.IsWriteToTable { | |
| if p.IsWriteToTable == nil || other.IsWriteToTable == nil { | |
| return false | |
| } | |
| if (*p.IsWriteToTable) != (*other.IsWriteToTable) { return false } | |
| } | |
| if len(p.ColumnCategoryies) != len(other.ColumnCategoryies) { return false } | |
| for i, _tgt := range p.ColumnCategoryies { | |
| _src42 := other.ColumnCategoryies[i] | |
| if _tgt != _src42 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertRecordReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertRecordReq(%+v)", *p) | |
| } | |
| func (p *TSInsertRecordReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertRecordReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertRecordReq)(nil) | |
| func (p *TSInsertRecordReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - Measurements | |
| // - Values | |
| // - Timestamp | |
| // - IsAligned | |
| // - Timeout | |
| // | |
| type TSInsertStringRecordReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` | |
| Values []string `thrift:"values,4,required" db:"values" json:"values"` | |
| Timestamp int64 `thrift:"timestamp,5,required" db:"timestamp" json:"timestamp"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| Timeout *int64 `thrift:"timeout,7" db:"timeout" json:"timeout,omitempty"` | |
| } | |
| func NewTSInsertStringRecordReq() *TSInsertStringRecordReq { | |
| return &TSInsertStringRecordReq{} | |
| } | |
| func (p *TSInsertStringRecordReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertStringRecordReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSInsertStringRecordReq) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSInsertStringRecordReq) GetValues() []string { | |
| return p.Values | |
| } | |
| func (p *TSInsertStringRecordReq) GetTimestamp() int64 { | |
| return p.Timestamp | |
| } | |
| var TSInsertStringRecordReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertStringRecordReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertStringRecordReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| var TSInsertStringRecordReq_Timeout_DEFAULT int64 | |
| func (p *TSInsertStringRecordReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSInsertStringRecordReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| func (p *TSInsertStringRecordReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertStringRecordReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSInsertStringRecordReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurements bool = false; | |
| var issetValues bool = false; | |
| var issetTimestamp bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValues = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamp = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")) | |
| } | |
| if !issetValues{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Values is not set")) | |
| } | |
| if !issetTimestamp{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamp is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem43 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem43 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem43) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Values = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem44 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem44 = v | |
| } | |
| p.Values = append(p.Values, _elem44) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Timestamp = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "values", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:values: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Values)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Values { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:values: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamp: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.Timestamp)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timestamp (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamp: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordReq) Equals(other *TSInsertStringRecordReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src45 := other.Measurements[i] | |
| if _tgt != _src45 { return false } | |
| } | |
| if len(p.Values) != len(other.Values) { return false } | |
| for i, _tgt := range p.Values { | |
| _src46 := other.Values[i] | |
| if _tgt != _src46 { return false } | |
| } | |
| if p.Timestamp != other.Timestamp { return false } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertStringRecordReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertStringRecordReq(%+v)", *p) | |
| } | |
| func (p *TSInsertStringRecordReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertStringRecordReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertStringRecordReq)(nil) | |
| func (p *TSInsertStringRecordReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - Measurements | |
| // - Values | |
| // - Timestamps | |
| // - Types | |
| // - Size | |
| // - IsAligned | |
| // - WriteToTable | |
| // - ColumnCategories | |
| // - IsCompressed | |
| // - EncodingTypes | |
| // - CompressType | |
| // | |
| type TSInsertTabletReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` | |
| Values []byte `thrift:"values,4,required" db:"values" json:"values"` | |
| Timestamps []byte `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` | |
| Types []int32 `thrift:"types,6,required" db:"types" json:"types"` | |
| Size int32 `thrift:"size,7,required" db:"size" json:"size"` | |
| IsAligned *bool `thrift:"isAligned,8" db:"isAligned" json:"isAligned,omitempty"` | |
| WriteToTable *bool `thrift:"writeToTable,9" db:"writeToTable" json:"writeToTable,omitempty"` | |
| ColumnCategories []int8 `thrift:"columnCategories,10" db:"columnCategories" json:"columnCategories,omitempty"` | |
| IsCompressed *bool `thrift:"isCompressed,11" db:"isCompressed" json:"isCompressed,omitempty"` | |
| EncodingTypes []int8 `thrift:"encodingTypes,12" db:"encodingTypes" json:"encodingTypes,omitempty"` | |
| CompressType *int8 `thrift:"compressType,13" db:"compressType" json:"compressType,omitempty"` | |
| } | |
| func NewTSInsertTabletReq() *TSInsertTabletReq { | |
| return &TSInsertTabletReq{} | |
| } | |
| func (p *TSInsertTabletReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertTabletReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSInsertTabletReq) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSInsertTabletReq) GetValues() []byte { | |
| return p.Values | |
| } | |
| func (p *TSInsertTabletReq) GetTimestamps() []byte { | |
| return p.Timestamps | |
| } | |
| func (p *TSInsertTabletReq) GetTypes() []int32 { | |
| return p.Types | |
| } | |
| func (p *TSInsertTabletReq) GetSize() int32 { | |
| return p.Size | |
| } | |
| var TSInsertTabletReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertTabletReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertTabletReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| var TSInsertTabletReq_WriteToTable_DEFAULT bool | |
| func (p *TSInsertTabletReq) GetWriteToTable() bool { | |
| if !p.IsSetWriteToTable() { | |
| return TSInsertTabletReq_WriteToTable_DEFAULT | |
| } | |
| return *p.WriteToTable | |
| } | |
| var TSInsertTabletReq_ColumnCategories_DEFAULT []int8 | |
| func (p *TSInsertTabletReq) GetColumnCategories() []int8 { | |
| return p.ColumnCategories | |
| } | |
| var TSInsertTabletReq_IsCompressed_DEFAULT bool | |
| func (p *TSInsertTabletReq) GetIsCompressed() bool { | |
| if !p.IsSetIsCompressed() { | |
| return TSInsertTabletReq_IsCompressed_DEFAULT | |
| } | |
| return *p.IsCompressed | |
| } | |
| var TSInsertTabletReq_EncodingTypes_DEFAULT []int8 | |
| func (p *TSInsertTabletReq) GetEncodingTypes() []int8 { | |
| return p.EncodingTypes | |
| } | |
| var TSInsertTabletReq_CompressType_DEFAULT int8 | |
| func (p *TSInsertTabletReq) GetCompressType() int8 { | |
| if !p.IsSetCompressType() { | |
| return TSInsertTabletReq_CompressType_DEFAULT | |
| } | |
| return *p.CompressType | |
| } | |
| func (p *TSInsertTabletReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertTabletReq) IsSetWriteToTable() bool { | |
| return p.WriteToTable != nil | |
| } | |
| func (p *TSInsertTabletReq) IsSetColumnCategories() bool { | |
| return p.ColumnCategories != nil | |
| } | |
| func (p *TSInsertTabletReq) IsSetIsCompressed() bool { | |
| return p.IsCompressed != nil | |
| } | |
| func (p *TSInsertTabletReq) IsSetEncodingTypes() bool { | |
| return p.EncodingTypes != nil | |
| } | |
| func (p *TSInsertTabletReq) IsSetCompressType() bool { | |
| return p.CompressType != nil | |
| } | |
| func (p *TSInsertTabletReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurements bool = false; | |
| var issetValues bool = false; | |
| var issetTimestamps bool = false; | |
| var issetTypes bool = false; | |
| var issetSize bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValues = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamps = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTypes = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSize = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 11: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField11(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 12: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField12(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 13: | |
| if fieldTypeId == thrift.BYTE { | |
| if err := p.ReadField13(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")) | |
| } | |
| if !issetValues{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Values is not set")) | |
| } | |
| if !issetTimestamps{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")) | |
| } | |
| if !issetTypes{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Types is not set")) | |
| } | |
| if !issetSize{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Size is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem47 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem47 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem47) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Values = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Timestamps = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Types = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem48 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem48 = v | |
| } | |
| p.Types = append(p.Types, _elem48) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.Size = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.WriteToTable = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int8, 0, size) | |
| p.ColumnCategories = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem49 int8 | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| temp := int8(v) | |
| _elem49 = temp | |
| } | |
| p.ColumnCategories = append(p.ColumnCategories, _elem49) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 11: ", err) | |
| } else { | |
| p.IsCompressed = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int8, 0, size) | |
| p.EncodingTypes = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem50 int8 | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| temp := int8(v) | |
| _elem50 = temp | |
| } | |
| p.EncodingTypes = append(p.EncodingTypes, _elem50) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 13: ", err) | |
| } else { | |
| temp := int8(v) | |
| p.CompressType = &temp | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertTabletReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| if err := p.writeField11(ctx, oprot); err != nil { return err } | |
| if err := p.writeField12(ctx, oprot); err != nil { return err } | |
| if err := p.writeField13(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "values", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:values: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Values); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.values (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:values: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.STRING, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Timestamps); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timestamps (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "types", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:types: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Types)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Types { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:types: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "size", thrift.I32, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:size: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.Size)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.size (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:size: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetWriteToTable() { | |
| if err := oprot.WriteFieldBegin(ctx, "writeToTable", thrift.BOOL, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:writeToTable: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.WriteToTable)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.writeToTable (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:writeToTable: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetColumnCategories() { | |
| if err := oprot.WriteFieldBegin(ctx, "columnCategories", thrift.LIST, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:columnCategories: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.ColumnCategories)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ColumnCategories { | |
| if err := oprot.WriteByte(ctx, int8(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:columnCategories: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsCompressed() { | |
| if err := oprot.WriteFieldBegin(ctx, "isCompressed", thrift.BOOL, 11); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:isCompressed: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsCompressed)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isCompressed (11) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 11:isCompressed: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEncodingTypes() { | |
| if err := oprot.WriteFieldBegin(ctx, "encodingTypes", thrift.LIST, 12); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:encodingTypes: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.EncodingTypes)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.EncodingTypes { | |
| if err := oprot.WriteByte(ctx, int8(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 12:encodingTypes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetCompressType() { | |
| if err := oprot.WriteFieldBegin(ctx, "compressType", thrift.BYTE, 13); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:compressType: ", p), err) | |
| } | |
| if err := oprot.WriteByte(ctx, int8(*p.CompressType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.compressType (13) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 13:compressType: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletReq) Equals(other *TSInsertTabletReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src51 := other.Measurements[i] | |
| if _tgt != _src51 { return false } | |
| } | |
| if bytes.Compare(p.Values, other.Values) != 0 { return false } | |
| if bytes.Compare(p.Timestamps, other.Timestamps) != 0 { return false } | |
| if len(p.Types) != len(other.Types) { return false } | |
| for i, _tgt := range p.Types { | |
| _src52 := other.Types[i] | |
| if _tgt != _src52 { return false } | |
| } | |
| if p.Size != other.Size { return false } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| if p.WriteToTable != other.WriteToTable { | |
| if p.WriteToTable == nil || other.WriteToTable == nil { | |
| return false | |
| } | |
| if (*p.WriteToTable) != (*other.WriteToTable) { return false } | |
| } | |
| if len(p.ColumnCategories) != len(other.ColumnCategories) { return false } | |
| for i, _tgt := range p.ColumnCategories { | |
| _src53 := other.ColumnCategories[i] | |
| if _tgt != _src53 { return false } | |
| } | |
| if p.IsCompressed != other.IsCompressed { | |
| if p.IsCompressed == nil || other.IsCompressed == nil { | |
| return false | |
| } | |
| if (*p.IsCompressed) != (*other.IsCompressed) { return false } | |
| } | |
| if len(p.EncodingTypes) != len(other.EncodingTypes) { return false } | |
| for i, _tgt := range p.EncodingTypes { | |
| _src54 := other.EncodingTypes[i] | |
| if _tgt != _src54 { return false } | |
| } | |
| if p.CompressType != other.CompressType { | |
| if p.CompressType == nil || other.CompressType == nil { | |
| return false | |
| } | |
| if (*p.CompressType) != (*other.CompressType) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertTabletReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertTabletReq(%+v)", *p) | |
| } | |
| func (p *TSInsertTabletReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertTabletReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertTabletReq)(nil) | |
| func (p *TSInsertTabletReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPaths | |
| // - MeasurementsList | |
| // - ValuesList | |
| // - TimestampsList | |
| // - TypesList | |
| // - SizeList | |
| // - IsAligned | |
| // | |
| type TSInsertTabletsReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` | |
| MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` | |
| ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` | |
| TimestampsList [][]byte `thrift:"timestampsList,5,required" db:"timestampsList" json:"timestampsList"` | |
| TypesList [][]int32 `thrift:"typesList,6,required" db:"typesList" json:"typesList"` | |
| SizeList []int32 `thrift:"sizeList,7,required" db:"sizeList" json:"sizeList"` | |
| IsAligned *bool `thrift:"isAligned,8" db:"isAligned" json:"isAligned,omitempty"` | |
| } | |
| func NewTSInsertTabletsReq() *TSInsertTabletsReq { | |
| return &TSInsertTabletsReq{} | |
| } | |
| func (p *TSInsertTabletsReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertTabletsReq) GetPrefixPaths() []string { | |
| return p.PrefixPaths | |
| } | |
| func (p *TSInsertTabletsReq) GetMeasurementsList() [][]string { | |
| return p.MeasurementsList | |
| } | |
| func (p *TSInsertTabletsReq) GetValuesList() [][]byte { | |
| return p.ValuesList | |
| } | |
| func (p *TSInsertTabletsReq) GetTimestampsList() [][]byte { | |
| return p.TimestampsList | |
| } | |
| func (p *TSInsertTabletsReq) GetTypesList() [][]int32 { | |
| return p.TypesList | |
| } | |
| func (p *TSInsertTabletsReq) GetSizeList() []int32 { | |
| return p.SizeList | |
| } | |
| var TSInsertTabletsReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertTabletsReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertTabletsReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| func (p *TSInsertTabletsReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertTabletsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPaths bool = false; | |
| var issetMeasurementsList bool = false; | |
| var issetValuesList bool = false; | |
| var issetTimestampsList bool = false; | |
| var issetTypesList bool = false; | |
| var issetSizeList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurementsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValuesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestampsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTypesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSizeList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")) | |
| } | |
| if !issetMeasurementsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")) | |
| } | |
| if !issetValuesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")) | |
| } | |
| if !issetTimestampsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimestampsList is not set")) | |
| } | |
| if !issetTypesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TypesList is not set")) | |
| } | |
| if !issetSizeList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SizeList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.PrefixPaths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem55 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem55 = v | |
| } | |
| p.PrefixPaths = append(p.PrefixPaths, _elem55) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.MeasurementsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem56 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem57 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem57 = v | |
| } | |
| _elem56 = append(_elem56, _elem57) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.MeasurementsList = append(p.MeasurementsList, _elem56) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.ValuesList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem58 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem58 = v | |
| } | |
| p.ValuesList = append(p.ValuesList, _elem58) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.TimestampsList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem59 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem59 = v | |
| } | |
| p.TimestampsList = append(p.TimestampsList, _elem59) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]int32, 0, size) | |
| p.TypesList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| _elem60 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem61 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem61 = v | |
| } | |
| _elem60 = append(_elem60, _elem61) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.TypesList = append(p.TypesList, _elem60) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.SizeList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem62 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem62 = v | |
| } | |
| p.SizeList = append(p.SizeList, _elem62) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertTabletsReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertTabletsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.PrefixPaths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementsList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValuesList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestampsList", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestampsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.TimestampsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.TimestampsList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestampsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "typesList", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:typesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.TypesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.TypesList { | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:typesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sizeList", thrift.LIST, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:sizeList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.SizeList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.SizeList { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:sizeList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertTabletsReq) Equals(other *TSInsertTabletsReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } | |
| for i, _tgt := range p.PrefixPaths { | |
| _src63 := other.PrefixPaths[i] | |
| if _tgt != _src63 { return false } | |
| } | |
| if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } | |
| for i, _tgt := range p.MeasurementsList { | |
| _src64 := other.MeasurementsList[i] | |
| if len(_tgt) != len(_src64) { return false } | |
| for i, _tgt := range _tgt { | |
| _src65 := _src64[i] | |
| if _tgt != _src65 { return false } | |
| } | |
| } | |
| if len(p.ValuesList) != len(other.ValuesList) { return false } | |
| for i, _tgt := range p.ValuesList { | |
| _src66 := other.ValuesList[i] | |
| if bytes.Compare(_tgt, _src66) != 0 { return false } | |
| } | |
| if len(p.TimestampsList) != len(other.TimestampsList) { return false } | |
| for i, _tgt := range p.TimestampsList { | |
| _src67 := other.TimestampsList[i] | |
| if bytes.Compare(_tgt, _src67) != 0 { return false } | |
| } | |
| if len(p.TypesList) != len(other.TypesList) { return false } | |
| for i, _tgt := range p.TypesList { | |
| _src68 := other.TypesList[i] | |
| if len(_tgt) != len(_src68) { return false } | |
| for i, _tgt := range _tgt { | |
| _src69 := _src68[i] | |
| if _tgt != _src69 { return false } | |
| } | |
| } | |
| if len(p.SizeList) != len(other.SizeList) { return false } | |
| for i, _tgt := range p.SizeList { | |
| _src70 := other.SizeList[i] | |
| if _tgt != _src70 { return false } | |
| } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertTabletsReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertTabletsReq(%+v)", *p) | |
| } | |
| func (p *TSInsertTabletsReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertTabletsReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertTabletsReq)(nil) | |
| func (p *TSInsertTabletsReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPaths | |
| // - MeasurementsList | |
| // - ValuesList | |
| // - Timestamps | |
| // - IsAligned | |
| // | |
| type TSInsertRecordsReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` | |
| MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` | |
| ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` | |
| Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| } | |
| func NewTSInsertRecordsReq() *TSInsertRecordsReq { | |
| return &TSInsertRecordsReq{} | |
| } | |
| func (p *TSInsertRecordsReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertRecordsReq) GetPrefixPaths() []string { | |
| return p.PrefixPaths | |
| } | |
| func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string { | |
| return p.MeasurementsList | |
| } | |
| func (p *TSInsertRecordsReq) GetValuesList() [][]byte { | |
| return p.ValuesList | |
| } | |
| func (p *TSInsertRecordsReq) GetTimestamps() []int64 { | |
| return p.Timestamps | |
| } | |
| var TSInsertRecordsReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertRecordsReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertRecordsReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| func (p *TSInsertRecordsReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPaths bool = false; | |
| var issetMeasurementsList bool = false; | |
| var issetValuesList bool = false; | |
| var issetTimestamps bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurementsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValuesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamps = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")) | |
| } | |
| if !issetMeasurementsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")) | |
| } | |
| if !issetValuesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")) | |
| } | |
| if !issetTimestamps{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.PrefixPaths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem71 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem71 = v | |
| } | |
| p.PrefixPaths = append(p.PrefixPaths, _elem71) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.MeasurementsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem72 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem73 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem73 = v | |
| } | |
| _elem72 = append(_elem72, _elem73) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.MeasurementsList = append(p.MeasurementsList, _elem72) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.ValuesList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem74 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem74 = v | |
| } | |
| p.ValuesList = append(p.ValuesList, _elem74) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int64, 0, size) | |
| p.Timestamps = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem75 int64 | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem75 = v | |
| } | |
| p.Timestamps = append(p.Timestamps, _elem75) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.PrefixPaths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementsList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValuesList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Timestamps { | |
| if err := oprot.WriteI64(ctx, int64(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } | |
| for i, _tgt := range p.PrefixPaths { | |
| _src76 := other.PrefixPaths[i] | |
| if _tgt != _src76 { return false } | |
| } | |
| if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } | |
| for i, _tgt := range p.MeasurementsList { | |
| _src77 := other.MeasurementsList[i] | |
| if len(_tgt) != len(_src77) { return false } | |
| for i, _tgt := range _tgt { | |
| _src78 := _src77[i] | |
| if _tgt != _src78 { return false } | |
| } | |
| } | |
| if len(p.ValuesList) != len(other.ValuesList) { return false } | |
| for i, _tgt := range p.ValuesList { | |
| _src79 := other.ValuesList[i] | |
| if bytes.Compare(_tgt, _src79) != 0 { return false } | |
| } | |
| if len(p.Timestamps) != len(other.Timestamps) { return false } | |
| for i, _tgt := range p.Timestamps { | |
| _src80 := other.Timestamps[i] | |
| if _tgt != _src80 { return false } | |
| } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertRecordsReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p) | |
| } | |
| func (p *TSInsertRecordsReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertRecordsReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertRecordsReq)(nil) | |
| func (p *TSInsertRecordsReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - MeasurementsList | |
| // - ValuesList | |
| // - Timestamps | |
| // - IsAligned | |
| // | |
| type TSInsertRecordsOfOneDeviceReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` | |
| ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` | |
| Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| } | |
| func NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq { | |
| return &TSInsertRecordsOfOneDeviceReq{} | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { | |
| return p.MeasurementsList | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte { | |
| return p.ValuesList | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 { | |
| return p.Timestamps | |
| } | |
| var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurementsList bool = false; | |
| var issetValuesList bool = false; | |
| var issetTimestamps bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurementsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValuesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamps = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurementsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")) | |
| } | |
| if !issetValuesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")) | |
| } | |
| if !issetTimestamps{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.MeasurementsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem81 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem82 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem82 = v | |
| } | |
| _elem81 = append(_elem81, _elem82) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.MeasurementsList = append(p.MeasurementsList, _elem81) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.ValuesList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem83 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem83 = v | |
| } | |
| p.ValuesList = append(p.ValuesList, _elem83) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int64, 0, size) | |
| p.Timestamps = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem84 int64 | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem84 = v | |
| } | |
| p.Timestamps = append(p.Timestamps, _elem84) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsOfOneDeviceReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementsList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValuesList { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Timestamps { | |
| if err := oprot.WriteI64(ctx, int64(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } | |
| for i, _tgt := range p.MeasurementsList { | |
| _src85 := other.MeasurementsList[i] | |
| if len(_tgt) != len(_src85) { return false } | |
| for i, _tgt := range _tgt { | |
| _src86 := _src85[i] | |
| if _tgt != _src86 { return false } | |
| } | |
| } | |
| if len(p.ValuesList) != len(other.ValuesList) { return false } | |
| for i, _tgt := range p.ValuesList { | |
| _src87 := other.ValuesList[i] | |
| if bytes.Compare(_tgt, _src87) != 0 { return false } | |
| } | |
| if len(p.Timestamps) != len(other.Timestamps) { return false } | |
| for i, _tgt := range p.Timestamps { | |
| _src88 := other.Timestamps[i] | |
| if _tgt != _src88 { return false } | |
| } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p) | |
| } | |
| func (p *TSInsertRecordsOfOneDeviceReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertRecordsOfOneDeviceReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertRecordsOfOneDeviceReq)(nil) | |
| func (p *TSInsertRecordsOfOneDeviceReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - MeasurementsList | |
| // - ValuesList | |
| // - Timestamps | |
| // - IsAligned | |
| // | |
| type TSInsertStringRecordsOfOneDeviceReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` | |
| ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` | |
| Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| } | |
| func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq { | |
| return &TSInsertStringRecordsOfOneDeviceReq{} | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { | |
| return p.MeasurementsList | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string { | |
| return p.ValuesList | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 { | |
| return p.Timestamps | |
| } | |
| var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurementsList bool = false; | |
| var issetValuesList bool = false; | |
| var issetTimestamps bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurementsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValuesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamps = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurementsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")) | |
| } | |
| if !issetValuesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")) | |
| } | |
| if !issetTimestamps{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.MeasurementsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem89 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem90 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem90 = v | |
| } | |
| _elem89 = append(_elem89, _elem90) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.MeasurementsList = append(p.MeasurementsList, _elem89) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.ValuesList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem91 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem92 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem92 = v | |
| } | |
| _elem91 = append(_elem91, _elem92) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.ValuesList = append(p.ValuesList, _elem91) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int64, 0, size) | |
| p.Timestamps = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem93 int64 | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem93 = v | |
| } | |
| p.Timestamps = append(p.Timestamps, _elem93) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsOfOneDeviceReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementsList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValuesList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Timestamps { | |
| if err := oprot.WriteI64(ctx, int64(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } | |
| for i, _tgt := range p.MeasurementsList { | |
| _src94 := other.MeasurementsList[i] | |
| if len(_tgt) != len(_src94) { return false } | |
| for i, _tgt := range _tgt { | |
| _src95 := _src94[i] | |
| if _tgt != _src95 { return false } | |
| } | |
| } | |
| if len(p.ValuesList) != len(other.ValuesList) { return false } | |
| for i, _tgt := range p.ValuesList { | |
| _src96 := other.ValuesList[i] | |
| if len(_tgt) != len(_src96) { return false } | |
| for i, _tgt := range _tgt { | |
| _src97 := _src96[i] | |
| if _tgt != _src97 { return false } | |
| } | |
| } | |
| if len(p.Timestamps) != len(other.Timestamps) { return false } | |
| for i, _tgt := range p.Timestamps { | |
| _src98 := other.Timestamps[i] | |
| if _tgt != _src98 { return false } | |
| } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p) | |
| } | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertStringRecordsOfOneDeviceReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertStringRecordsOfOneDeviceReq)(nil) | |
| func (p *TSInsertStringRecordsOfOneDeviceReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPaths | |
| // - MeasurementsList | |
| // - ValuesList | |
| // - Timestamps | |
| // - IsAligned | |
| // | |
| type TSInsertStringRecordsReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` | |
| MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` | |
| ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` | |
| Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` | |
| IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` | |
| } | |
| func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq { | |
| return &TSInsertStringRecordsReq{} | |
| } | |
| func (p *TSInsertStringRecordsReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string { | |
| return p.PrefixPaths | |
| } | |
| func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string { | |
| return p.MeasurementsList | |
| } | |
| func (p *TSInsertStringRecordsReq) GetValuesList() [][]string { | |
| return p.ValuesList | |
| } | |
| func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 { | |
| return p.Timestamps | |
| } | |
| var TSInsertStringRecordsReq_IsAligned_DEFAULT bool | |
| func (p *TSInsertStringRecordsReq) GetIsAligned() bool { | |
| if !p.IsSetIsAligned() { | |
| return TSInsertStringRecordsReq_IsAligned_DEFAULT | |
| } | |
| return *p.IsAligned | |
| } | |
| func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool { | |
| return p.IsAligned != nil | |
| } | |
| func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPaths bool = false; | |
| var issetMeasurementsList bool = false; | |
| var issetValuesList bool = false; | |
| var issetTimestamps bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurementsList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetValuesList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestamps = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")) | |
| } | |
| if !issetMeasurementsList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")) | |
| } | |
| if !issetValuesList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")) | |
| } | |
| if !issetTimestamps{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.PrefixPaths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem99 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem99 = v | |
| } | |
| p.PrefixPaths = append(p.PrefixPaths, _elem99) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.MeasurementsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem100 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem101 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem101 = v | |
| } | |
| _elem100 = append(_elem100, _elem101) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.MeasurementsList = append(p.MeasurementsList, _elem100) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]string, 0, size) | |
| p.ValuesList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| _elem102 := tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem103 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem103 = v | |
| } | |
| _elem102 = append(_elem102, _elem103) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| p.ValuesList = append(p.ValuesList, _elem102) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int64, 0, size) | |
| p.Timestamps = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem104 int64 | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem104 = v | |
| } | |
| p.Timestamps = append(p.Timestamps, _elem104) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsAligned = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.PrefixPaths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementsList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ValuesList { | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range v { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Timestamps { | |
| if err := oprot.WriteI64(ctx, int64(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsAligned() { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } | |
| for i, _tgt := range p.PrefixPaths { | |
| _src105 := other.PrefixPaths[i] | |
| if _tgt != _src105 { return false } | |
| } | |
| if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } | |
| for i, _tgt := range p.MeasurementsList { | |
| _src106 := other.MeasurementsList[i] | |
| if len(_tgt) != len(_src106) { return false } | |
| for i, _tgt := range _tgt { | |
| _src107 := _src106[i] | |
| if _tgt != _src107 { return false } | |
| } | |
| } | |
| if len(p.ValuesList) != len(other.ValuesList) { return false } | |
| for i, _tgt := range p.ValuesList { | |
| _src108 := other.ValuesList[i] | |
| if len(_tgt) != len(_src108) { return false } | |
| for i, _tgt := range _tgt { | |
| _src109 := _src108[i] | |
| if _tgt != _src109 { return false } | |
| } | |
| } | |
| if len(p.Timestamps) != len(other.Timestamps) { return false } | |
| for i, _tgt := range p.Timestamps { | |
| _src110 := other.Timestamps[i] | |
| if _tgt != _src110 { return false } | |
| } | |
| if p.IsAligned != other.IsAligned { | |
| if p.IsAligned == nil || other.IsAligned == nil { | |
| return false | |
| } | |
| if (*p.IsAligned) != (*other.IsAligned) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSInsertStringRecordsReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p) | |
| } | |
| func (p *TSInsertStringRecordsReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSInsertStringRecordsReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSInsertStringRecordsReq)(nil) | |
| func (p *TSInsertStringRecordsReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Paths | |
| // - StartTime | |
| // - EndTime | |
| // | |
| type TSDeleteDataReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` | |
| StartTime int64 `thrift:"startTime,3,required" db:"startTime" json:"startTime"` | |
| EndTime int64 `thrift:"endTime,4,required" db:"endTime" json:"endTime"` | |
| } | |
| func NewTSDeleteDataReq() *TSDeleteDataReq { | |
| return &TSDeleteDataReq{} | |
| } | |
| func (p *TSDeleteDataReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSDeleteDataReq) GetPaths() []string { | |
| return p.Paths | |
| } | |
| func (p *TSDeleteDataReq) GetStartTime() int64 { | |
| return p.StartTime | |
| } | |
| func (p *TSDeleteDataReq) GetEndTime() int64 { | |
| return p.EndTime | |
| } | |
| func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPaths bool = false; | |
| var issetStartTime bool = false; | |
| var issetEndTime bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStartTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEndTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")) | |
| } | |
| if !issetStartTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")) | |
| } | |
| if !issetEndTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Paths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem111 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem111 = v | |
| } | |
| p.Paths = append(p.Paths, _elem111) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.StartTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.EndTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSDeleteDataReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Paths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeleteDataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.startTime (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeleteDataReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.endTime (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Paths) != len(other.Paths) { return false } | |
| for i, _tgt := range p.Paths { | |
| _src112 := other.Paths[i] | |
| if _tgt != _src112 { return false } | |
| } | |
| if p.StartTime != other.StartTime { return false } | |
| if p.EndTime != other.EndTime { return false } | |
| return true | |
| } | |
| func (p *TSDeleteDataReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSDeleteDataReq(%+v)", *p) | |
| } | |
| func (p *TSDeleteDataReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSDeleteDataReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSDeleteDataReq)(nil) | |
| func (p *TSDeleteDataReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Path | |
| // - DataType | |
| // - Encoding | |
| // - Compressor | |
| // - Props | |
| // - Tags | |
| // - Attributes | |
| // - MeasurementAlias | |
| // | |
| type TSCreateTimeseriesReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Path string `thrift:"path,2,required" db:"path" json:"path"` | |
| DataType int32 `thrift:"dataType,3,required" db:"dataType" json:"dataType"` | |
| Encoding int32 `thrift:"encoding,4,required" db:"encoding" json:"encoding"` | |
| Compressor int32 `thrift:"compressor,5,required" db:"compressor" json:"compressor"` | |
| Props map[string]string `thrift:"props,6" db:"props" json:"props,omitempty"` | |
| Tags map[string]string `thrift:"tags,7" db:"tags" json:"tags,omitempty"` | |
| Attributes map[string]string `thrift:"attributes,8" db:"attributes" json:"attributes,omitempty"` | |
| MeasurementAlias *string `thrift:"measurementAlias,9" db:"measurementAlias" json:"measurementAlias,omitempty"` | |
| } | |
| func NewTSCreateTimeseriesReq() *TSCreateTimeseriesReq { | |
| return &TSCreateTimeseriesReq{} | |
| } | |
| func (p *TSCreateTimeseriesReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCreateTimeseriesReq) GetPath() string { | |
| return p.Path | |
| } | |
| func (p *TSCreateTimeseriesReq) GetDataType() int32 { | |
| return p.DataType | |
| } | |
| func (p *TSCreateTimeseriesReq) GetEncoding() int32 { | |
| return p.Encoding | |
| } | |
| func (p *TSCreateTimeseriesReq) GetCompressor() int32 { | |
| return p.Compressor | |
| } | |
| var TSCreateTimeseriesReq_Props_DEFAULT map[string]string | |
| func (p *TSCreateTimeseriesReq) GetProps() map[string]string { | |
| return p.Props | |
| } | |
| var TSCreateTimeseriesReq_Tags_DEFAULT map[string]string | |
| func (p *TSCreateTimeseriesReq) GetTags() map[string]string { | |
| return p.Tags | |
| } | |
| var TSCreateTimeseriesReq_Attributes_DEFAULT map[string]string | |
| func (p *TSCreateTimeseriesReq) GetAttributes() map[string]string { | |
| return p.Attributes | |
| } | |
| var TSCreateTimeseriesReq_MeasurementAlias_DEFAULT string | |
| func (p *TSCreateTimeseriesReq) GetMeasurementAlias() string { | |
| if !p.IsSetMeasurementAlias() { | |
| return TSCreateTimeseriesReq_MeasurementAlias_DEFAULT | |
| } | |
| return *p.MeasurementAlias | |
| } | |
| func (p *TSCreateTimeseriesReq) IsSetProps() bool { | |
| return p.Props != nil | |
| } | |
| func (p *TSCreateTimeseriesReq) IsSetTags() bool { | |
| return p.Tags != nil | |
| } | |
| func (p *TSCreateTimeseriesReq) IsSetAttributes() bool { | |
| return p.Attributes != nil | |
| } | |
| func (p *TSCreateTimeseriesReq) IsSetMeasurementAlias() bool { | |
| return p.MeasurementAlias != nil | |
| } | |
| func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPath bool = false; | |
| var issetDataType bool = false; | |
| var issetEncoding bool = false; | |
| var issetCompressor bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDataType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEncoding = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetCompressor = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.MAP { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")) | |
| } | |
| if !issetDataType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set")) | |
| } | |
| if !issetEncoding{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encoding is not set")) | |
| } | |
| if !issetCompressor{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressor is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Path = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.DataType = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Encoding = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.Compressor = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| p.Props = tMap | |
| for i := 0; i < size; i++ { | |
| var _key113 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key113 = v | |
| } | |
| var _val114 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val114 = v | |
| } | |
| p.Props[_key113] = _val114 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| p.Tags = tMap | |
| for i := 0; i < size; i++ { | |
| var _key115 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key115 = v | |
| } | |
| var _val116 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val116 = v | |
| } | |
| p.Tags[_key115] = _val116 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| p.Attributes = tMap | |
| for i := 0; i < size; i++ { | |
| var _key117 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key117 = v | |
| } | |
| var _val118 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val118 = v | |
| } | |
| p.Attributes[_key117] = _val118 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.MeasurementAlias = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCreateTimeseriesReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Path)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.path (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataType: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.dataType (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataType: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "encoding", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encoding: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.Encoding)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.encoding (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encoding: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "compressor", thrift.I32, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressor: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.Compressor)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.compressor (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressor: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetProps() { | |
| if err := oprot.WriteFieldBegin(ctx, "props", thrift.MAP, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:props: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Props)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.Props { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:props: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTags() { | |
| if err := oprot.WriteFieldBegin(ctx, "tags", thrift.MAP, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tags: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Tags)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.Tags { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tags: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetAttributes() { | |
| if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributes: ", p), err) | |
| } | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range p.Attributes { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMeasurementAlias() { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.STRING, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAlias: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.MeasurementAlias)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.measurementAlias (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAlias: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Path != other.Path { return false } | |
| if p.DataType != other.DataType { return false } | |
| if p.Encoding != other.Encoding { return false } | |
| if p.Compressor != other.Compressor { return false } | |
| if len(p.Props) != len(other.Props) { return false } | |
| for k, _tgt := range p.Props { | |
| _src119 := other.Props[k] | |
| if _tgt != _src119 { return false } | |
| } | |
| if len(p.Tags) != len(other.Tags) { return false } | |
| for k, _tgt := range p.Tags { | |
| _src120 := other.Tags[k] | |
| if _tgt != _src120 { return false } | |
| } | |
| if len(p.Attributes) != len(other.Attributes) { return false } | |
| for k, _tgt := range p.Attributes { | |
| _src121 := other.Attributes[k] | |
| if _tgt != _src121 { return false } | |
| } | |
| if p.MeasurementAlias != other.MeasurementAlias { | |
| if p.MeasurementAlias == nil || other.MeasurementAlias == nil { | |
| return false | |
| } | |
| if (*p.MeasurementAlias) != (*other.MeasurementAlias) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSCreateTimeseriesReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCreateTimeseriesReq(%+v)", *p) | |
| } | |
| func (p *TSCreateTimeseriesReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCreateTimeseriesReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCreateTimeseriesReq)(nil) | |
| func (p *TSCreateTimeseriesReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - Measurements | |
| // - DataTypes | |
| // - Encodings | |
| // - Compressors | |
| // - MeasurementAlias | |
| // - TagsList | |
| // - AttributesList | |
| // | |
| type TSCreateAlignedTimeseriesReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` | |
| DataTypes []int32 `thrift:"dataTypes,4,required" db:"dataTypes" json:"dataTypes"` | |
| Encodings []int32 `thrift:"encodings,5,required" db:"encodings" json:"encodings"` | |
| Compressors []int32 `thrift:"compressors,6,required" db:"compressors" json:"compressors"` | |
| MeasurementAlias []string `thrift:"measurementAlias,7" db:"measurementAlias" json:"measurementAlias,omitempty"` | |
| TagsList []map[string]string `thrift:"tagsList,8" db:"tagsList" json:"tagsList,omitempty"` | |
| AttributesList []map[string]string `thrift:"attributesList,9" db:"attributesList" json:"attributesList,omitempty"` | |
| } | |
| func NewTSCreateAlignedTimeseriesReq() *TSCreateAlignedTimeseriesReq { | |
| return &TSCreateAlignedTimeseriesReq{} | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetDataTypes() []int32 { | |
| return p.DataTypes | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetEncodings() []int32 { | |
| return p.Encodings | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) GetCompressors() []int32 { | |
| return p.Compressors | |
| } | |
| var TSCreateAlignedTimeseriesReq_MeasurementAlias_DEFAULT []string | |
| func (p *TSCreateAlignedTimeseriesReq) GetMeasurementAlias() []string { | |
| return p.MeasurementAlias | |
| } | |
| var TSCreateAlignedTimeseriesReq_TagsList_DEFAULT []map[string]string | |
| func (p *TSCreateAlignedTimeseriesReq) GetTagsList() []map[string]string { | |
| return p.TagsList | |
| } | |
| var TSCreateAlignedTimeseriesReq_AttributesList_DEFAULT []map[string]string | |
| func (p *TSCreateAlignedTimeseriesReq) GetAttributesList() []map[string]string { | |
| return p.AttributesList | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) IsSetMeasurementAlias() bool { | |
| return p.MeasurementAlias != nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) IsSetTagsList() bool { | |
| return p.TagsList != nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) IsSetAttributesList() bool { | |
| return p.AttributesList != nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetMeasurements bool = false; | |
| var issetDataTypes bool = false; | |
| var issetEncodings bool = false; | |
| var issetCompressors bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDataTypes = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEncodings = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetCompressors = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetMeasurements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")) | |
| } | |
| if !issetDataTypes{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")) | |
| } | |
| if !issetEncodings{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")) | |
| } | |
| if !issetCompressors{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem122 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem122 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem122) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.DataTypes = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem123 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem123 = v | |
| } | |
| p.DataTypes = append(p.DataTypes, _elem123) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Encodings = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem124 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem124 = v | |
| } | |
| p.Encodings = append(p.Encodings, _elem124) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Compressors = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem125 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem125 = v | |
| } | |
| p.Compressors = append(p.Compressors, _elem125) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.MeasurementAlias = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem126 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem126 = v | |
| } | |
| p.MeasurementAlias = append(p.MeasurementAlias, _elem126) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]map[string]string, 0, size) | |
| p.TagsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| _elem127 := tMap | |
| for i := 0; i < size; i++ { | |
| var _key128 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key128 = v | |
| } | |
| var _val129 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val129 = v | |
| } | |
| _elem127[_key128] = _val129 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| p.TagsList = append(p.TagsList, _elem127) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]map[string]string, 0, size) | |
| p.AttributesList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| _elem130 := tMap | |
| for i := 0; i < size; i++ { | |
| var _key131 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key131 = v | |
| } | |
| var _val132 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val132 = v | |
| } | |
| _elem130[_key131] = _val132 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| p.AttributesList = append(p.AttributesList, _elem130) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCreateAlignedTimeseriesReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataTypes: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.DataTypes { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataTypes: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:encodings: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Encodings { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:encodings: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressors: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Compressors { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressors: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMeasurementAlias() { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.LIST, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:measurementAlias: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAlias)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementAlias { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:measurementAlias: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTagsList() { | |
| if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:tagsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.TagsList { | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range v { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:tagsList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetAttributesList() { | |
| if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.AttributesList { | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range v { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributesList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src133 := other.Measurements[i] | |
| if _tgt != _src133 { return false } | |
| } | |
| if len(p.DataTypes) != len(other.DataTypes) { return false } | |
| for i, _tgt := range p.DataTypes { | |
| _src134 := other.DataTypes[i] | |
| if _tgt != _src134 { return false } | |
| } | |
| if len(p.Encodings) != len(other.Encodings) { return false } | |
| for i, _tgt := range p.Encodings { | |
| _src135 := other.Encodings[i] | |
| if _tgt != _src135 { return false } | |
| } | |
| if len(p.Compressors) != len(other.Compressors) { return false } | |
| for i, _tgt := range p.Compressors { | |
| _src136 := other.Compressors[i] | |
| if _tgt != _src136 { return false } | |
| } | |
| if len(p.MeasurementAlias) != len(other.MeasurementAlias) { return false } | |
| for i, _tgt := range p.MeasurementAlias { | |
| _src137 := other.MeasurementAlias[i] | |
| if _tgt != _src137 { return false } | |
| } | |
| if len(p.TagsList) != len(other.TagsList) { return false } | |
| for i, _tgt := range p.TagsList { | |
| _src138 := other.TagsList[i] | |
| if len(_tgt) != len(_src138) { return false } | |
| for k, _tgt := range _tgt { | |
| _src139 := _src138[k] | |
| if _tgt != _src139 { return false } | |
| } | |
| } | |
| if len(p.AttributesList) != len(other.AttributesList) { return false } | |
| for i, _tgt := range p.AttributesList { | |
| _src140 := other.AttributesList[i] | |
| if len(_tgt) != len(_src140) { return false } | |
| for k, _tgt := range _tgt { | |
| _src141 := _src140[k] | |
| if _tgt != _src141 { return false } | |
| } | |
| } | |
| return true | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCreateAlignedTimeseriesReq(%+v)", *p) | |
| } | |
| func (p *TSCreateAlignedTimeseriesReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCreateAlignedTimeseriesReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCreateAlignedTimeseriesReq)(nil) | |
| func (p *TSCreateAlignedTimeseriesReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Paths | |
| // - FetchSize | |
| // - StartTime | |
| // - EndTime | |
| // - StatementId | |
| // - EnableRedirectQuery | |
| // - JdbcQuery | |
| // - Timeout | |
| // - LegalPathNodes | |
| // | |
| type TSRawDataQueryReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` | |
| FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` | |
| StartTime int64 `thrift:"startTime,4,required" db:"startTime" json:"startTime"` | |
| EndTime int64 `thrift:"endTime,5,required" db:"endTime" json:"endTime"` | |
| StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"` | |
| EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` | |
| JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"` | |
| Timeout *int64 `thrift:"timeout,9" db:"timeout" json:"timeout,omitempty"` | |
| LegalPathNodes *bool `thrift:"legalPathNodes,10" db:"legalPathNodes" json:"legalPathNodes,omitempty"` | |
| } | |
| func NewTSRawDataQueryReq() *TSRawDataQueryReq { | |
| return &TSRawDataQueryReq{} | |
| } | |
| func (p *TSRawDataQueryReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSRawDataQueryReq) GetPaths() []string { | |
| return p.Paths | |
| } | |
| var TSRawDataQueryReq_FetchSize_DEFAULT int32 | |
| func (p *TSRawDataQueryReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSRawDataQueryReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| func (p *TSRawDataQueryReq) GetStartTime() int64 { | |
| return p.StartTime | |
| } | |
| func (p *TSRawDataQueryReq) GetEndTime() int64 { | |
| return p.EndTime | |
| } | |
| func (p *TSRawDataQueryReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| var TSRawDataQueryReq_EnableRedirectQuery_DEFAULT bool | |
| func (p *TSRawDataQueryReq) GetEnableRedirectQuery() bool { | |
| if !p.IsSetEnableRedirectQuery() { | |
| return TSRawDataQueryReq_EnableRedirectQuery_DEFAULT | |
| } | |
| return *p.EnableRedirectQuery | |
| } | |
| var TSRawDataQueryReq_JdbcQuery_DEFAULT bool | |
| func (p *TSRawDataQueryReq) GetJdbcQuery() bool { | |
| if !p.IsSetJdbcQuery() { | |
| return TSRawDataQueryReq_JdbcQuery_DEFAULT | |
| } | |
| return *p.JdbcQuery | |
| } | |
| var TSRawDataQueryReq_Timeout_DEFAULT int64 | |
| func (p *TSRawDataQueryReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSRawDataQueryReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSRawDataQueryReq_LegalPathNodes_DEFAULT bool | |
| func (p *TSRawDataQueryReq) GetLegalPathNodes() bool { | |
| if !p.IsSetLegalPathNodes() { | |
| return TSRawDataQueryReq_LegalPathNodes_DEFAULT | |
| } | |
| return *p.LegalPathNodes | |
| } | |
| func (p *TSRawDataQueryReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSRawDataQueryReq) IsSetEnableRedirectQuery() bool { | |
| return p.EnableRedirectQuery != nil | |
| } | |
| func (p *TSRawDataQueryReq) IsSetJdbcQuery() bool { | |
| return p.JdbcQuery != nil | |
| } | |
| func (p *TSRawDataQueryReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSRawDataQueryReq) IsSetLegalPathNodes() bool { | |
| return p.LegalPathNodes != nil | |
| } | |
| func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPaths bool = false; | |
| var issetStartTime bool = false; | |
| var issetEndTime bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStartTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEndTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")) | |
| } | |
| if !issetStartTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")) | |
| } | |
| if !issetEndTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Paths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem142 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem142 = v | |
| } | |
| p.Paths = append(p.Paths, _elem142) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.StartTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.EndTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.EnableRedirectQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.JdbcQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 10: ", err) | |
| } else { | |
| p.LegalPathNodes = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSRawDataQueryReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Paths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:startTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.startTime (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:startTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:endTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.endTime (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:endTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableRedirectQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetJdbcQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetLegalPathNodes() { | |
| if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:legalPathNodes: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (10) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:legalPathNodes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Paths) != len(other.Paths) { return false } | |
| for i, _tgt := range p.Paths { | |
| _src143 := other.Paths[i] | |
| if _tgt != _src143 { return false } | |
| } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.StartTime != other.StartTime { return false } | |
| if p.EndTime != other.EndTime { return false } | |
| if p.StatementId != other.StatementId { return false } | |
| if p.EnableRedirectQuery != other.EnableRedirectQuery { | |
| if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { | |
| return false | |
| } | |
| if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } | |
| } | |
| if p.JdbcQuery != other.JdbcQuery { | |
| if p.JdbcQuery == nil || other.JdbcQuery == nil { | |
| return false | |
| } | |
| if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.LegalPathNodes != other.LegalPathNodes { | |
| if p.LegalPathNodes == nil || other.LegalPathNodes == nil { | |
| return false | |
| } | |
| if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSRawDataQueryReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSRawDataQueryReq(%+v)", *p) | |
| } | |
| func (p *TSRawDataQueryReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSRawDataQueryReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSRawDataQueryReq)(nil) | |
| func (p *TSRawDataQueryReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Paths | |
| // - FetchSize | |
| // - Time | |
| // - StatementId | |
| // - EnableRedirectQuery | |
| // - JdbcQuery | |
| // - Timeout | |
| // - LegalPathNodes | |
| // | |
| type TSLastDataQueryReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` | |
| FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` | |
| Time int64 `thrift:"time,4,required" db:"time" json:"time"` | |
| StatementId int64 `thrift:"statementId,5,required" db:"statementId" json:"statementId"` | |
| EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` | |
| JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"` | |
| Timeout *int64 `thrift:"timeout,8" db:"timeout" json:"timeout,omitempty"` | |
| LegalPathNodes *bool `thrift:"legalPathNodes,9" db:"legalPathNodes" json:"legalPathNodes,omitempty"` | |
| } | |
| func NewTSLastDataQueryReq() *TSLastDataQueryReq { | |
| return &TSLastDataQueryReq{} | |
| } | |
| func (p *TSLastDataQueryReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSLastDataQueryReq) GetPaths() []string { | |
| return p.Paths | |
| } | |
| var TSLastDataQueryReq_FetchSize_DEFAULT int32 | |
| func (p *TSLastDataQueryReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSLastDataQueryReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| func (p *TSLastDataQueryReq) GetTime() int64 { | |
| return p.Time | |
| } | |
| func (p *TSLastDataQueryReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| var TSLastDataQueryReq_EnableRedirectQuery_DEFAULT bool | |
| func (p *TSLastDataQueryReq) GetEnableRedirectQuery() bool { | |
| if !p.IsSetEnableRedirectQuery() { | |
| return TSLastDataQueryReq_EnableRedirectQuery_DEFAULT | |
| } | |
| return *p.EnableRedirectQuery | |
| } | |
| var TSLastDataQueryReq_JdbcQuery_DEFAULT bool | |
| func (p *TSLastDataQueryReq) GetJdbcQuery() bool { | |
| if !p.IsSetJdbcQuery() { | |
| return TSLastDataQueryReq_JdbcQuery_DEFAULT | |
| } | |
| return *p.JdbcQuery | |
| } | |
| var TSLastDataQueryReq_Timeout_DEFAULT int64 | |
| func (p *TSLastDataQueryReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSLastDataQueryReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSLastDataQueryReq_LegalPathNodes_DEFAULT bool | |
| func (p *TSLastDataQueryReq) GetLegalPathNodes() bool { | |
| if !p.IsSetLegalPathNodes() { | |
| return TSLastDataQueryReq_LegalPathNodes_DEFAULT | |
| } | |
| return *p.LegalPathNodes | |
| } | |
| func (p *TSLastDataQueryReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSLastDataQueryReq) IsSetEnableRedirectQuery() bool { | |
| return p.EnableRedirectQuery != nil | |
| } | |
| func (p *TSLastDataQueryReq) IsSetJdbcQuery() bool { | |
| return p.JdbcQuery != nil | |
| } | |
| func (p *TSLastDataQueryReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSLastDataQueryReq) IsSetLegalPathNodes() bool { | |
| return p.LegalPathNodes != nil | |
| } | |
| func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPaths bool = false; | |
| var issetTime bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")) | |
| } | |
| if !issetTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Paths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem144 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem144 = v | |
| } | |
| p.Paths = append(p.Paths, _elem144) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Time = v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.EnableRedirectQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.JdbcQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.LegalPathNodes = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSLastDataQueryReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Paths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "time", thrift.I64, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:time: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.Time)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.time (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:time: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableRedirectQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetJdbcQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetLegalPathNodes() { | |
| if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:legalPathNodes: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:legalPathNodes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Paths) != len(other.Paths) { return false } | |
| for i, _tgt := range p.Paths { | |
| _src145 := other.Paths[i] | |
| if _tgt != _src145 { return false } | |
| } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.Time != other.Time { return false } | |
| if p.StatementId != other.StatementId { return false } | |
| if p.EnableRedirectQuery != other.EnableRedirectQuery { | |
| if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { | |
| return false | |
| } | |
| if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } | |
| } | |
| if p.JdbcQuery != other.JdbcQuery { | |
| if p.JdbcQuery == nil || other.JdbcQuery == nil { | |
| return false | |
| } | |
| if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.LegalPathNodes != other.LegalPathNodes { | |
| if p.LegalPathNodes == nil || other.LegalPathNodes == nil { | |
| return false | |
| } | |
| if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSLastDataQueryReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p) | |
| } | |
| func (p *TSLastDataQueryReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSLastDataQueryReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSLastDataQueryReq)(nil) | |
| func (p *TSLastDataQueryReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Prefixes | |
| // - FetchSize | |
| // - StatementId | |
| // - EnableRedirectQuery | |
| // - JdbcQuery | |
| // - Timeout | |
| // | |
| type TSFastLastDataQueryForOnePrefixPathReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Prefixes []string `thrift:"prefixes,2,required" db:"prefixes" json:"prefixes"` | |
| FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` | |
| StatementId int64 `thrift:"statementId,4,required" db:"statementId" json:"statementId"` | |
| EnableRedirectQuery *bool `thrift:"enableRedirectQuery,5" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` | |
| JdbcQuery *bool `thrift:"jdbcQuery,6" db:"jdbcQuery" json:"jdbcQuery,omitempty"` | |
| Timeout *int64 `thrift:"timeout,7" db:"timeout" json:"timeout,omitempty"` | |
| } | |
| func NewTSFastLastDataQueryForOnePrefixPathReq() *TSFastLastDataQueryForOnePrefixPathReq { | |
| return &TSFastLastDataQueryForOnePrefixPathReq{} | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetPrefixes() []string { | |
| return p.Prefixes | |
| } | |
| var TSFastLastDataQueryForOnePrefixPathReq_FetchSize_DEFAULT int32 | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSFastLastDataQueryForOnePrefixPathReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| var TSFastLastDataQueryForOnePrefixPathReq_EnableRedirectQuery_DEFAULT bool | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetEnableRedirectQuery() bool { | |
| if !p.IsSetEnableRedirectQuery() { | |
| return TSFastLastDataQueryForOnePrefixPathReq_EnableRedirectQuery_DEFAULT | |
| } | |
| return *p.EnableRedirectQuery | |
| } | |
| var TSFastLastDataQueryForOnePrefixPathReq_JdbcQuery_DEFAULT bool | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetJdbcQuery() bool { | |
| if !p.IsSetJdbcQuery() { | |
| return TSFastLastDataQueryForOnePrefixPathReq_JdbcQuery_DEFAULT | |
| } | |
| return *p.JdbcQuery | |
| } | |
| var TSFastLastDataQueryForOnePrefixPathReq_Timeout_DEFAULT int64 | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSFastLastDataQueryForOnePrefixPathReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) IsSetEnableRedirectQuery() bool { | |
| return p.EnableRedirectQuery != nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) IsSetJdbcQuery() bool { | |
| return p.JdbcQuery != nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixes bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixes = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixes{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Prefixes is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Prefixes = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem146 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem146 = v | |
| } | |
| p.Prefixes = append(p.Prefixes, _elem146) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.EnableRedirectQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.JdbcQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFastLastDataQueryForOnePrefixPathReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixes", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixes: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Prefixes)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Prefixes { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixes: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableRedirectQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:enableRedirectQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:enableRedirectQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetJdbcQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:jdbcQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:jdbcQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) Equals(other *TSFastLastDataQueryForOnePrefixPathReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Prefixes) != len(other.Prefixes) { return false } | |
| for i, _tgt := range p.Prefixes { | |
| _src147 := other.Prefixes[i] | |
| if _tgt != _src147 { return false } | |
| } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.StatementId != other.StatementId { return false } | |
| if p.EnableRedirectQuery != other.EnableRedirectQuery { | |
| if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { | |
| return false | |
| } | |
| if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } | |
| } | |
| if p.JdbcQuery != other.JdbcQuery { | |
| if p.JdbcQuery == nil || other.JdbcQuery == nil { | |
| return false | |
| } | |
| if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFastLastDataQueryForOnePrefixPathReq(%+v)", *p) | |
| } | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFastLastDataQueryForOnePrefixPathReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFastLastDataQueryForOnePrefixPathReq)(nil) | |
| func (p *TSFastLastDataQueryForOnePrefixPathReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Db | |
| // - DeviceId | |
| // - Sensors | |
| // - FetchSize | |
| // - StatementId | |
| // - EnableRedirectQuery | |
| // - JdbcQuery | |
| // - Timeout | |
| // - LegalPathNodes | |
| // | |
| type TSFastLastDataQueryForOneDeviceReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Db string `thrift:"db,2,required" db:"db" json:"db"` | |
| DeviceId string `thrift:"deviceId,3,required" db:"deviceId" json:"deviceId"` | |
| Sensors []string `thrift:"sensors,4,required" db:"sensors" json:"sensors"` | |
| FetchSize *int32 `thrift:"fetchSize,5" db:"fetchSize" json:"fetchSize,omitempty"` | |
| StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"` | |
| EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` | |
| JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"` | |
| Timeout *int64 `thrift:"timeout,9" db:"timeout" json:"timeout,omitempty"` | |
| LegalPathNodes *bool `thrift:"legalPathNodes,10" db:"legalPathNodes" json:"legalPathNodes,omitempty"` | |
| } | |
| func NewTSFastLastDataQueryForOneDeviceReq() *TSFastLastDataQueryForOneDeviceReq { | |
| return &TSFastLastDataQueryForOneDeviceReq{} | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetDb() string { | |
| return p.Db | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetDeviceId() string { | |
| return p.DeviceId | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetSensors() []string { | |
| return p.Sensors | |
| } | |
| var TSFastLastDataQueryForOneDeviceReq_FetchSize_DEFAULT int32 | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSFastLastDataQueryForOneDeviceReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| var TSFastLastDataQueryForOneDeviceReq_EnableRedirectQuery_DEFAULT bool | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetEnableRedirectQuery() bool { | |
| if !p.IsSetEnableRedirectQuery() { | |
| return TSFastLastDataQueryForOneDeviceReq_EnableRedirectQuery_DEFAULT | |
| } | |
| return *p.EnableRedirectQuery | |
| } | |
| var TSFastLastDataQueryForOneDeviceReq_JdbcQuery_DEFAULT bool | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetJdbcQuery() bool { | |
| if !p.IsSetJdbcQuery() { | |
| return TSFastLastDataQueryForOneDeviceReq_JdbcQuery_DEFAULT | |
| } | |
| return *p.JdbcQuery | |
| } | |
| var TSFastLastDataQueryForOneDeviceReq_Timeout_DEFAULT int64 | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSFastLastDataQueryForOneDeviceReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSFastLastDataQueryForOneDeviceReq_LegalPathNodes_DEFAULT bool | |
| func (p *TSFastLastDataQueryForOneDeviceReq) GetLegalPathNodes() bool { | |
| if !p.IsSetLegalPathNodes() { | |
| return TSFastLastDataQueryForOneDeviceReq_LegalPathNodes_DEFAULT | |
| } | |
| return *p.LegalPathNodes | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) IsSetEnableRedirectQuery() bool { | |
| return p.EnableRedirectQuery != nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) IsSetJdbcQuery() bool { | |
| return p.JdbcQuery != nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) IsSetLegalPathNodes() bool { | |
| return p.LegalPathNodes != nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetDb bool = false; | |
| var issetDeviceId bool = false; | |
| var issetSensors bool = false; | |
| var issetStatementId bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDb = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDeviceId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSensors = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetDb{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Db is not set")) | |
| } | |
| if !issetDeviceId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DeviceId is not set")) | |
| } | |
| if !issetSensors{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Sensors is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Db = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.DeviceId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Sensors = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem148 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem148 = v | |
| } | |
| p.Sensors = append(p.Sensors, _elem148) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.EnableRedirectQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.JdbcQuery = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 10: ", err) | |
| } else { | |
| p.LegalPathNodes = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSFastLastDataQueryForOneDeviceReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "db", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:db: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Db)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.db (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:db: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "deviceId", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:deviceId: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.DeviceId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.deviceId (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:deviceId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sensors", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:sensors: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Sensors)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Sensors { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:sensors: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableRedirectQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetJdbcQuery() { | |
| if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetLegalPathNodes() { | |
| if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:legalPathNodes: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (10) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:legalPathNodes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) Equals(other *TSFastLastDataQueryForOneDeviceReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Db != other.Db { return false } | |
| if p.DeviceId != other.DeviceId { return false } | |
| if len(p.Sensors) != len(other.Sensors) { return false } | |
| for i, _tgt := range p.Sensors { | |
| _src149 := other.Sensors[i] | |
| if _tgt != _src149 { return false } | |
| } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.StatementId != other.StatementId { return false } | |
| if p.EnableRedirectQuery != other.EnableRedirectQuery { | |
| if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { | |
| return false | |
| } | |
| if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } | |
| } | |
| if p.JdbcQuery != other.JdbcQuery { | |
| if p.JdbcQuery == nil || other.JdbcQuery == nil { | |
| return false | |
| } | |
| if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.LegalPathNodes != other.LegalPathNodes { | |
| if p.LegalPathNodes == nil || other.LegalPathNodes == nil { | |
| return false | |
| } | |
| if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSFastLastDataQueryForOneDeviceReq(%+v)", *p) | |
| } | |
| func (p *TSFastLastDataQueryForOneDeviceReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSFastLastDataQueryForOneDeviceReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSFastLastDataQueryForOneDeviceReq)(nil) | |
| func (p *TSFastLastDataQueryForOneDeviceReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - StatementId | |
| // - Paths | |
| // - Aggregations | |
| // - StartTime | |
| // - EndTime | |
| // - Interval | |
| // - SlidingStep | |
| // - FetchSize | |
| // - Timeout | |
| // - LegalPathNodes | |
| // | |
| type TSAggregationQueryReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| StatementId int64 `thrift:"statementId,2,required" db:"statementId" json:"statementId"` | |
| Paths []string `thrift:"paths,3,required" db:"paths" json:"paths"` | |
| Aggregations []common.TAggregationType `thrift:"aggregations,4,required" db:"aggregations" json:"aggregations"` | |
| StartTime *int64 `thrift:"startTime,5" db:"startTime" json:"startTime,omitempty"` | |
| EndTime *int64 `thrift:"endTime,6" db:"endTime" json:"endTime,omitempty"` | |
| Interval *int64 `thrift:"interval,7" db:"interval" json:"interval,omitempty"` | |
| SlidingStep *int64 `thrift:"slidingStep,8" db:"slidingStep" json:"slidingStep,omitempty"` | |
| FetchSize *int32 `thrift:"fetchSize,9" db:"fetchSize" json:"fetchSize,omitempty"` | |
| Timeout *int64 `thrift:"timeout,10" db:"timeout" json:"timeout,omitempty"` | |
| LegalPathNodes *bool `thrift:"legalPathNodes,11" db:"legalPathNodes" json:"legalPathNodes,omitempty"` | |
| } | |
| func NewTSAggregationQueryReq() *TSAggregationQueryReq { | |
| return &TSAggregationQueryReq{} | |
| } | |
| func (p *TSAggregationQueryReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSAggregationQueryReq) GetStatementId() int64 { | |
| return p.StatementId | |
| } | |
| func (p *TSAggregationQueryReq) GetPaths() []string { | |
| return p.Paths | |
| } | |
| func (p *TSAggregationQueryReq) GetAggregations() []common.TAggregationType { | |
| return p.Aggregations | |
| } | |
| var TSAggregationQueryReq_StartTime_DEFAULT int64 | |
| func (p *TSAggregationQueryReq) GetStartTime() int64 { | |
| if !p.IsSetStartTime() { | |
| return TSAggregationQueryReq_StartTime_DEFAULT | |
| } | |
| return *p.StartTime | |
| } | |
| var TSAggregationQueryReq_EndTime_DEFAULT int64 | |
| func (p *TSAggregationQueryReq) GetEndTime() int64 { | |
| if !p.IsSetEndTime() { | |
| return TSAggregationQueryReq_EndTime_DEFAULT | |
| } | |
| return *p.EndTime | |
| } | |
| var TSAggregationQueryReq_Interval_DEFAULT int64 | |
| func (p *TSAggregationQueryReq) GetInterval() int64 { | |
| if !p.IsSetInterval() { | |
| return TSAggregationQueryReq_Interval_DEFAULT | |
| } | |
| return *p.Interval | |
| } | |
| var TSAggregationQueryReq_SlidingStep_DEFAULT int64 | |
| func (p *TSAggregationQueryReq) GetSlidingStep() int64 { | |
| if !p.IsSetSlidingStep() { | |
| return TSAggregationQueryReq_SlidingStep_DEFAULT | |
| } | |
| return *p.SlidingStep | |
| } | |
| var TSAggregationQueryReq_FetchSize_DEFAULT int32 | |
| func (p *TSAggregationQueryReq) GetFetchSize() int32 { | |
| if !p.IsSetFetchSize() { | |
| return TSAggregationQueryReq_FetchSize_DEFAULT | |
| } | |
| return *p.FetchSize | |
| } | |
| var TSAggregationQueryReq_Timeout_DEFAULT int64 | |
| func (p *TSAggregationQueryReq) GetTimeout() int64 { | |
| if !p.IsSetTimeout() { | |
| return TSAggregationQueryReq_Timeout_DEFAULT | |
| } | |
| return *p.Timeout | |
| } | |
| var TSAggregationQueryReq_LegalPathNodes_DEFAULT bool | |
| func (p *TSAggregationQueryReq) GetLegalPathNodes() bool { | |
| if !p.IsSetLegalPathNodes() { | |
| return TSAggregationQueryReq_LegalPathNodes_DEFAULT | |
| } | |
| return *p.LegalPathNodes | |
| } | |
| func (p *TSAggregationQueryReq) IsSetStartTime() bool { | |
| return p.StartTime != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetEndTime() bool { | |
| return p.EndTime != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetInterval() bool { | |
| return p.Interval != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetSlidingStep() bool { | |
| return p.SlidingStep != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetFetchSize() bool { | |
| return p.FetchSize != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetTimeout() bool { | |
| return p.Timeout != nil | |
| } | |
| func (p *TSAggregationQueryReq) IsSetLegalPathNodes() bool { | |
| return p.LegalPathNodes != nil | |
| } | |
| func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetStatementId bool = false; | |
| var issetPaths bool = false; | |
| var issetAggregations bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatementId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetAggregations = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 10: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField10(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 11: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField11(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetStatementId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")) | |
| } | |
| if !issetPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")) | |
| } | |
| if !issetAggregations{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Aggregations is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.StatementId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Paths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem150 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem150 = v | |
| } | |
| p.Paths = append(p.Paths, _elem150) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]common.TAggregationType, 0, size) | |
| p.Aggregations = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem151 common.TAggregationType | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| temp := common.TAggregationType(v) | |
| _elem151 = temp | |
| } | |
| p.Aggregations = append(p.Aggregations, _elem151) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.StartTime = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.EndTime = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.Interval = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.SlidingStep = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 9: ", err) | |
| } else { | |
| p.FetchSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 10: ", err) | |
| } else { | |
| p.Timeout = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 11: ", err) | |
| } else { | |
| p.LegalPathNodes = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSAggregationQueryReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| if err := p.writeField10(ctx, oprot); err != nil { return err } | |
| if err := p.writeField11(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAggregationQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.statementId (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statementId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:paths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Paths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:paths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "aggregations", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:aggregations: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Aggregations)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Aggregations { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:aggregations: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetStartTime() { | |
| if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:startTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.StartTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.startTime (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:startTime: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEndTime() { | |
| if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:endTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.EndTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.endTime (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:endTime: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetInterval() { | |
| if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:interval: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Interval)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.interval (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:interval: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSlidingStep() { | |
| if err := oprot.WriteFieldBegin(ctx, "slidingStep", thrift.I64, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:slidingStep: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.SlidingStep)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.slidingStep (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:slidingStep: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetFetchSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:fetchSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fetchSize (9) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:fetchSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTimeout() { | |
| if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 10); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timeout: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timeout (10) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timeout: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetLegalPathNodes() { | |
| if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 11); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:legalPathNodes: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (11) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 11:legalPathNodes: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.StatementId != other.StatementId { return false } | |
| if len(p.Paths) != len(other.Paths) { return false } | |
| for i, _tgt := range p.Paths { | |
| _src152 := other.Paths[i] | |
| if _tgt != _src152 { return false } | |
| } | |
| if len(p.Aggregations) != len(other.Aggregations) { return false } | |
| for i, _tgt := range p.Aggregations { | |
| _src153 := other.Aggregations[i] | |
| if _tgt != _src153 { return false } | |
| } | |
| if p.StartTime != other.StartTime { | |
| if p.StartTime == nil || other.StartTime == nil { | |
| return false | |
| } | |
| if (*p.StartTime) != (*other.StartTime) { return false } | |
| } | |
| if p.EndTime != other.EndTime { | |
| if p.EndTime == nil || other.EndTime == nil { | |
| return false | |
| } | |
| if (*p.EndTime) != (*other.EndTime) { return false } | |
| } | |
| if p.Interval != other.Interval { | |
| if p.Interval == nil || other.Interval == nil { | |
| return false | |
| } | |
| if (*p.Interval) != (*other.Interval) { return false } | |
| } | |
| if p.SlidingStep != other.SlidingStep { | |
| if p.SlidingStep == nil || other.SlidingStep == nil { | |
| return false | |
| } | |
| if (*p.SlidingStep) != (*other.SlidingStep) { return false } | |
| } | |
| if p.FetchSize != other.FetchSize { | |
| if p.FetchSize == nil || other.FetchSize == nil { | |
| return false | |
| } | |
| if (*p.FetchSize) != (*other.FetchSize) { return false } | |
| } | |
| if p.Timeout != other.Timeout { | |
| if p.Timeout == nil || other.Timeout == nil { | |
| return false | |
| } | |
| if (*p.Timeout) != (*other.Timeout) { return false } | |
| } | |
| if p.LegalPathNodes != other.LegalPathNodes { | |
| if p.LegalPathNodes == nil || other.LegalPathNodes == nil { | |
| return false | |
| } | |
| if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSAggregationQueryReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSAggregationQueryReq(%+v)", *p) | |
| } | |
| func (p *TSAggregationQueryReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSAggregationQueryReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSAggregationQueryReq)(nil) | |
| func (p *TSAggregationQueryReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Paths | |
| // - DataTypes | |
| // - Encodings | |
| // - Compressors | |
| // - PropsList | |
| // - TagsList | |
| // - AttributesList | |
| // - MeasurementAliasList | |
| // | |
| type TSCreateMultiTimeseriesReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` | |
| DataTypes []int32 `thrift:"dataTypes,3,required" db:"dataTypes" json:"dataTypes"` | |
| Encodings []int32 `thrift:"encodings,4,required" db:"encodings" json:"encodings"` | |
| Compressors []int32 `thrift:"compressors,5,required" db:"compressors" json:"compressors"` | |
| PropsList []map[string]string `thrift:"propsList,6" db:"propsList" json:"propsList,omitempty"` | |
| TagsList []map[string]string `thrift:"tagsList,7" db:"tagsList" json:"tagsList,omitempty"` | |
| AttributesList []map[string]string `thrift:"attributesList,8" db:"attributesList" json:"attributesList,omitempty"` | |
| MeasurementAliasList []string `thrift:"measurementAliasList,9" db:"measurementAliasList" json:"measurementAliasList,omitempty"` | |
| } | |
| func NewTSCreateMultiTimeseriesReq() *TSCreateMultiTimeseriesReq { | |
| return &TSCreateMultiTimeseriesReq{} | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) GetPaths() []string { | |
| return p.Paths | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) GetDataTypes() []int32 { | |
| return p.DataTypes | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) GetEncodings() []int32 { | |
| return p.Encodings | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) GetCompressors() []int32 { | |
| return p.Compressors | |
| } | |
| var TSCreateMultiTimeseriesReq_PropsList_DEFAULT []map[string]string | |
| func (p *TSCreateMultiTimeseriesReq) GetPropsList() []map[string]string { | |
| return p.PropsList | |
| } | |
| var TSCreateMultiTimeseriesReq_TagsList_DEFAULT []map[string]string | |
| func (p *TSCreateMultiTimeseriesReq) GetTagsList() []map[string]string { | |
| return p.TagsList | |
| } | |
| var TSCreateMultiTimeseriesReq_AttributesList_DEFAULT []map[string]string | |
| func (p *TSCreateMultiTimeseriesReq) GetAttributesList() []map[string]string { | |
| return p.AttributesList | |
| } | |
| var TSCreateMultiTimeseriesReq_MeasurementAliasList_DEFAULT []string | |
| func (p *TSCreateMultiTimeseriesReq) GetMeasurementAliasList() []string { | |
| return p.MeasurementAliasList | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) IsSetPropsList() bool { | |
| return p.PropsList != nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) IsSetTagsList() bool { | |
| return p.TagsList != nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) IsSetAttributesList() bool { | |
| return p.AttributesList != nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) IsSetMeasurementAliasList() bool { | |
| return p.MeasurementAliasList != nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPaths bool = false; | |
| var issetDataTypes bool = false; | |
| var issetEncodings bool = false; | |
| var issetCompressors bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPaths = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDataTypes = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEncodings = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetCompressors = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 9: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField9(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPaths{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")) | |
| } | |
| if !issetDataTypes{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")) | |
| } | |
| if !issetEncodings{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")) | |
| } | |
| if !issetCompressors{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Paths = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem154 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem154 = v | |
| } | |
| p.Paths = append(p.Paths, _elem154) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.DataTypes = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem155 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem155 = v | |
| } | |
| p.DataTypes = append(p.DataTypes, _elem155) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Encodings = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem156 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem156 = v | |
| } | |
| p.Encodings = append(p.Encodings, _elem156) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Compressors = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem157 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem157 = v | |
| } | |
| p.Compressors = append(p.Compressors, _elem157) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]map[string]string, 0, size) | |
| p.PropsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| _elem158 := tMap | |
| for i := 0; i < size; i++ { | |
| var _key159 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key159 = v | |
| } | |
| var _val160 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val160 = v | |
| } | |
| _elem158[_key159] = _val160 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| p.PropsList = append(p.PropsList, _elem158) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]map[string]string, 0, size) | |
| p.TagsList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| _elem161 := tMap | |
| for i := 0; i < size; i++ { | |
| var _key162 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key162 = v | |
| } | |
| var _val163 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val163 = v | |
| } | |
| _elem161[_key162] = _val163 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| p.TagsList = append(p.TagsList, _elem161) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]map[string]string, 0, size) | |
| p.AttributesList = tSlice | |
| for i := 0; i < size; i++ { | |
| _, _, size, err := iprot.ReadMapBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading map begin: ", err) | |
| } | |
| tMap := make(map[string]string, size) | |
| _elem164 := tMap | |
| for i := 0; i < size; i++ { | |
| var _key165 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _key165 = v | |
| } | |
| var _val166 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _val166 = v | |
| } | |
| _elem164[_key165] = _val166 | |
| } | |
| if err := iprot.ReadMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading map end: ", err) | |
| } | |
| p.AttributesList = append(p.AttributesList, _elem164) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.MeasurementAliasList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem167 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem167 = v | |
| } | |
| p.MeasurementAliasList = append(p.MeasurementAliasList, _elem167) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCreateMultiTimeseriesReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| if err := p.writeField9(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Paths { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataTypes: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.DataTypes { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataTypes: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encodings: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Encodings { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encodings: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressors: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Compressors { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressors: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetPropsList() { | |
| if err := oprot.WriteFieldBegin(ctx, "propsList", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:propsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.PropsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.PropsList { | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range v { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:propsList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetTagsList() { | |
| if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tagsList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.TagsList { | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range v { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tagsList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetAttributesList() { | |
| if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributesList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.AttributesList { | |
| if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { | |
| return thrift.PrependError("error writing map begin: ", err) | |
| } | |
| for k, v := range v { | |
| if err := oprot.WriteString(ctx, string(k)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteMapEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing map end: ", err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributesList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMeasurementAliasList() { | |
| if err := oprot.WriteFieldBegin(ctx, "measurementAliasList", thrift.LIST, 9); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAliasList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAliasList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.MeasurementAliasList { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAliasList: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) Equals(other *TSCreateMultiTimeseriesReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.Paths) != len(other.Paths) { return false } | |
| for i, _tgt := range p.Paths { | |
| _src168 := other.Paths[i] | |
| if _tgt != _src168 { return false } | |
| } | |
| if len(p.DataTypes) != len(other.DataTypes) { return false } | |
| for i, _tgt := range p.DataTypes { | |
| _src169 := other.DataTypes[i] | |
| if _tgt != _src169 { return false } | |
| } | |
| if len(p.Encodings) != len(other.Encodings) { return false } | |
| for i, _tgt := range p.Encodings { | |
| _src170 := other.Encodings[i] | |
| if _tgt != _src170 { return false } | |
| } | |
| if len(p.Compressors) != len(other.Compressors) { return false } | |
| for i, _tgt := range p.Compressors { | |
| _src171 := other.Compressors[i] | |
| if _tgt != _src171 { return false } | |
| } | |
| if len(p.PropsList) != len(other.PropsList) { return false } | |
| for i, _tgt := range p.PropsList { | |
| _src172 := other.PropsList[i] | |
| if len(_tgt) != len(_src172) { return false } | |
| for k, _tgt := range _tgt { | |
| _src173 := _src172[k] | |
| if _tgt != _src173 { return false } | |
| } | |
| } | |
| if len(p.TagsList) != len(other.TagsList) { return false } | |
| for i, _tgt := range p.TagsList { | |
| _src174 := other.TagsList[i] | |
| if len(_tgt) != len(_src174) { return false } | |
| for k, _tgt := range _tgt { | |
| _src175 := _src174[k] | |
| if _tgt != _src175 { return false } | |
| } | |
| } | |
| if len(p.AttributesList) != len(other.AttributesList) { return false } | |
| for i, _tgt := range p.AttributesList { | |
| _src176 := other.AttributesList[i] | |
| if len(_tgt) != len(_src176) { return false } | |
| for k, _tgt := range _tgt { | |
| _src177 := _src176[k] | |
| if _tgt != _src177 { return false } | |
| } | |
| } | |
| if len(p.MeasurementAliasList) != len(other.MeasurementAliasList) { return false } | |
| for i, _tgt := range p.MeasurementAliasList { | |
| _src178 := other.MeasurementAliasList[i] | |
| if _tgt != _src178 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCreateMultiTimeseriesReq(%+v)", *p) | |
| } | |
| func (p *TSCreateMultiTimeseriesReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCreateMultiTimeseriesReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCreateMultiTimeseriesReq)(nil) | |
| func (p *TSCreateMultiTimeseriesReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Version | |
| // - SupportedTimeAggregationOperations | |
| // - TimestampPrecision | |
| // - MaxConcurrentClientNum | |
| // - ThriftMaxFrameSize | |
| // - IsReadOnly | |
| // - BuildInfo | |
| // - Logo | |
| // | |
| type ServerProperties struct { | |
| Version string `thrift:"version,1,required" db:"version" json:"version"` | |
| SupportedTimeAggregationOperations []string `thrift:"supportedTimeAggregationOperations,2,required" db:"supportedTimeAggregationOperations" json:"supportedTimeAggregationOperations"` | |
| TimestampPrecision string `thrift:"timestampPrecision,3,required" db:"timestampPrecision" json:"timestampPrecision"` | |
| MaxConcurrentClientNum int32 `thrift:"maxConcurrentClientNum,4" db:"maxConcurrentClientNum" json:"maxConcurrentClientNum"` | |
| ThriftMaxFrameSize *int32 `thrift:"thriftMaxFrameSize,5" db:"thriftMaxFrameSize" json:"thriftMaxFrameSize,omitempty"` | |
| IsReadOnly *bool `thrift:"isReadOnly,6" db:"isReadOnly" json:"isReadOnly,omitempty"` | |
| BuildInfo *string `thrift:"buildInfo,7" db:"buildInfo" json:"buildInfo,omitempty"` | |
| Logo *string `thrift:"logo,8" db:"logo" json:"logo,omitempty"` | |
| } | |
| func NewServerProperties() *ServerProperties { | |
| return &ServerProperties{} | |
| } | |
| func (p *ServerProperties) GetVersion() string { | |
| return p.Version | |
| } | |
| func (p *ServerProperties) GetSupportedTimeAggregationOperations() []string { | |
| return p.SupportedTimeAggregationOperations | |
| } | |
| func (p *ServerProperties) GetTimestampPrecision() string { | |
| return p.TimestampPrecision | |
| } | |
| func (p *ServerProperties) GetMaxConcurrentClientNum() int32 { | |
| return p.MaxConcurrentClientNum | |
| } | |
| var ServerProperties_ThriftMaxFrameSize_DEFAULT int32 | |
| func (p *ServerProperties) GetThriftMaxFrameSize() int32 { | |
| if !p.IsSetThriftMaxFrameSize() { | |
| return ServerProperties_ThriftMaxFrameSize_DEFAULT | |
| } | |
| return *p.ThriftMaxFrameSize | |
| } | |
| var ServerProperties_IsReadOnly_DEFAULT bool | |
| func (p *ServerProperties) GetIsReadOnly() bool { | |
| if !p.IsSetIsReadOnly() { | |
| return ServerProperties_IsReadOnly_DEFAULT | |
| } | |
| return *p.IsReadOnly | |
| } | |
| var ServerProperties_BuildInfo_DEFAULT string | |
| func (p *ServerProperties) GetBuildInfo() string { | |
| if !p.IsSetBuildInfo() { | |
| return ServerProperties_BuildInfo_DEFAULT | |
| } | |
| return *p.BuildInfo | |
| } | |
| var ServerProperties_Logo_DEFAULT string | |
| func (p *ServerProperties) GetLogo() string { | |
| if !p.IsSetLogo() { | |
| return ServerProperties_Logo_DEFAULT | |
| } | |
| return *p.Logo | |
| } | |
| func (p *ServerProperties) IsSetThriftMaxFrameSize() bool { | |
| return p.ThriftMaxFrameSize != nil | |
| } | |
| func (p *ServerProperties) IsSetIsReadOnly() bool { | |
| return p.IsReadOnly != nil | |
| } | |
| func (p *ServerProperties) IsSetBuildInfo() bool { | |
| return p.BuildInfo != nil | |
| } | |
| func (p *ServerProperties) IsSetLogo() bool { | |
| return p.Logo != nil | |
| } | |
| func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetVersion bool = false; | |
| var issetSupportedTimeAggregationOperations bool = false; | |
| var issetTimestampPrecision bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSupportedTimeAggregationOperations = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTimestampPrecision = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 8: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField8(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) | |
| } | |
| if !issetSupportedTimeAggregationOperations{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SupportedTimeAggregationOperations is not set")) | |
| } | |
| if !issetTimestampPrecision{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimestampPrecision is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.Version = v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.SupportedTimeAggregationOperations = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem179 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem179 = v | |
| } | |
| p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem179) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.TimestampPrecision = v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.MaxConcurrentClientNum = v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 5: ", err) | |
| } else { | |
| p.ThriftMaxFrameSize = &v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 6: ", err) | |
| } else { | |
| p.IsReadOnly = &v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 7: ", err) | |
| } else { | |
| p.BuildInfo = &v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 8: ", err) | |
| } else { | |
| p.Logo = &v | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "ServerProperties"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| if err := p.writeField8(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *ServerProperties) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "version", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Version)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.version (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:version: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "supportedTimeAggregationOperations", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:supportedTimeAggregationOperations: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SupportedTimeAggregationOperations)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.SupportedTimeAggregationOperations { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:supportedTimeAggregationOperations: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "timestampPrecision", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestampPrecision: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TimestampPrecision)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.timestampPrecision (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestampPrecision: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "maxConcurrentClientNum", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:maxConcurrentClientNum: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.MaxConcurrentClientNum)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.maxConcurrentClientNum (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:maxConcurrentClientNum: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetThriftMaxFrameSize() { | |
| if err := oprot.WriteFieldBegin(ctx, "thriftMaxFrameSize", thrift.I32, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:thriftMaxFrameSize: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.ThriftMaxFrameSize)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.thriftMaxFrameSize (5) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:thriftMaxFrameSize: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetIsReadOnly() { | |
| if err := oprot.WriteFieldBegin(ctx, "isReadOnly", thrift.BOOL, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isReadOnly: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.IsReadOnly)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isReadOnly (6) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isReadOnly: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetBuildInfo() { | |
| if err := oprot.WriteFieldBegin(ctx, "buildInfo", thrift.STRING, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:buildInfo: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.BuildInfo)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.buildInfo (7) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:buildInfo: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetLogo() { | |
| if err := oprot.WriteFieldBegin(ctx, "logo", thrift.STRING, 8); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:logo: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.Logo)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.logo (8) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 8:logo: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *ServerProperties) Equals(other *ServerProperties) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.Version != other.Version { return false } | |
| if len(p.SupportedTimeAggregationOperations) != len(other.SupportedTimeAggregationOperations) { return false } | |
| for i, _tgt := range p.SupportedTimeAggregationOperations { | |
| _src180 := other.SupportedTimeAggregationOperations[i] | |
| if _tgt != _src180 { return false } | |
| } | |
| if p.TimestampPrecision != other.TimestampPrecision { return false } | |
| if p.MaxConcurrentClientNum != other.MaxConcurrentClientNum { return false } | |
| if p.ThriftMaxFrameSize != other.ThriftMaxFrameSize { | |
| if p.ThriftMaxFrameSize == nil || other.ThriftMaxFrameSize == nil { | |
| return false | |
| } | |
| if (*p.ThriftMaxFrameSize) != (*other.ThriftMaxFrameSize) { return false } | |
| } | |
| if p.IsReadOnly != other.IsReadOnly { | |
| if p.IsReadOnly == nil || other.IsReadOnly == nil { | |
| return false | |
| } | |
| if (*p.IsReadOnly) != (*other.IsReadOnly) { return false } | |
| } | |
| if p.BuildInfo != other.BuildInfo { | |
| if p.BuildInfo == nil || other.BuildInfo == nil { | |
| return false | |
| } | |
| if (*p.BuildInfo) != (*other.BuildInfo) { return false } | |
| } | |
| if p.Logo != other.Logo { | |
| if p.Logo == nil || other.Logo == nil { | |
| return false | |
| } | |
| if (*p.Logo) != (*other.Logo) { return false } | |
| } | |
| return true | |
| } | |
| func (p *ServerProperties) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("ServerProperties(%+v)", *p) | |
| } | |
| func (p *ServerProperties) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.ServerProperties", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*ServerProperties)(nil) | |
| func (p *ServerProperties) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - TemplateName | |
| // - PrefixPath | |
| // | |
| type TSSetSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` | |
| PrefixPath string `thrift:"prefixPath,3,required" db:"prefixPath" json:"prefixPath"` | |
| } | |
| func NewTSSetSchemaTemplateReq() *TSSetSchemaTemplateReq { | |
| return &TSSetSchemaTemplateReq{} | |
| } | |
| func (p *TSSetSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSSetSchemaTemplateReq) GetTemplateName() string { | |
| return p.TemplateName | |
| } | |
| func (p *TSSetSchemaTemplateReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetTemplateName bool = false; | |
| var issetPrefixPath bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTemplateName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetTemplateName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSSetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.TemplateName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSSetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSSetSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSSetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSSetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSSetSchemaTemplateReq) Equals(other *TSSetSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.TemplateName != other.TemplateName { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| return true | |
| } | |
| func (p *TSSetSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSSetSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSSetSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSSetSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSSetSchemaTemplateReq)(nil) | |
| func (p *TSSetSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Name | |
| // - SerializedTemplate | |
| // | |
| type TSCreateSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Name string `thrift:"name,2,required" db:"name" json:"name"` | |
| SerializedTemplate []byte `thrift:"serializedTemplate,3,required" db:"serializedTemplate" json:"serializedTemplate"` | |
| } | |
| func NewTSCreateSchemaTemplateReq() *TSCreateSchemaTemplateReq { | |
| return &TSCreateSchemaTemplateReq{} | |
| } | |
| func (p *TSCreateSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSCreateSchemaTemplateReq) GetName() string { | |
| return p.Name | |
| } | |
| func (p *TSCreateSchemaTemplateReq) GetSerializedTemplate() []byte { | |
| return p.SerializedTemplate | |
| } | |
| func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetName bool = false; | |
| var issetSerializedTemplate bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSerializedTemplate = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) | |
| } | |
| if !issetSerializedTemplate{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SerializedTemplate is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Name = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.SerializedTemplate = v | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSCreateSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Name)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "serializedTemplate", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serializedTemplate: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.SerializedTemplate); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.serializedTemplate (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serializedTemplate: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Name != other.Name { return false } | |
| if bytes.Compare(p.SerializedTemplate, other.SerializedTemplate) != 0 { return false } | |
| return true | |
| } | |
| func (p *TSCreateSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSCreateSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSCreateSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSCreateSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSCreateSchemaTemplateReq)(nil) | |
| func (p *TSCreateSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Name | |
| // - IsAligned | |
| // - Measurements | |
| // - DataTypes | |
| // - Encodings | |
| // - Compressors | |
| // | |
| type TSAppendSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Name string `thrift:"name,2,required" db:"name" json:"name"` | |
| IsAligned bool `thrift:"isAligned,3,required" db:"isAligned" json:"isAligned"` | |
| Measurements []string `thrift:"measurements,4,required" db:"measurements" json:"measurements"` | |
| DataTypes []int32 `thrift:"dataTypes,5,required" db:"dataTypes" json:"dataTypes"` | |
| Encodings []int32 `thrift:"encodings,6,required" db:"encodings" json:"encodings"` | |
| Compressors []int32 `thrift:"compressors,7,required" db:"compressors" json:"compressors"` | |
| } | |
| func NewTSAppendSchemaTemplateReq() *TSAppendSchemaTemplateReq { | |
| return &TSAppendSchemaTemplateReq{} | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetName() string { | |
| return p.Name | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetIsAligned() bool { | |
| return p.IsAligned | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetDataTypes() []int32 { | |
| return p.DataTypes | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetEncodings() []int32 { | |
| return p.Encodings | |
| } | |
| func (p *TSAppendSchemaTemplateReq) GetCompressors() []int32 { | |
| return p.Compressors | |
| } | |
| func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetName bool = false; | |
| var issetIsAligned bool = false; | |
| var issetMeasurements bool = false; | |
| var issetDataTypes bool = false; | |
| var issetEncodings bool = false; | |
| var issetCompressors bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetIsAligned = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetMeasurements = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDataTypes = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 6: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField6(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetEncodings = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 7: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField7(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetCompressors = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) | |
| } | |
| if !issetIsAligned{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAligned is not set")) | |
| } | |
| if !issetMeasurements{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")) | |
| } | |
| if !issetDataTypes{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")) | |
| } | |
| if !issetEncodings{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")) | |
| } | |
| if !issetCompressors{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Name = v | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.IsAligned = v | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem181 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem181 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem181) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.DataTypes = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem182 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem182 = v | |
| } | |
| p.DataTypes = append(p.DataTypes, _elem182) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Encodings = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem183 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem183 = v | |
| } | |
| p.Encodings = append(p.Encodings, _elem183) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]int32, 0, size) | |
| p.Compressors = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem184 int32 | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem184 = v | |
| } | |
| p.Compressors = append(p.Compressors, _elem184) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSAppendSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| if err := p.writeField6(ctx, oprot); err != nil { return err } | |
| if err := p.writeField7(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Name)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAligned: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(p.IsAligned)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.isAligned (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAligned: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurements: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataTypes: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.DataTypes { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataTypes: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 6); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:encodings: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Encodings { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 6:encodings: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 7); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:compressors: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Compressors { | |
| if err := oprot.WriteI32(ctx, int32(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 7:compressors: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Name != other.Name { return false } | |
| if p.IsAligned != other.IsAligned { return false } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src185 := other.Measurements[i] | |
| if _tgt != _src185 { return false } | |
| } | |
| if len(p.DataTypes) != len(other.DataTypes) { return false } | |
| for i, _tgt := range p.DataTypes { | |
| _src186 := other.DataTypes[i] | |
| if _tgt != _src186 { return false } | |
| } | |
| if len(p.Encodings) != len(other.Encodings) { return false } | |
| for i, _tgt := range p.Encodings { | |
| _src187 := other.Encodings[i] | |
| if _tgt != _src187 { return false } | |
| } | |
| if len(p.Compressors) != len(other.Compressors) { return false } | |
| for i, _tgt := range p.Compressors { | |
| _src188 := other.Compressors[i] | |
| if _tgt != _src188 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSAppendSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSAppendSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSAppendSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSAppendSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSAppendSchemaTemplateReq)(nil) | |
| func (p *TSAppendSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Name | |
| // - Path | |
| // | |
| type TSPruneSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Name string `thrift:"name,2,required" db:"name" json:"name"` | |
| Path string `thrift:"path,3,required" db:"path" json:"path"` | |
| } | |
| func NewTSPruneSchemaTemplateReq() *TSPruneSchemaTemplateReq { | |
| return &TSPruneSchemaTemplateReq{} | |
| } | |
| func (p *TSPruneSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSPruneSchemaTemplateReq) GetName() string { | |
| return p.Name | |
| } | |
| func (p *TSPruneSchemaTemplateReq) GetPath() string { | |
| return p.Path | |
| } | |
| func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetName bool = false; | |
| var issetPath bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) | |
| } | |
| if !issetPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPruneSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Name = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPruneSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Path = v | |
| } | |
| return nil | |
| } | |
| func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSPruneSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPruneSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Name)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPruneSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:path: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Path)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.path (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:path: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSPruneSchemaTemplateReq) Equals(other *TSPruneSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Name != other.Name { return false } | |
| if p.Path != other.Path { return false } | |
| return true | |
| } | |
| func (p *TSPruneSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSPruneSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSPruneSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSPruneSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSPruneSchemaTemplateReq)(nil) | |
| func (p *TSPruneSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - Name | |
| // - QueryType | |
| // - Measurement | |
| // | |
| type TSQueryTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| Name string `thrift:"name,2,required" db:"name" json:"name"` | |
| QueryType int32 `thrift:"queryType,3,required" db:"queryType" json:"queryType"` | |
| Measurement *string `thrift:"measurement,4" db:"measurement" json:"measurement,omitempty"` | |
| } | |
| func NewTSQueryTemplateReq() *TSQueryTemplateReq { | |
| return &TSQueryTemplateReq{} | |
| } | |
| func (p *TSQueryTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSQueryTemplateReq) GetName() string { | |
| return p.Name | |
| } | |
| func (p *TSQueryTemplateReq) GetQueryType() int32 { | |
| return p.QueryType | |
| } | |
| var TSQueryTemplateReq_Measurement_DEFAULT string | |
| func (p *TSQueryTemplateReq) GetMeasurement() string { | |
| if !p.IsSetMeasurement() { | |
| return TSQueryTemplateReq_Measurement_DEFAULT | |
| } | |
| return *p.Measurement | |
| } | |
| func (p *TSQueryTemplateReq) IsSetMeasurement() bool { | |
| return p.Measurement != nil | |
| } | |
| func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetName bool = false; | |
| var issetQueryType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetQueryType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) | |
| } | |
| if !issetQueryType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Name = v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.QueryType = v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Measurement = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Name)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queryType: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryType (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queryType: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMeasurement() { | |
| if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.Measurement)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.Name != other.Name { return false } | |
| if p.QueryType != other.QueryType { return false } | |
| if p.Measurement != other.Measurement { | |
| if p.Measurement == nil || other.Measurement == nil { | |
| return false | |
| } | |
| if (*p.Measurement) != (*other.Measurement) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSQueryTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSQueryTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSQueryTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSQueryTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSQueryTemplateReq)(nil) | |
| func (p *TSQueryTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - QueryType | |
| // - Result_ | |
| // - Count | |
| // - Measurements | |
| // | |
| type TSQueryTemplateResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| QueryType int32 `thrift:"queryType,2,required" db:"queryType" json:"queryType"` | |
| Result_ *bool `thrift:"result,3" db:"result" json:"result,omitempty"` | |
| Count *int32 `thrift:"count,4" db:"count" json:"count,omitempty"` | |
| Measurements []string `thrift:"measurements,5" db:"measurements" json:"measurements,omitempty"` | |
| } | |
| func NewTSQueryTemplateResp() *TSQueryTemplateResp { | |
| return &TSQueryTemplateResp{} | |
| } | |
| var TSQueryTemplateResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSQueryTemplateResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSQueryTemplateResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| func (p *TSQueryTemplateResp) GetQueryType() int32 { | |
| return p.QueryType | |
| } | |
| var TSQueryTemplateResp_Result__DEFAULT bool | |
| func (p *TSQueryTemplateResp) GetResult_() bool { | |
| if !p.IsSetResult_() { | |
| return TSQueryTemplateResp_Result__DEFAULT | |
| } | |
| return *p.Result_ | |
| } | |
| var TSQueryTemplateResp_Count_DEFAULT int32 | |
| func (p *TSQueryTemplateResp) GetCount() int32 { | |
| if !p.IsSetCount() { | |
| return TSQueryTemplateResp_Count_DEFAULT | |
| } | |
| return *p.Count | |
| } | |
| var TSQueryTemplateResp_Measurements_DEFAULT []string | |
| func (p *TSQueryTemplateResp) GetMeasurements() []string { | |
| return p.Measurements | |
| } | |
| func (p *TSQueryTemplateResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSQueryTemplateResp) IsSetResult_() bool { | |
| return p.Result_ != nil | |
| } | |
| func (p *TSQueryTemplateResp) IsSetCount() bool { | |
| return p.Count != nil | |
| } | |
| func (p *TSQueryTemplateResp) IsSetMeasurements() bool { | |
| return p.Measurements != nil | |
| } | |
| func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| var issetQueryType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetQueryType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 5: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField5(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| if !issetQueryType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.QueryType = v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Result_ = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Count = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Measurements = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem189 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem189 = v | |
| } | |
| p.Measurements = append(p.Measurements, _elem189) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| if err := p.writeField5(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSQueryTemplateResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryType: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.queryType (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryType: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetResult_() { | |
| if err := oprot.WriteFieldBegin(ctx, "result", thrift.BOOL, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.Result_)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.result (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetCount() { | |
| if err := oprot.WriteFieldBegin(ctx, "count", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:count: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.Count)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.count (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:count: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetMeasurements() { | |
| if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 5); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:measurements: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Measurements { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 5:measurements: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.QueryType != other.QueryType { return false } | |
| if p.Result_ != other.Result_ { | |
| if p.Result_ == nil || other.Result_ == nil { | |
| return false | |
| } | |
| if (*p.Result_) != (*other.Result_) { return false } | |
| } | |
| if p.Count != other.Count { | |
| if p.Count == nil || other.Count == nil { | |
| return false | |
| } | |
| if (*p.Count) != (*other.Count) { return false } | |
| } | |
| if len(p.Measurements) != len(other.Measurements) { return false } | |
| for i, _tgt := range p.Measurements { | |
| _src190 := other.Measurements[i] | |
| if _tgt != _src190 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSQueryTemplateResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSQueryTemplateResp(%+v)", *p) | |
| } | |
| func (p *TSQueryTemplateResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSQueryTemplateResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSQueryTemplateResp)(nil) | |
| func (p *TSQueryTemplateResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - PrefixPath | |
| // - TemplateName | |
| // | |
| type TSUnsetSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` | |
| TemplateName string `thrift:"templateName,3,required" db:"templateName" json:"templateName"` | |
| } | |
| func NewTSUnsetSchemaTemplateReq() *TSUnsetSchemaTemplateReq { | |
| return &TSUnsetSchemaTemplateReq{} | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) GetPrefixPath() string { | |
| return p.PrefixPath | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) GetTemplateName() string { | |
| return p.TemplateName | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetPrefixPath bool = false; | |
| var issetTemplateName bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPrefixPath = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTemplateName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetPrefixPath{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")) | |
| } | |
| if !issetTemplateName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.PrefixPath = v | |
| } | |
| return nil | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.TemplateName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSUnsetSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:templateName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.templateName (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:templateName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) Equals(other *TSUnsetSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.PrefixPath != other.PrefixPath { return false } | |
| if p.TemplateName != other.TemplateName { return false } | |
| return true | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSUnsetSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSUnsetSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSUnsetSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSUnsetSchemaTemplateReq)(nil) | |
| func (p *TSUnsetSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - TemplateName | |
| // | |
| type TSDropSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` | |
| } | |
| func NewTSDropSchemaTemplateReq() *TSDropSchemaTemplateReq { | |
| return &TSDropSchemaTemplateReq{} | |
| } | |
| func (p *TSDropSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TSDropSchemaTemplateReq) GetTemplateName() string { | |
| return p.TemplateName | |
| } | |
| func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetTemplateName bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetTemplateName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetTemplateName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSDropSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDropSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.TemplateName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSDropSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSDropSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDropSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSDropSchemaTemplateReq) Equals(other *TSDropSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if p.TemplateName != other.TemplateName { return false } | |
| return true | |
| } | |
| func (p *TSDropSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSDropSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TSDropSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSDropSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSDropSchemaTemplateReq)(nil) | |
| func (p *TSDropSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - SessionId | |
| // - DevicePathList | |
| // | |
| type TCreateTimeseriesUsingSchemaTemplateReq struct { | |
| SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` | |
| DevicePathList []string `thrift:"devicePathList,2,required" db:"devicePathList" json:"devicePathList"` | |
| } | |
| func NewTCreateTimeseriesUsingSchemaTemplateReq() *TCreateTimeseriesUsingSchemaTemplateReq { | |
| return &TCreateTimeseriesUsingSchemaTemplateReq{} | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetDevicePathList() []string { | |
| return p.DevicePathList | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetSessionId bool = false; | |
| var issetDevicePathList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetSessionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDevicePathList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetSessionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")) | |
| } | |
| if !issetDevicePathList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DevicePathList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.DevicePathList = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem191 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem191 = v | |
| } | |
| p.DevicePathList = append(p.DevicePathList, _elem191) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TCreateTimeseriesUsingSchemaTemplateReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "devicePathList", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:devicePathList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DevicePathList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.DevicePathList { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:devicePathList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) Equals(other *TCreateTimeseriesUsingSchemaTemplateReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.SessionId != other.SessionId { return false } | |
| if len(p.DevicePathList) != len(other.DevicePathList) { return false } | |
| for i, _tgt := range p.DevicePathList { | |
| _src192 := other.DevicePathList[i] | |
| if _tgt != _src192 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TCreateTimeseriesUsingSchemaTemplateReq(%+v)", *p) | |
| } | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TCreateTimeseriesUsingSchemaTemplateReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TCreateTimeseriesUsingSchemaTemplateReq)(nil) | |
| func (p *TCreateTimeseriesUsingSchemaTemplateReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - PipeName | |
| // - CreateTime | |
| // - Version | |
| // - Database | |
| // | |
| type TSyncIdentityInfo struct { | |
| PipeName string `thrift:"pipeName,1,required" db:"pipeName" json:"pipeName"` | |
| CreateTime int64 `thrift:"createTime,2,required" db:"createTime" json:"createTime"` | |
| Version string `thrift:"version,3,required" db:"version" json:"version"` | |
| Database string `thrift:"database,4,required" db:"database" json:"database"` | |
| } | |
| func NewTSyncIdentityInfo() *TSyncIdentityInfo { | |
| return &TSyncIdentityInfo{} | |
| } | |
| func (p *TSyncIdentityInfo) GetPipeName() string { | |
| return p.PipeName | |
| } | |
| func (p *TSyncIdentityInfo) GetCreateTime() int64 { | |
| return p.CreateTime | |
| } | |
| func (p *TSyncIdentityInfo) GetVersion() string { | |
| return p.Version | |
| } | |
| func (p *TSyncIdentityInfo) GetDatabase() string { | |
| return p.Database | |
| } | |
| func (p *TSyncIdentityInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetPipeName bool = false; | |
| var issetCreateTime bool = false; | |
| var issetVersion bool = false; | |
| var issetDatabase bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetPipeName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetCreateTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetDatabase = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetPipeName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PipeName is not set")) | |
| } | |
| if !issetCreateTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CreateTime is not set")) | |
| } | |
| if !issetVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) | |
| } | |
| if !issetDatabase{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Database is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.PipeName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.CreateTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Version = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.Database = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSyncIdentityInfo"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSyncIdentityInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "pipeName", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pipeName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.PipeName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.pipeName (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pipeName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncIdentityInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "createTime", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:createTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.CreateTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.createTime (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:createTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncIdentityInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "version", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Version)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncIdentityInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "database", thrift.STRING, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:database: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.Database)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.database (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:database: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncIdentityInfo) Equals(other *TSyncIdentityInfo) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.PipeName != other.PipeName { return false } | |
| if p.CreateTime != other.CreateTime { return false } | |
| if p.Version != other.Version { return false } | |
| if p.Database != other.Database { return false } | |
| return true | |
| } | |
| func (p *TSyncIdentityInfo) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSyncIdentityInfo(%+v)", *p) | |
| } | |
| func (p *TSyncIdentityInfo) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSyncIdentityInfo", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSyncIdentityInfo)(nil) | |
| func (p *TSyncIdentityInfo) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - FileName | |
| // - StartIndex | |
| // | |
| type TSyncTransportMetaInfo struct { | |
| FileName string `thrift:"fileName,1,required" db:"fileName" json:"fileName"` | |
| StartIndex int64 `thrift:"startIndex,2,required" db:"startIndex" json:"startIndex"` | |
| } | |
| func NewTSyncTransportMetaInfo() *TSyncTransportMetaInfo { | |
| return &TSyncTransportMetaInfo{} | |
| } | |
| func (p *TSyncTransportMetaInfo) GetFileName() string { | |
| return p.FileName | |
| } | |
| func (p *TSyncTransportMetaInfo) GetStartIndex() int64 { | |
| return p.StartIndex | |
| } | |
| func (p *TSyncTransportMetaInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetFileName bool = false; | |
| var issetStartIndex bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetFileName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStartIndex = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetFileName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FileName is not set")) | |
| } | |
| if !issetStartIndex{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartIndex is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSyncTransportMetaInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.FileName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncTransportMetaInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.StartIndex = v | |
| } | |
| return nil | |
| } | |
| func (p *TSyncTransportMetaInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSyncTransportMetaInfo"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSyncTransportMetaInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "fileName", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fileName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.FileName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.fileName (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fileName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncTransportMetaInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "startIndex", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:startIndex: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.StartIndex)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.startIndex (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:startIndex: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSyncTransportMetaInfo) Equals(other *TSyncTransportMetaInfo) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.FileName != other.FileName { return false } | |
| if p.StartIndex != other.StartIndex { return false } | |
| return true | |
| } | |
| func (p *TSyncTransportMetaInfo) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSyncTransportMetaInfo(%+v)", *p) | |
| } | |
| func (p *TSyncTransportMetaInfo) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSyncTransportMetaInfo", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSyncTransportMetaInfo)(nil) | |
| func (p *TSyncTransportMetaInfo) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Version | |
| // - Type | |
| // - Body | |
| // | |
| type TPipeTransferReq struct { | |
| Version int8 `thrift:"version,1,required" db:"version" json:"version"` | |
| Type int16 `thrift:"type,2,required" db:"type" json:"type"` | |
| Body []byte `thrift:"body,3,required" db:"body" json:"body"` | |
| } | |
| func NewTPipeTransferReq() *TPipeTransferReq { | |
| return &TPipeTransferReq{} | |
| } | |
| func (p *TPipeTransferReq) GetVersion() int8 { | |
| return p.Version | |
| } | |
| func (p *TPipeTransferReq) GetType() int16 { | |
| return p.Type | |
| } | |
| func (p *TPipeTransferReq) GetBody() []byte { | |
| return p.Body | |
| } | |
| func (p *TPipeTransferReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetVersion bool = false; | |
| var issetType bool = false; | |
| var issetBody bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.BYTE { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I16 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetBody = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) | |
| } | |
| if !issetType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")) | |
| } | |
| if !issetBody{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Body is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| temp := int8(v) | |
| p.Version = temp | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI16(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Type = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Body = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TPipeTransferReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) | |
| } | |
| if err := oprot.WriteByte(ctx, int8(p.Version)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.version (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:version: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeTransferReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:type: ", p), err) | |
| } | |
| if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.type (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:type: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeTransferReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:body: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Body); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.body (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:body: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeTransferReq) Equals(other *TPipeTransferReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.Version != other.Version { return false } | |
| if p.Type != other.Type { return false } | |
| if bytes.Compare(p.Body, other.Body) != 0 { return false } | |
| return true | |
| } | |
| func (p *TPipeTransferReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TPipeTransferReq(%+v)", *p) | |
| } | |
| func (p *TPipeTransferReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TPipeTransferReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TPipeTransferReq)(nil) | |
| func (p *TPipeTransferReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - Body | |
| // | |
| type TPipeTransferResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| Body []byte `thrift:"body,2" db:"body" json:"body,omitempty"` | |
| } | |
| func NewTPipeTransferResp() *TPipeTransferResp { | |
| return &TPipeTransferResp{} | |
| } | |
| var TPipeTransferResp_Status_DEFAULT *common.TSStatus | |
| func (p *TPipeTransferResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TPipeTransferResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| var TPipeTransferResp_Body_DEFAULT []byte | |
| func (p *TPipeTransferResp) GetBody() []byte { | |
| return p.Body | |
| } | |
| func (p *TPipeTransferResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TPipeTransferResp) IsSetBody() bool { | |
| return p.Body != nil | |
| } | |
| func (p *TPipeTransferResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Body = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TPipeTransferResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeTransferResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeTransferResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetBody() { | |
| if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:body: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Body); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.body (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:body: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TPipeTransferResp) Equals(other *TPipeTransferResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if bytes.Compare(p.Body, other.Body) != 0 { return false } | |
| return true | |
| } | |
| func (p *TPipeTransferResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TPipeTransferResp(%+v)", *p) | |
| } | |
| func (p *TPipeTransferResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TPipeTransferResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TPipeTransferResp)(nil) | |
| func (p *TPipeTransferResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Version | |
| // - Type | |
| // - Body | |
| // | |
| type TPipeSubscribeReq struct { | |
| Version int8 `thrift:"version,1,required" db:"version" json:"version"` | |
| Type int16 `thrift:"type,2,required" db:"type" json:"type"` | |
| Body []byte `thrift:"body,3" db:"body" json:"body,omitempty"` | |
| } | |
| func NewTPipeSubscribeReq() *TPipeSubscribeReq { | |
| return &TPipeSubscribeReq{} | |
| } | |
| func (p *TPipeSubscribeReq) GetVersion() int8 { | |
| return p.Version | |
| } | |
| func (p *TPipeSubscribeReq) GetType() int16 { | |
| return p.Type | |
| } | |
| var TPipeSubscribeReq_Body_DEFAULT []byte | |
| func (p *TPipeSubscribeReq) GetBody() []byte { | |
| return p.Body | |
| } | |
| func (p *TPipeSubscribeReq) IsSetBody() bool { | |
| return p.Body != nil | |
| } | |
| func (p *TPipeSubscribeReq) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetVersion bool = false; | |
| var issetType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.BYTE { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I16 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) | |
| } | |
| if !issetType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| temp := int8(v) | |
| p.Version = temp | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI16(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Type = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Body = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeReq) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TPipeSubscribeReq"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) | |
| } | |
| if err := oprot.WriteByte(ctx, int8(p.Version)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.version (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:version: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:type: ", p), err) | |
| } | |
| if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.type (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:type: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetBody() { | |
| if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:body: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Body); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.body (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:body: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeReq) Equals(other *TPipeSubscribeReq) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.Version != other.Version { return false } | |
| if p.Type != other.Type { return false } | |
| if bytes.Compare(p.Body, other.Body) != 0 { return false } | |
| return true | |
| } | |
| func (p *TPipeSubscribeReq) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TPipeSubscribeReq(%+v)", *p) | |
| } | |
| func (p *TPipeSubscribeReq) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TPipeSubscribeReq", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TPipeSubscribeReq)(nil) | |
| func (p *TPipeSubscribeReq) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - Version | |
| // - Type | |
| // - Body | |
| // | |
| type TPipeSubscribeResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| Version int8 `thrift:"version,2,required" db:"version" json:"version"` | |
| Type int16 `thrift:"type,3,required" db:"type" json:"type"` | |
| Body [][]byte `thrift:"body,4" db:"body" json:"body,omitempty"` | |
| } | |
| func NewTPipeSubscribeResp() *TPipeSubscribeResp { | |
| return &TPipeSubscribeResp{} | |
| } | |
| var TPipeSubscribeResp_Status_DEFAULT *common.TSStatus | |
| func (p *TPipeSubscribeResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TPipeSubscribeResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| func (p *TPipeSubscribeResp) GetVersion() int8 { | |
| return p.Version | |
| } | |
| func (p *TPipeSubscribeResp) GetType() int16 { | |
| return p.Type | |
| } | |
| var TPipeSubscribeResp_Body_DEFAULT [][]byte | |
| func (p *TPipeSubscribeResp) GetBody() [][]byte { | |
| return p.Body | |
| } | |
| func (p *TPipeSubscribeResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TPipeSubscribeResp) IsSetBody() bool { | |
| return p.Body != nil | |
| } | |
| func (p *TPipeSubscribeResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| var issetVersion bool = false; | |
| var issetType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.BYTE { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetVersion = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.I16 { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| if !issetVersion{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) | |
| } | |
| if !issetType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadByte(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| temp := int8(v) | |
| p.Version = temp | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI16(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.Type = v | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([][]byte, 0, size) | |
| p.Body = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem193 []byte | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem193 = v | |
| } | |
| p.Body = append(p.Body, _elem193) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TPipeSubscribeResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TPipeSubscribeResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) | |
| } | |
| if err := oprot.WriteByte(ctx, int8(p.Version)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:type: ", p), err) | |
| } | |
| if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.type (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:type: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetBody() { | |
| if err := oprot.WriteFieldBegin(ctx, "body", thrift.LIST, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:body: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Body)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Body { | |
| if err := oprot.WriteBinary(ctx, v); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:body: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TPipeSubscribeResp) Equals(other *TPipeSubscribeResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.Version != other.Version { return false } | |
| if p.Type != other.Type { return false } | |
| if len(p.Body) != len(other.Body) { return false } | |
| for i, _tgt := range p.Body { | |
| _src194 := other.Body[i] | |
| if bytes.Compare(_tgt, _src194) != 0 { return false } | |
| } | |
| return true | |
| } | |
| func (p *TPipeSubscribeResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TPipeSubscribeResp(%+v)", *p) | |
| } | |
| func (p *TPipeSubscribeResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TPipeSubscribeResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TPipeSubscribeResp)(nil) | |
| func (p *TPipeSubscribeResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - Status | |
| // - EnableOperationSync | |
| // - SecondaryAddress | |
| // - SecondaryPort | |
| // | |
| type TSBackupConfigurationResp struct { | |
| Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` | |
| EnableOperationSync *bool `thrift:"enableOperationSync,2" db:"enableOperationSync" json:"enableOperationSync,omitempty"` | |
| SecondaryAddress *string `thrift:"secondaryAddress,3" db:"secondaryAddress" json:"secondaryAddress,omitempty"` | |
| SecondaryPort *int32 `thrift:"secondaryPort,4" db:"secondaryPort" json:"secondaryPort,omitempty"` | |
| } | |
| func NewTSBackupConfigurationResp() *TSBackupConfigurationResp { | |
| return &TSBackupConfigurationResp{} | |
| } | |
| var TSBackupConfigurationResp_Status_DEFAULT *common.TSStatus | |
| func (p *TSBackupConfigurationResp) GetStatus() *common.TSStatus { | |
| if !p.IsSetStatus() { | |
| return TSBackupConfigurationResp_Status_DEFAULT | |
| } | |
| return p.Status | |
| } | |
| var TSBackupConfigurationResp_EnableOperationSync_DEFAULT bool | |
| func (p *TSBackupConfigurationResp) GetEnableOperationSync() bool { | |
| if !p.IsSetEnableOperationSync() { | |
| return TSBackupConfigurationResp_EnableOperationSync_DEFAULT | |
| } | |
| return *p.EnableOperationSync | |
| } | |
| var TSBackupConfigurationResp_SecondaryAddress_DEFAULT string | |
| func (p *TSBackupConfigurationResp) GetSecondaryAddress() string { | |
| if !p.IsSetSecondaryAddress() { | |
| return TSBackupConfigurationResp_SecondaryAddress_DEFAULT | |
| } | |
| return *p.SecondaryAddress | |
| } | |
| var TSBackupConfigurationResp_SecondaryPort_DEFAULT int32 | |
| func (p *TSBackupConfigurationResp) GetSecondaryPort() int32 { | |
| if !p.IsSetSecondaryPort() { | |
| return TSBackupConfigurationResp_SecondaryPort_DEFAULT | |
| } | |
| return *p.SecondaryPort | |
| } | |
| func (p *TSBackupConfigurationResp) IsSetStatus() bool { | |
| return p.Status != nil | |
| } | |
| func (p *TSBackupConfigurationResp) IsSetEnableOperationSync() bool { | |
| return p.EnableOperationSync != nil | |
| } | |
| func (p *TSBackupConfigurationResp) IsSetSecondaryAddress() bool { | |
| return p.SecondaryAddress != nil | |
| } | |
| func (p *TSBackupConfigurationResp) IsSetSecondaryPort() bool { | |
| return p.SecondaryPort != nil | |
| } | |
| func (p *TSBackupConfigurationResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetStatus bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetStatus = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.BOOL { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetStatus{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Status = &common.TSStatus{} | |
| if err := p.Status.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBool(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.EnableOperationSync = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.SecondaryAddress = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| p.SecondaryPort = &v | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSBackupConfigurationResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSBackupConfigurationResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) | |
| } | |
| if err := p.Status.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSBackupConfigurationResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetEnableOperationSync() { | |
| if err := oprot.WriteFieldBegin(ctx, "enableOperationSync", thrift.BOOL, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:enableOperationSync: ", p), err) | |
| } | |
| if err := oprot.WriteBool(ctx, bool(*p.EnableOperationSync)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.enableOperationSync (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:enableOperationSync: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSBackupConfigurationResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSecondaryAddress() { | |
| if err := oprot.WriteFieldBegin(ctx, "secondaryAddress", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondaryAddress: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(*p.SecondaryAddress)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.secondaryAddress (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondaryAddress: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSBackupConfigurationResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSecondaryPort() { | |
| if err := oprot.WriteFieldBegin(ctx, "secondaryPort", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondaryPort: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(*p.SecondaryPort)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.secondaryPort (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondaryPort: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *TSBackupConfigurationResp) Equals(other *TSBackupConfigurationResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if !p.Status.Equals(other.Status) { return false } | |
| if p.EnableOperationSync != other.EnableOperationSync { | |
| if p.EnableOperationSync == nil || other.EnableOperationSync == nil { | |
| return false | |
| } | |
| if (*p.EnableOperationSync) != (*other.EnableOperationSync) { return false } | |
| } | |
| if p.SecondaryAddress != other.SecondaryAddress { | |
| if p.SecondaryAddress == nil || other.SecondaryAddress == nil { | |
| return false | |
| } | |
| if (*p.SecondaryAddress) != (*other.SecondaryAddress) { return false } | |
| } | |
| if p.SecondaryPort != other.SecondaryPort { | |
| if p.SecondaryPort == nil || other.SecondaryPort == nil { | |
| return false | |
| } | |
| if (*p.SecondaryPort) != (*other.SecondaryPort) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSBackupConfigurationResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSBackupConfigurationResp(%+v)", *p) | |
| } | |
| func (p *TSBackupConfigurationResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSBackupConfigurationResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSBackupConfigurationResp)(nil) | |
| func (p *TSBackupConfigurationResp) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - UserName | |
| // - LogInTime | |
| // - ConnectionId | |
| // - Type | |
| // | |
| type TSConnectionInfo struct { | |
| UserName string `thrift:"userName,1,required" db:"userName" json:"userName"` | |
| LogInTime int64 `thrift:"logInTime,2,required" db:"logInTime" json:"logInTime"` | |
| ConnectionId string `thrift:"connectionId,3,required" db:"connectionId" json:"connectionId"` | |
| Type TSConnectionType `thrift:"type,4,required" db:"type" json:"type"` | |
| } | |
| func NewTSConnectionInfo() *TSConnectionInfo { | |
| return &TSConnectionInfo{} | |
| } | |
| func (p *TSConnectionInfo) GetUserName() string { | |
| return p.UserName | |
| } | |
| func (p *TSConnectionInfo) GetLogInTime() int64 { | |
| return p.LogInTime | |
| } | |
| func (p *TSConnectionInfo) GetConnectionId() string { | |
| return p.ConnectionId | |
| } | |
| func (p *TSConnectionInfo) GetType() TSConnectionType { | |
| return p.Type | |
| } | |
| func (p *TSConnectionInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetUserName bool = false; | |
| var issetLogInTime bool = false; | |
| var issetConnectionId bool = false; | |
| var issetType bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetUserName = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetLogInTime = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 3: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField3(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetConnectionId = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 4: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField4(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetType = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetUserName{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field UserName is not set")) | |
| } | |
| if !issetLogInTime{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field LogInTime is not set")) | |
| } | |
| if !issetConnectionId{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConnectionId is not set")) | |
| } | |
| if !issetType{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.UserName = v | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.LogInTime = v | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 3: ", err) | |
| } else { | |
| p.ConnectionId = v | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 4: ", err) | |
| } else { | |
| temp := TSConnectionType(v) | |
| p.Type = temp | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSConnectionInfo"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| if err := p.writeField3(ctx, oprot); err != nil { return err } | |
| if err := p.writeField4(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "userName", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:userName: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.UserName)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.userName (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:userName: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSConnectionInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "logInTime", thrift.I64, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:logInTime: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.LogInTime)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.logInTime (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:logInTime: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSConnectionInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "connectionId", thrift.STRING, 3); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:connectionId: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.ConnectionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.connectionId (3) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 3:connectionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSConnectionInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "type", thrift.I32, 4); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.Type)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSConnectionInfo) Equals(other *TSConnectionInfo) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if p.UserName != other.UserName { return false } | |
| if p.LogInTime != other.LogInTime { return false } | |
| if p.ConnectionId != other.ConnectionId { return false } | |
| if p.Type != other.Type { return false } | |
| return true | |
| } | |
| func (p *TSConnectionInfo) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSConnectionInfo(%+v)", *p) | |
| } | |
| func (p *TSConnectionInfo) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSConnectionInfo", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSConnectionInfo)(nil) | |
| func (p *TSConnectionInfo) Validate() error { | |
| return nil | |
| } | |
| // Attributes: | |
| // - ConnectionInfoList | |
| // | |
| type TSConnectionInfoResp struct { | |
| ConnectionInfoList []*TSConnectionInfo `thrift:"connectionInfoList,1,required" db:"connectionInfoList" json:"connectionInfoList"` | |
| } | |
| func NewTSConnectionInfoResp() *TSConnectionInfoResp { | |
| return &TSConnectionInfoResp{} | |
| } | |
| func (p *TSConnectionInfoResp) GetConnectionInfoList() []*TSConnectionInfo { | |
| return p.ConnectionInfoList | |
| } | |
| func (p *TSConnectionInfoResp) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| var issetConnectionInfoList bool = false; | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| issetConnectionInfoList = true | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| if !issetConnectionInfoList{ | |
| return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConnectionInfoList is not set")) | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfoResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]*TSConnectionInfo, 0, size) | |
| p.ConnectionInfoList = tSlice | |
| for i := 0; i < size; i++ { | |
| _elem195 := &TSConnectionInfo{} | |
| if err := _elem195.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem195), err) | |
| } | |
| p.ConnectionInfoList = append(p.ConnectionInfoList, _elem195) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfoResp) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "TSConnectionInfoResp"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *TSConnectionInfoResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "connectionInfoList", thrift.LIST, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:connectionInfoList: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ConnectionInfoList)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.ConnectionInfoList { | |
| if err := v.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:connectionInfoList: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *TSConnectionInfoResp) Equals(other *TSConnectionInfoResp) bool { | |
| if p == other { | |
| return true | |
| } else if p == nil || other == nil { | |
| return false | |
| } | |
| if len(p.ConnectionInfoList) != len(other.ConnectionInfoList) { return false } | |
| for i, _tgt := range p.ConnectionInfoList { | |
| _src196 := other.ConnectionInfoList[i] | |
| if !_tgt.Equals(_src196) { return false } | |
| } | |
| return true | |
| } | |
| func (p *TSConnectionInfoResp) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("TSConnectionInfoResp(%+v)", *p) | |
| } | |
| func (p *TSConnectionInfoResp) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.TSConnectionInfoResp", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*TSConnectionInfoResp)(nil) | |
| func (p *TSConnectionInfoResp) Validate() error { | |
| return nil | |
| } | |
| type IClientRPCService interface { | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteQueryStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteUpdateStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteRawDataQueryV2(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteLastDataQueryV2(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteFastLastDataQueryForOnePrefixPath(ctx context.Context, req *TSFastLastDataQueryForOnePrefixPathReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteFastLastDataQueryForOneDeviceV2(ctx context.Context, req *TSFastLastDataQueryForOneDeviceReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteAggregationQueryV2(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| FetchResultsV2(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| PrepareStatement(ctx context.Context, req *TSPrepareReq) (_r *TSPrepareResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecutePreparedStatement(ctx context.Context, req *TSExecutePreparedReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| DeallocatePreparedStatement(ctx context.Context, req *TSDeallocatePreparedReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - SessionId | |
| // | |
| GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *common.TSStatus, _err error) | |
| GetProperties(ctx context.Context) (_r *ServerProperties, _err error) | |
| // Parameters: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - SessionId | |
| // - Path | |
| // | |
| DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| ExecuteAggregationQuery(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) | |
| // Parameters: | |
| // - SessionId | |
| // | |
| RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) | |
| ShowConfigurationTemplate(ctx context.Context) (_r *common.TShowConfigurationTemplateResp, _err error) | |
| // Parameters: | |
| // - NodeId | |
| // | |
| ShowConfiguration(ctx context.Context, nodeId int32) (_r *common.TShowConfigurationResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| CreateTimeseriesUsingSchemaTemplate(ctx context.Context, req *TCreateTimeseriesUsingSchemaTemplateReq) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Info | |
| // | |
| Handshake(ctx context.Context, info *TSyncIdentityInfo) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Buff | |
| // | |
| SendPipeData(ctx context.Context, buff []byte) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - MetaInfo | |
| // - Buff | |
| // | |
| SendFile(ctx context.Context, metaInfo *TSyncTransportMetaInfo, buff []byte) (_r *common.TSStatus, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| PipeTransfer(ctx context.Context, req *TPipeTransferReq) (_r *TPipeTransferResp, _err error) | |
| // Parameters: | |
| // - Req | |
| // | |
| PipeSubscribe(ctx context.Context, req *TPipeSubscribeReq) (_r *TPipeSubscribeResp, _err error) | |
| GetBackupConfiguration(ctx context.Context) (_r *TSBackupConfigurationResp, _err error) | |
| FetchAllConnectionsInfo(ctx context.Context) (_r *TSConnectionInfoResp, _err error) | |
| // For other node's call | |
| TestConnectionEmptyRPC(ctx context.Context) (_r *common.TSStatus, _err error) | |
| } | |
| type IClientRPCServiceClient struct { | |
| c thrift.TClient | |
| meta thrift.ResponseMeta | |
| } | |
| func NewIClientRPCServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *IClientRPCServiceClient { | |
| return &IClientRPCServiceClient{ | |
| c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), | |
| } | |
| } | |
| func NewIClientRPCServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *IClientRPCServiceClient { | |
| return &IClientRPCServiceClient{ | |
| c: thrift.NewTStandardClient(iprot, oprot), | |
| } | |
| } | |
| func NewIClientRPCServiceClient(c thrift.TClient) *IClientRPCServiceClient { | |
| return &IClientRPCServiceClient{ | |
| c: c, | |
| } | |
| } | |
| func (p *IClientRPCServiceClient) Client_() thrift.TClient { | |
| return p.c | |
| } | |
| func (p *IClientRPCServiceClient) LastResponseMeta_() thrift.ResponseMeta { | |
| return p.meta | |
| } | |
| func (p *IClientRPCServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { | |
| p.meta = meta | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteQueryStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args197 IClientRPCServiceExecuteQueryStatementV2Args | |
| _args197.Req = req | |
| var _result199 IClientRPCServiceExecuteQueryStatementV2Result | |
| var _meta198 thrift.ResponseMeta | |
| _meta198, _err = p.Client_().Call(ctx, "executeQueryStatementV2", &_args197, &_result199) | |
| p.SetLastResponseMeta_(_meta198) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret200 := _result199.GetSuccess(); _ret200 != nil { | |
| return _ret200, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeQueryStatementV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteUpdateStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args201 IClientRPCServiceExecuteUpdateStatementV2Args | |
| _args201.Req = req | |
| var _result203 IClientRPCServiceExecuteUpdateStatementV2Result | |
| var _meta202 thrift.ResponseMeta | |
| _meta202, _err = p.Client_().Call(ctx, "executeUpdateStatementV2", &_args201, &_result203) | |
| p.SetLastResponseMeta_(_meta202) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret204 := _result203.GetSuccess(); _ret204 != nil { | |
| return _ret204, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeUpdateStatementV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args205 IClientRPCServiceExecuteStatementV2Args | |
| _args205.Req = req | |
| var _result207 IClientRPCServiceExecuteStatementV2Result | |
| var _meta206 thrift.ResponseMeta | |
| _meta206, _err = p.Client_().Call(ctx, "executeStatementV2", &_args205, &_result207) | |
| p.SetLastResponseMeta_(_meta206) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret208 := _result207.GetSuccess(); _ret208 != nil { | |
| return _ret208, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeStatementV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteRawDataQueryV2(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args209 IClientRPCServiceExecuteRawDataQueryV2Args | |
| _args209.Req = req | |
| var _result211 IClientRPCServiceExecuteRawDataQueryV2Result | |
| var _meta210 thrift.ResponseMeta | |
| _meta210, _err = p.Client_().Call(ctx, "executeRawDataQueryV2", &_args209, &_result211) | |
| p.SetLastResponseMeta_(_meta210) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret212 := _result211.GetSuccess(); _ret212 != nil { | |
| return _ret212, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeRawDataQueryV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteLastDataQueryV2(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args213 IClientRPCServiceExecuteLastDataQueryV2Args | |
| _args213.Req = req | |
| var _result215 IClientRPCServiceExecuteLastDataQueryV2Result | |
| var _meta214 thrift.ResponseMeta | |
| _meta214, _err = p.Client_().Call(ctx, "executeLastDataQueryV2", &_args213, &_result215) | |
| p.SetLastResponseMeta_(_meta214) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret216 := _result215.GetSuccess(); _ret216 != nil { | |
| return _ret216, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeLastDataQueryV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteFastLastDataQueryForOnePrefixPath(ctx context.Context, req *TSFastLastDataQueryForOnePrefixPathReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args217 IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs | |
| _args217.Req = req | |
| var _result219 IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult | |
| var _meta218 thrift.ResponseMeta | |
| _meta218, _err = p.Client_().Call(ctx, "executeFastLastDataQueryForOnePrefixPath", &_args217, &_result219) | |
| p.SetLastResponseMeta_(_meta218) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret220 := _result219.GetSuccess(); _ret220 != nil { | |
| return _ret220, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeFastLastDataQueryForOnePrefixPath failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteFastLastDataQueryForOneDeviceV2(ctx context.Context, req *TSFastLastDataQueryForOneDeviceReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args221 IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args | |
| _args221.Req = req | |
| var _result223 IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result | |
| var _meta222 thrift.ResponseMeta | |
| _meta222, _err = p.Client_().Call(ctx, "executeFastLastDataQueryForOneDeviceV2", &_args221, &_result223) | |
| p.SetLastResponseMeta_(_meta222) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret224 := _result223.GetSuccess(); _ret224 != nil { | |
| return _ret224, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeFastLastDataQueryForOneDeviceV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteAggregationQueryV2(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args225 IClientRPCServiceExecuteAggregationQueryV2Args | |
| _args225.Req = req | |
| var _result227 IClientRPCServiceExecuteAggregationQueryV2Result | |
| var _meta226 thrift.ResponseMeta | |
| _meta226, _err = p.Client_().Call(ctx, "executeAggregationQueryV2", &_args225, &_result227) | |
| p.SetLastResponseMeta_(_meta226) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret228 := _result227.GetSuccess(); _ret228 != nil { | |
| return _ret228, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeAggregationQueryV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) FetchResultsV2(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) { | |
| var _args229 IClientRPCServiceFetchResultsV2Args | |
| _args229.Req = req | |
| var _result231 IClientRPCServiceFetchResultsV2Result | |
| var _meta230 thrift.ResponseMeta | |
| _meta230, _err = p.Client_().Call(ctx, "fetchResultsV2", &_args229, &_result231) | |
| p.SetLastResponseMeta_(_meta230) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret232 := _result231.GetSuccess(); _ret232 != nil { | |
| return _ret232, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "fetchResultsV2 failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) { | |
| var _args233 IClientRPCServiceOpenSessionArgs | |
| _args233.Req = req | |
| var _result235 IClientRPCServiceOpenSessionResult | |
| var _meta234 thrift.ResponseMeta | |
| _meta234, _err = p.Client_().Call(ctx, "openSession", &_args233, &_result235) | |
| p.SetLastResponseMeta_(_meta234) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret236 := _result235.GetSuccess(); _ret236 != nil { | |
| return _ret236, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "openSession failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *common.TSStatus, _err error) { | |
| var _args237 IClientRPCServiceCloseSessionArgs | |
| _args237.Req = req | |
| var _result239 IClientRPCServiceCloseSessionResult | |
| var _meta238 thrift.ResponseMeta | |
| _meta238, _err = p.Client_().Call(ctx, "closeSession", &_args237, &_result239) | |
| p.SetLastResponseMeta_(_meta238) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret240 := _result239.GetSuccess(); _ret240 != nil { | |
| return _ret240, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "closeSession failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args241 IClientRPCServiceExecuteStatementArgs | |
| _args241.Req = req | |
| var _result243 IClientRPCServiceExecuteStatementResult | |
| var _meta242 thrift.ResponseMeta | |
| _meta242, _err = p.Client_().Call(ctx, "executeStatement", &_args241, &_result243) | |
| p.SetLastResponseMeta_(_meta242) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret244 := _result243.GetSuccess(); _ret244 != nil { | |
| return _ret244, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *common.TSStatus, _err error) { | |
| var _args245 IClientRPCServiceExecuteBatchStatementArgs | |
| _args245.Req = req | |
| var _result247 IClientRPCServiceExecuteBatchStatementResult | |
| var _meta246 thrift.ResponseMeta | |
| _meta246, _err = p.Client_().Call(ctx, "executeBatchStatement", &_args245, &_result247) | |
| p.SetLastResponseMeta_(_meta246) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret248 := _result247.GetSuccess(); _ret248 != nil { | |
| return _ret248, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeBatchStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args249 IClientRPCServiceExecuteQueryStatementArgs | |
| _args249.Req = req | |
| var _result251 IClientRPCServiceExecuteQueryStatementResult | |
| var _meta250 thrift.ResponseMeta | |
| _meta250, _err = p.Client_().Call(ctx, "executeQueryStatement", &_args249, &_result251) | |
| p.SetLastResponseMeta_(_meta250) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret252 := _result251.GetSuccess(); _ret252 != nil { | |
| return _ret252, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeQueryStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args253 IClientRPCServiceExecuteUpdateStatementArgs | |
| _args253.Req = req | |
| var _result255 IClientRPCServiceExecuteUpdateStatementResult | |
| var _meta254 thrift.ResponseMeta | |
| _meta254, _err = p.Client_().Call(ctx, "executeUpdateStatement", &_args253, &_result255) | |
| p.SetLastResponseMeta_(_meta254) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret256 := _result255.GetSuccess(); _ret256 != nil { | |
| return _ret256, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeUpdateStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) { | |
| var _args257 IClientRPCServiceFetchResultsArgs | |
| _args257.Req = req | |
| var _result259 IClientRPCServiceFetchResultsResult | |
| var _meta258 thrift.ResponseMeta | |
| _meta258, _err = p.Client_().Call(ctx, "fetchResults", &_args257, &_result259) | |
| p.SetLastResponseMeta_(_meta258) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret260 := _result259.GetSuccess(); _ret260 != nil { | |
| return _ret260, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "fetchResults failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) { | |
| var _args261 IClientRPCServiceFetchMetadataArgs | |
| _args261.Req = req | |
| var _result263 IClientRPCServiceFetchMetadataResult | |
| var _meta262 thrift.ResponseMeta | |
| _meta262, _err = p.Client_().Call(ctx, "fetchMetadata", &_args261, &_result263) | |
| p.SetLastResponseMeta_(_meta262) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret264 := _result263.GetSuccess(); _ret264 != nil { | |
| return _ret264, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "fetchMetadata failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *common.TSStatus, _err error) { | |
| var _args265 IClientRPCServiceCancelOperationArgs | |
| _args265.Req = req | |
| var _result267 IClientRPCServiceCancelOperationResult | |
| var _meta266 thrift.ResponseMeta | |
| _meta266, _err = p.Client_().Call(ctx, "cancelOperation", &_args265, &_result267) | |
| p.SetLastResponseMeta_(_meta266) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret268 := _result267.GetSuccess(); _ret268 != nil { | |
| return _ret268, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "cancelOperation failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *common.TSStatus, _err error) { | |
| var _args269 IClientRPCServiceCloseOperationArgs | |
| _args269.Req = req | |
| var _result271 IClientRPCServiceCloseOperationResult | |
| var _meta270 thrift.ResponseMeta | |
| _meta270, _err = p.Client_().Call(ctx, "closeOperation", &_args269, &_result271) | |
| p.SetLastResponseMeta_(_meta270) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret272 := _result271.GetSuccess(); _ret272 != nil { | |
| return _ret272, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "closeOperation failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) PrepareStatement(ctx context.Context, req *TSPrepareReq) (_r *TSPrepareResp, _err error) { | |
| var _args273 IClientRPCServicePrepareStatementArgs | |
| _args273.Req = req | |
| var _result275 IClientRPCServicePrepareStatementResult | |
| var _meta274 thrift.ResponseMeta | |
| _meta274, _err = p.Client_().Call(ctx, "prepareStatement", &_args273, &_result275) | |
| p.SetLastResponseMeta_(_meta274) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret276 := _result275.GetSuccess(); _ret276 != nil { | |
| return _ret276, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "prepareStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecutePreparedStatement(ctx context.Context, req *TSExecutePreparedReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args277 IClientRPCServiceExecutePreparedStatementArgs | |
| _args277.Req = req | |
| var _result279 IClientRPCServiceExecutePreparedStatementResult | |
| var _meta278 thrift.ResponseMeta | |
| _meta278, _err = p.Client_().Call(ctx, "executePreparedStatement", &_args277, &_result279) | |
| p.SetLastResponseMeta_(_meta278) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret280 := _result279.GetSuccess(); _ret280 != nil { | |
| return _ret280, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executePreparedStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) DeallocatePreparedStatement(ctx context.Context, req *TSDeallocatePreparedReq) (_r *common.TSStatus, _err error) { | |
| var _args281 IClientRPCServiceDeallocatePreparedStatementArgs | |
| _args281.Req = req | |
| var _result283 IClientRPCServiceDeallocatePreparedStatementResult | |
| var _meta282 thrift.ResponseMeta | |
| _meta282, _err = p.Client_().Call(ctx, "deallocatePreparedStatement", &_args281, &_result283) | |
| p.SetLastResponseMeta_(_meta282) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret284 := _result283.GetSuccess(); _ret284 != nil { | |
| return _ret284, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "deallocatePreparedStatement failed: unknown result") | |
| } | |
| // Parameters: | |
| // - SessionId | |
| // | |
| func (p *IClientRPCServiceClient) GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) { | |
| var _args285 IClientRPCServiceGetTimeZoneArgs | |
| _args285.SessionId = sessionId | |
| var _result287 IClientRPCServiceGetTimeZoneResult | |
| var _meta286 thrift.ResponseMeta | |
| _meta286, _err = p.Client_().Call(ctx, "getTimeZone", &_args285, &_result287) | |
| p.SetLastResponseMeta_(_meta286) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret288 := _result287.GetSuccess(); _ret288 != nil { | |
| return _ret288, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getTimeZone failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *common.TSStatus, _err error) { | |
| var _args289 IClientRPCServiceSetTimeZoneArgs | |
| _args289.Req = req | |
| var _result291 IClientRPCServiceSetTimeZoneResult | |
| var _meta290 thrift.ResponseMeta | |
| _meta290, _err = p.Client_().Call(ctx, "setTimeZone", &_args289, &_result291) | |
| p.SetLastResponseMeta_(_meta290) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret292 := _result291.GetSuccess(); _ret292 != nil { | |
| return _ret292, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "setTimeZone failed: unknown result") | |
| } | |
| func (p *IClientRPCServiceClient) GetProperties(ctx context.Context) (_r *ServerProperties, _err error) { | |
| var _args293 IClientRPCServiceGetPropertiesArgs | |
| var _result295 IClientRPCServiceGetPropertiesResult | |
| var _meta294 thrift.ResponseMeta | |
| _meta294, _err = p.Client_().Call(ctx, "getProperties", &_args293, &_result295) | |
| p.SetLastResponseMeta_(_meta294) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret296 := _result295.GetSuccess(); _ret296 != nil { | |
| return _ret296, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getProperties failed: unknown result") | |
| } | |
| // Parameters: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| func (p *IClientRPCServiceClient) SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *common.TSStatus, _err error) { | |
| var _args297 IClientRPCServiceSetStorageGroupArgs | |
| _args297.SessionId = sessionId | |
| _args297.StorageGroup = storageGroup | |
| var _result299 IClientRPCServiceSetStorageGroupResult | |
| var _meta298 thrift.ResponseMeta | |
| _meta298, _err = p.Client_().Call(ctx, "setStorageGroup", &_args297, &_result299) | |
| p.SetLastResponseMeta_(_meta298) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret300 := _result299.GetSuccess(); _ret300 != nil { | |
| return _ret300, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "setStorageGroup failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *common.TSStatus, _err error) { | |
| var _args301 IClientRPCServiceCreateTimeseriesArgs | |
| _args301.Req = req | |
| var _result303 IClientRPCServiceCreateTimeseriesResult | |
| var _meta302 thrift.ResponseMeta | |
| _meta302, _err = p.Client_().Call(ctx, "createTimeseries", &_args301, &_result303) | |
| p.SetLastResponseMeta_(_meta302) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret304 := _result303.GetSuccess(); _ret304 != nil { | |
| return _ret304, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "createTimeseries failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *common.TSStatus, _err error) { | |
| var _args305 IClientRPCServiceCreateAlignedTimeseriesArgs | |
| _args305.Req = req | |
| var _result307 IClientRPCServiceCreateAlignedTimeseriesResult | |
| var _meta306 thrift.ResponseMeta | |
| _meta306, _err = p.Client_().Call(ctx, "createAlignedTimeseries", &_args305, &_result307) | |
| p.SetLastResponseMeta_(_meta306) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret308 := _result307.GetSuccess(); _ret308 != nil { | |
| return _ret308, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "createAlignedTimeseries failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *common.TSStatus, _err error) { | |
| var _args309 IClientRPCServiceCreateMultiTimeseriesArgs | |
| _args309.Req = req | |
| var _result311 IClientRPCServiceCreateMultiTimeseriesResult | |
| var _meta310 thrift.ResponseMeta | |
| _meta310, _err = p.Client_().Call(ctx, "createMultiTimeseries", &_args309, &_result311) | |
| p.SetLastResponseMeta_(_meta310) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret312 := _result311.GetSuccess(); _ret312 != nil { | |
| return _ret312, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "createMultiTimeseries failed: unknown result") | |
| } | |
| // Parameters: | |
| // - SessionId | |
| // - Path | |
| // | |
| func (p *IClientRPCServiceClient) DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *common.TSStatus, _err error) { | |
| var _args313 IClientRPCServiceDeleteTimeseriesArgs | |
| _args313.SessionId = sessionId | |
| _args313.Path = path | |
| var _result315 IClientRPCServiceDeleteTimeseriesResult | |
| var _meta314 thrift.ResponseMeta | |
| _meta314, _err = p.Client_().Call(ctx, "deleteTimeseries", &_args313, &_result315) | |
| p.SetLastResponseMeta_(_meta314) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret316 := _result315.GetSuccess(); _ret316 != nil { | |
| return _ret316, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "deleteTimeseries failed: unknown result") | |
| } | |
| // Parameters: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| func (p *IClientRPCServiceClient) DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *common.TSStatus, _err error) { | |
| var _args317 IClientRPCServiceDeleteStorageGroupsArgs | |
| _args317.SessionId = sessionId | |
| _args317.StorageGroup = storageGroup | |
| var _result319 IClientRPCServiceDeleteStorageGroupsResult | |
| var _meta318 thrift.ResponseMeta | |
| _meta318, _err = p.Client_().Call(ctx, "deleteStorageGroups", &_args317, &_result319) | |
| p.SetLastResponseMeta_(_meta318) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret320 := _result319.GetSuccess(); _ret320 != nil { | |
| return _ret320, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "deleteStorageGroups failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) { | |
| var _args321 IClientRPCServiceInsertRecordArgs | |
| _args321.Req = req | |
| var _result323 IClientRPCServiceInsertRecordResult | |
| var _meta322 thrift.ResponseMeta | |
| _meta322, _err = p.Client_().Call(ctx, "insertRecord", &_args321, &_result323) | |
| p.SetLastResponseMeta_(_meta322) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret324 := _result323.GetSuccess(); _ret324 != nil { | |
| return _ret324, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertRecord failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) { | |
| var _args325 IClientRPCServiceInsertStringRecordArgs | |
| _args325.Req = req | |
| var _result327 IClientRPCServiceInsertStringRecordResult | |
| var _meta326 thrift.ResponseMeta | |
| _meta326, _err = p.Client_().Call(ctx, "insertStringRecord", &_args325, &_result327) | |
| p.SetLastResponseMeta_(_meta326) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret328 := _result327.GetSuccess(); _ret328 != nil { | |
| return _ret328, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertStringRecord failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) { | |
| var _args329 IClientRPCServiceInsertTabletArgs | |
| _args329.Req = req | |
| var _result331 IClientRPCServiceInsertTabletResult | |
| var _meta330 thrift.ResponseMeta | |
| _meta330, _err = p.Client_().Call(ctx, "insertTablet", &_args329, &_result331) | |
| p.SetLastResponseMeta_(_meta330) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret332 := _result331.GetSuccess(); _ret332 != nil { | |
| return _ret332, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertTablet failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) { | |
| var _args333 IClientRPCServiceInsertTabletsArgs | |
| _args333.Req = req | |
| var _result335 IClientRPCServiceInsertTabletsResult | |
| var _meta334 thrift.ResponseMeta | |
| _meta334, _err = p.Client_().Call(ctx, "insertTablets", &_args333, &_result335) | |
| p.SetLastResponseMeta_(_meta334) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret336 := _result335.GetSuccess(); _ret336 != nil { | |
| return _ret336, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertTablets failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) { | |
| var _args337 IClientRPCServiceInsertRecordsArgs | |
| _args337.Req = req | |
| var _result339 IClientRPCServiceInsertRecordsResult | |
| var _meta338 thrift.ResponseMeta | |
| _meta338, _err = p.Client_().Call(ctx, "insertRecords", &_args337, &_result339) | |
| p.SetLastResponseMeta_(_meta338) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret340 := _result339.GetSuccess(); _ret340 != nil { | |
| return _ret340, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertRecords failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { | |
| var _args341 IClientRPCServiceInsertRecordsOfOneDeviceArgs | |
| _args341.Req = req | |
| var _result343 IClientRPCServiceInsertRecordsOfOneDeviceResult | |
| var _meta342 thrift.ResponseMeta | |
| _meta342, _err = p.Client_().Call(ctx, "insertRecordsOfOneDevice", &_args341, &_result343) | |
| p.SetLastResponseMeta_(_meta342) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret344 := _result343.GetSuccess(); _ret344 != nil { | |
| return _ret344, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertRecordsOfOneDevice failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { | |
| var _args345 IClientRPCServiceInsertStringRecordsOfOneDeviceArgs | |
| _args345.Req = req | |
| var _result347 IClientRPCServiceInsertStringRecordsOfOneDeviceResult | |
| var _meta346 thrift.ResponseMeta | |
| _meta346, _err = p.Client_().Call(ctx, "insertStringRecordsOfOneDevice", &_args345, &_result347) | |
| p.SetLastResponseMeta_(_meta346) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret348 := _result347.GetSuccess(); _ret348 != nil { | |
| return _ret348, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertStringRecordsOfOneDevice failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) { | |
| var _args349 IClientRPCServiceInsertStringRecordsArgs | |
| _args349.Req = req | |
| var _result351 IClientRPCServiceInsertStringRecordsResult | |
| var _meta350 thrift.ResponseMeta | |
| _meta350, _err = p.Client_().Call(ctx, "insertStringRecords", &_args349, &_result351) | |
| p.SetLastResponseMeta_(_meta350) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret352 := _result351.GetSuccess(); _ret352 != nil { | |
| return _ret352, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "insertStringRecords failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) { | |
| var _args353 IClientRPCServiceTestInsertTabletArgs | |
| _args353.Req = req | |
| var _result355 IClientRPCServiceTestInsertTabletResult | |
| var _meta354 thrift.ResponseMeta | |
| _meta354, _err = p.Client_().Call(ctx, "testInsertTablet", &_args353, &_result355) | |
| p.SetLastResponseMeta_(_meta354) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret356 := _result355.GetSuccess(); _ret356 != nil { | |
| return _ret356, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertTablet failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) { | |
| var _args357 IClientRPCServiceTestInsertTabletsArgs | |
| _args357.Req = req | |
| var _result359 IClientRPCServiceTestInsertTabletsResult | |
| var _meta358 thrift.ResponseMeta | |
| _meta358, _err = p.Client_().Call(ctx, "testInsertTablets", &_args357, &_result359) | |
| p.SetLastResponseMeta_(_meta358) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret360 := _result359.GetSuccess(); _ret360 != nil { | |
| return _ret360, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertTablets failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) { | |
| var _args361 IClientRPCServiceTestInsertRecordArgs | |
| _args361.Req = req | |
| var _result363 IClientRPCServiceTestInsertRecordResult | |
| var _meta362 thrift.ResponseMeta | |
| _meta362, _err = p.Client_().Call(ctx, "testInsertRecord", &_args361, &_result363) | |
| p.SetLastResponseMeta_(_meta362) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret364 := _result363.GetSuccess(); _ret364 != nil { | |
| return _ret364, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertRecord failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) { | |
| var _args365 IClientRPCServiceTestInsertStringRecordArgs | |
| _args365.Req = req | |
| var _result367 IClientRPCServiceTestInsertStringRecordResult | |
| var _meta366 thrift.ResponseMeta | |
| _meta366, _err = p.Client_().Call(ctx, "testInsertStringRecord", &_args365, &_result367) | |
| p.SetLastResponseMeta_(_meta366) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret368 := _result367.GetSuccess(); _ret368 != nil { | |
| return _ret368, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertStringRecord failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) { | |
| var _args369 IClientRPCServiceTestInsertRecordsArgs | |
| _args369.Req = req | |
| var _result371 IClientRPCServiceTestInsertRecordsResult | |
| var _meta370 thrift.ResponseMeta | |
| _meta370, _err = p.Client_().Call(ctx, "testInsertRecords", &_args369, &_result371) | |
| p.SetLastResponseMeta_(_meta370) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret372 := _result371.GetSuccess(); _ret372 != nil { | |
| return _ret372, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertRecords failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { | |
| var _args373 IClientRPCServiceTestInsertRecordsOfOneDeviceArgs | |
| _args373.Req = req | |
| var _result375 IClientRPCServiceTestInsertRecordsOfOneDeviceResult | |
| var _meta374 thrift.ResponseMeta | |
| _meta374, _err = p.Client_().Call(ctx, "testInsertRecordsOfOneDevice", &_args373, &_result375) | |
| p.SetLastResponseMeta_(_meta374) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret376 := _result375.GetSuccess(); _ret376 != nil { | |
| return _ret376, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertRecordsOfOneDevice failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) { | |
| var _args377 IClientRPCServiceTestInsertStringRecordsArgs | |
| _args377.Req = req | |
| var _result379 IClientRPCServiceTestInsertStringRecordsResult | |
| var _meta378 thrift.ResponseMeta | |
| _meta378, _err = p.Client_().Call(ctx, "testInsertStringRecords", &_args377, &_result379) | |
| p.SetLastResponseMeta_(_meta378) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret380 := _result379.GetSuccess(); _ret380 != nil { | |
| return _ret380, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testInsertStringRecords failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *common.TSStatus, _err error) { | |
| var _args381 IClientRPCServiceDeleteDataArgs | |
| _args381.Req = req | |
| var _result383 IClientRPCServiceDeleteDataResult | |
| var _meta382 thrift.ResponseMeta | |
| _meta382, _err = p.Client_().Call(ctx, "deleteData", &_args381, &_result383) | |
| p.SetLastResponseMeta_(_meta382) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret384 := _result383.GetSuccess(); _ret384 != nil { | |
| return _ret384, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "deleteData failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args385 IClientRPCServiceExecuteRawDataQueryArgs | |
| _args385.Req = req | |
| var _result387 IClientRPCServiceExecuteRawDataQueryResult | |
| var _meta386 thrift.ResponseMeta | |
| _meta386, _err = p.Client_().Call(ctx, "executeRawDataQuery", &_args385, &_result387) | |
| p.SetLastResponseMeta_(_meta386) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret388 := _result387.GetSuccess(); _ret388 != nil { | |
| return _ret388, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeRawDataQuery failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args389 IClientRPCServiceExecuteLastDataQueryArgs | |
| _args389.Req = req | |
| var _result391 IClientRPCServiceExecuteLastDataQueryResult | |
| var _meta390 thrift.ResponseMeta | |
| _meta390, _err = p.Client_().Call(ctx, "executeLastDataQuery", &_args389, &_result391) | |
| p.SetLastResponseMeta_(_meta390) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret392 := _result391.GetSuccess(); _ret392 != nil { | |
| return _ret392, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeLastDataQuery failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) ExecuteAggregationQuery(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) { | |
| var _args393 IClientRPCServiceExecuteAggregationQueryArgs | |
| _args393.Req = req | |
| var _result395 IClientRPCServiceExecuteAggregationQueryResult | |
| var _meta394 thrift.ResponseMeta | |
| _meta394, _err = p.Client_().Call(ctx, "executeAggregationQuery", &_args393, &_result395) | |
| p.SetLastResponseMeta_(_meta394) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret396 := _result395.GetSuccess(); _ret396 != nil { | |
| return _ret396, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "executeAggregationQuery failed: unknown result") | |
| } | |
| // Parameters: | |
| // - SessionId | |
| // | |
| func (p *IClientRPCServiceClient) RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) { | |
| var _args397 IClientRPCServiceRequestStatementIdArgs | |
| _args397.SessionId = sessionId | |
| var _result399 IClientRPCServiceRequestStatementIdResult | |
| var _meta398 thrift.ResponseMeta | |
| _meta398, _err = p.Client_().Call(ctx, "requestStatementId", &_args397, &_result399) | |
| p.SetLastResponseMeta_(_meta398) | |
| if _err != nil { | |
| return | |
| } | |
| return _result399.GetSuccess(), nil | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args400 IClientRPCServiceCreateSchemaTemplateArgs | |
| _args400.Req = req | |
| var _result402 IClientRPCServiceCreateSchemaTemplateResult | |
| var _meta401 thrift.ResponseMeta | |
| _meta401, _err = p.Client_().Call(ctx, "createSchemaTemplate", &_args400, &_result402) | |
| p.SetLastResponseMeta_(_meta401) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret403 := _result402.GetSuccess(); _ret403 != nil { | |
| return _ret403, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "createSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args404 IClientRPCServiceAppendSchemaTemplateArgs | |
| _args404.Req = req | |
| var _result406 IClientRPCServiceAppendSchemaTemplateResult | |
| var _meta405 thrift.ResponseMeta | |
| _meta405, _err = p.Client_().Call(ctx, "appendSchemaTemplate", &_args404, &_result406) | |
| p.SetLastResponseMeta_(_meta405) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret407 := _result406.GetSuccess(); _ret407 != nil { | |
| return _ret407, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "appendSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args408 IClientRPCServicePruneSchemaTemplateArgs | |
| _args408.Req = req | |
| var _result410 IClientRPCServicePruneSchemaTemplateResult | |
| var _meta409 thrift.ResponseMeta | |
| _meta409, _err = p.Client_().Call(ctx, "pruneSchemaTemplate", &_args408, &_result410) | |
| p.SetLastResponseMeta_(_meta409) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret411 := _result410.GetSuccess(); _ret411 != nil { | |
| return _ret411, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "pruneSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) { | |
| var _args412 IClientRPCServiceQuerySchemaTemplateArgs | |
| _args412.Req = req | |
| var _result414 IClientRPCServiceQuerySchemaTemplateResult | |
| var _meta413 thrift.ResponseMeta | |
| _meta413, _err = p.Client_().Call(ctx, "querySchemaTemplate", &_args412, &_result414) | |
| p.SetLastResponseMeta_(_meta413) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret415 := _result414.GetSuccess(); _ret415 != nil { | |
| return _ret415, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "querySchemaTemplate failed: unknown result") | |
| } | |
| func (p *IClientRPCServiceClient) ShowConfigurationTemplate(ctx context.Context) (_r *common.TShowConfigurationTemplateResp, _err error) { | |
| var _args416 IClientRPCServiceShowConfigurationTemplateArgs | |
| var _result418 IClientRPCServiceShowConfigurationTemplateResult | |
| var _meta417 thrift.ResponseMeta | |
| _meta417, _err = p.Client_().Call(ctx, "showConfigurationTemplate", &_args416, &_result418) | |
| p.SetLastResponseMeta_(_meta417) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret419 := _result418.GetSuccess(); _ret419 != nil { | |
| return _ret419, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "showConfigurationTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - NodeId | |
| // | |
| func (p *IClientRPCServiceClient) ShowConfiguration(ctx context.Context, nodeId int32) (_r *common.TShowConfigurationResp, _err error) { | |
| var _args420 IClientRPCServiceShowConfigurationArgs | |
| _args420.NodeId = nodeId | |
| var _result422 IClientRPCServiceShowConfigurationResult | |
| var _meta421 thrift.ResponseMeta | |
| _meta421, _err = p.Client_().Call(ctx, "showConfiguration", &_args420, &_result422) | |
| p.SetLastResponseMeta_(_meta421) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret423 := _result422.GetSuccess(); _ret423 != nil { | |
| return _ret423, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "showConfiguration failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args424 IClientRPCServiceSetSchemaTemplateArgs | |
| _args424.Req = req | |
| var _result426 IClientRPCServiceSetSchemaTemplateResult | |
| var _meta425 thrift.ResponseMeta | |
| _meta425, _err = p.Client_().Call(ctx, "setSchemaTemplate", &_args424, &_result426) | |
| p.SetLastResponseMeta_(_meta425) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret427 := _result426.GetSuccess(); _ret427 != nil { | |
| return _ret427, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "setSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args428 IClientRPCServiceUnsetSchemaTemplateArgs | |
| _args428.Req = req | |
| var _result430 IClientRPCServiceUnsetSchemaTemplateResult | |
| var _meta429 thrift.ResponseMeta | |
| _meta429, _err = p.Client_().Call(ctx, "unsetSchemaTemplate", &_args428, &_result430) | |
| p.SetLastResponseMeta_(_meta429) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret431 := _result430.GetSuccess(); _ret431 != nil { | |
| return _ret431, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "unsetSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args432 IClientRPCServiceDropSchemaTemplateArgs | |
| _args432.Req = req | |
| var _result434 IClientRPCServiceDropSchemaTemplateResult | |
| var _meta433 thrift.ResponseMeta | |
| _meta433, _err = p.Client_().Call(ctx, "dropSchemaTemplate", &_args432, &_result434) | |
| p.SetLastResponseMeta_(_meta433) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret435 := _result434.GetSuccess(); _ret435 != nil { | |
| return _ret435, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "dropSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) CreateTimeseriesUsingSchemaTemplate(ctx context.Context, req *TCreateTimeseriesUsingSchemaTemplateReq) (_r *common.TSStatus, _err error) { | |
| var _args436 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs | |
| _args436.Req = req | |
| var _result438 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult | |
| var _meta437 thrift.ResponseMeta | |
| _meta437, _err = p.Client_().Call(ctx, "createTimeseriesUsingSchemaTemplate", &_args436, &_result438) | |
| p.SetLastResponseMeta_(_meta437) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret439 := _result438.GetSuccess(); _ret439 != nil { | |
| return _ret439, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "createTimeseriesUsingSchemaTemplate failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Info | |
| // | |
| func (p *IClientRPCServiceClient) Handshake(ctx context.Context, info *TSyncIdentityInfo) (_r *common.TSStatus, _err error) { | |
| var _args440 IClientRPCServiceHandshakeArgs | |
| _args440.Info = info | |
| var _result442 IClientRPCServiceHandshakeResult | |
| var _meta441 thrift.ResponseMeta | |
| _meta441, _err = p.Client_().Call(ctx, "handshake", &_args440, &_result442) | |
| p.SetLastResponseMeta_(_meta441) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret443 := _result442.GetSuccess(); _ret443 != nil { | |
| return _ret443, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "handshake failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Buff | |
| // | |
| func (p *IClientRPCServiceClient) SendPipeData(ctx context.Context, buff []byte) (_r *common.TSStatus, _err error) { | |
| var _args444 IClientRPCServiceSendPipeDataArgs | |
| _args444.Buff = buff | |
| var _result446 IClientRPCServiceSendPipeDataResult | |
| var _meta445 thrift.ResponseMeta | |
| _meta445, _err = p.Client_().Call(ctx, "sendPipeData", &_args444, &_result446) | |
| p.SetLastResponseMeta_(_meta445) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret447 := _result446.GetSuccess(); _ret447 != nil { | |
| return _ret447, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "sendPipeData failed: unknown result") | |
| } | |
| // Parameters: | |
| // - MetaInfo | |
| // - Buff | |
| // | |
| func (p *IClientRPCServiceClient) SendFile(ctx context.Context, metaInfo *TSyncTransportMetaInfo, buff []byte) (_r *common.TSStatus, _err error) { | |
| var _args448 IClientRPCServiceSendFileArgs | |
| _args448.MetaInfo = metaInfo | |
| _args448.Buff = buff | |
| var _result450 IClientRPCServiceSendFileResult | |
| var _meta449 thrift.ResponseMeta | |
| _meta449, _err = p.Client_().Call(ctx, "sendFile", &_args448, &_result450) | |
| p.SetLastResponseMeta_(_meta449) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret451 := _result450.GetSuccess(); _ret451 != nil { | |
| return _ret451, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "sendFile failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) PipeTransfer(ctx context.Context, req *TPipeTransferReq) (_r *TPipeTransferResp, _err error) { | |
| var _args452 IClientRPCServicePipeTransferArgs | |
| _args452.Req = req | |
| var _result454 IClientRPCServicePipeTransferResult | |
| var _meta453 thrift.ResponseMeta | |
| _meta453, _err = p.Client_().Call(ctx, "pipeTransfer", &_args452, &_result454) | |
| p.SetLastResponseMeta_(_meta453) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret455 := _result454.GetSuccess(); _ret455 != nil { | |
| return _ret455, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "pipeTransfer failed: unknown result") | |
| } | |
| // Parameters: | |
| // - Req | |
| // | |
| func (p *IClientRPCServiceClient) PipeSubscribe(ctx context.Context, req *TPipeSubscribeReq) (_r *TPipeSubscribeResp, _err error) { | |
| var _args456 IClientRPCServicePipeSubscribeArgs | |
| _args456.Req = req | |
| var _result458 IClientRPCServicePipeSubscribeResult | |
| var _meta457 thrift.ResponseMeta | |
| _meta457, _err = p.Client_().Call(ctx, "pipeSubscribe", &_args456, &_result458) | |
| p.SetLastResponseMeta_(_meta457) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret459 := _result458.GetSuccess(); _ret459 != nil { | |
| return _ret459, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "pipeSubscribe failed: unknown result") | |
| } | |
| func (p *IClientRPCServiceClient) GetBackupConfiguration(ctx context.Context) (_r *TSBackupConfigurationResp, _err error) { | |
| var _args460 IClientRPCServiceGetBackupConfigurationArgs | |
| var _result462 IClientRPCServiceGetBackupConfigurationResult | |
| var _meta461 thrift.ResponseMeta | |
| _meta461, _err = p.Client_().Call(ctx, "getBackupConfiguration", &_args460, &_result462) | |
| p.SetLastResponseMeta_(_meta461) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret463 := _result462.GetSuccess(); _ret463 != nil { | |
| return _ret463, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getBackupConfiguration failed: unknown result") | |
| } | |
| func (p *IClientRPCServiceClient) FetchAllConnectionsInfo(ctx context.Context) (_r *TSConnectionInfoResp, _err error) { | |
| var _args464 IClientRPCServiceFetchAllConnectionsInfoArgs | |
| var _result466 IClientRPCServiceFetchAllConnectionsInfoResult | |
| var _meta465 thrift.ResponseMeta | |
| _meta465, _err = p.Client_().Call(ctx, "fetchAllConnectionsInfo", &_args464, &_result466) | |
| p.SetLastResponseMeta_(_meta465) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret467 := _result466.GetSuccess(); _ret467 != nil { | |
| return _ret467, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "fetchAllConnectionsInfo failed: unknown result") | |
| } | |
| // For other node's call | |
| func (p *IClientRPCServiceClient) TestConnectionEmptyRPC(ctx context.Context) (_r *common.TSStatus, _err error) { | |
| var _args468 IClientRPCServiceTestConnectionEmptyRPCArgs | |
| var _result470 IClientRPCServiceTestConnectionEmptyRPCResult | |
| var _meta469 thrift.ResponseMeta | |
| _meta469, _err = p.Client_().Call(ctx, "testConnectionEmptyRPC", &_args468, &_result470) | |
| p.SetLastResponseMeta_(_meta469) | |
| if _err != nil { | |
| return | |
| } | |
| if _ret471 := _result470.GetSuccess(); _ret471 != nil { | |
| return _ret471, nil | |
| } | |
| return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "testConnectionEmptyRPC failed: unknown result") | |
| } | |
| type IClientRPCServiceProcessor struct { | |
| processorMap map[string]thrift.TProcessorFunction | |
| handler IClientRPCService | |
| } | |
| func (p *IClientRPCServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { | |
| p.processorMap[key] = processor | |
| } | |
| func (p *IClientRPCServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { | |
| processor, ok = p.processorMap[key] | |
| return processor, ok | |
| } | |
| func (p *IClientRPCServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { | |
| return p.processorMap | |
| } | |
| func NewIClientRPCServiceProcessor(handler IClientRPCService) *IClientRPCServiceProcessor { | |
| self472 := &IClientRPCServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} | |
| self472.processorMap["executeQueryStatementV2"] = &iClientRPCServiceProcessorExecuteQueryStatementV2{handler:handler} | |
| self472.processorMap["executeUpdateStatementV2"] = &iClientRPCServiceProcessorExecuteUpdateStatementV2{handler:handler} | |
| self472.processorMap["executeStatementV2"] = &iClientRPCServiceProcessorExecuteStatementV2{handler:handler} | |
| self472.processorMap["executeRawDataQueryV2"] = &iClientRPCServiceProcessorExecuteRawDataQueryV2{handler:handler} | |
| self472.processorMap["executeLastDataQueryV2"] = &iClientRPCServiceProcessorExecuteLastDataQueryV2{handler:handler} | |
| self472.processorMap["executeFastLastDataQueryForOnePrefixPath"] = &iClientRPCServiceProcessorExecuteFastLastDataQueryForOnePrefixPath{handler:handler} | |
| self472.processorMap["executeFastLastDataQueryForOneDeviceV2"] = &iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2{handler:handler} | |
| self472.processorMap["executeAggregationQueryV2"] = &iClientRPCServiceProcessorExecuteAggregationQueryV2{handler:handler} | |
| self472.processorMap["fetchResultsV2"] = &iClientRPCServiceProcessorFetchResultsV2{handler:handler} | |
| self472.processorMap["openSession"] = &iClientRPCServiceProcessorOpenSession{handler:handler} | |
| self472.processorMap["closeSession"] = &iClientRPCServiceProcessorCloseSession{handler:handler} | |
| self472.processorMap["executeStatement"] = &iClientRPCServiceProcessorExecuteStatement{handler:handler} | |
| self472.processorMap["executeBatchStatement"] = &iClientRPCServiceProcessorExecuteBatchStatement{handler:handler} | |
| self472.processorMap["executeQueryStatement"] = &iClientRPCServiceProcessorExecuteQueryStatement{handler:handler} | |
| self472.processorMap["executeUpdateStatement"] = &iClientRPCServiceProcessorExecuteUpdateStatement{handler:handler} | |
| self472.processorMap["fetchResults"] = &iClientRPCServiceProcessorFetchResults{handler:handler} | |
| self472.processorMap["fetchMetadata"] = &iClientRPCServiceProcessorFetchMetadata{handler:handler} | |
| self472.processorMap["cancelOperation"] = &iClientRPCServiceProcessorCancelOperation{handler:handler} | |
| self472.processorMap["closeOperation"] = &iClientRPCServiceProcessorCloseOperation{handler:handler} | |
| self472.processorMap["prepareStatement"] = &iClientRPCServiceProcessorPrepareStatement{handler:handler} | |
| self472.processorMap["executePreparedStatement"] = &iClientRPCServiceProcessorExecutePreparedStatement{handler:handler} | |
| self472.processorMap["deallocatePreparedStatement"] = &iClientRPCServiceProcessorDeallocatePreparedStatement{handler:handler} | |
| self472.processorMap["getTimeZone"] = &iClientRPCServiceProcessorGetTimeZone{handler:handler} | |
| self472.processorMap["setTimeZone"] = &iClientRPCServiceProcessorSetTimeZone{handler:handler} | |
| self472.processorMap["getProperties"] = &iClientRPCServiceProcessorGetProperties{handler:handler} | |
| self472.processorMap["setStorageGroup"] = &iClientRPCServiceProcessorSetStorageGroup{handler:handler} | |
| self472.processorMap["createTimeseries"] = &iClientRPCServiceProcessorCreateTimeseries{handler:handler} | |
| self472.processorMap["createAlignedTimeseries"] = &iClientRPCServiceProcessorCreateAlignedTimeseries{handler:handler} | |
| self472.processorMap["createMultiTimeseries"] = &iClientRPCServiceProcessorCreateMultiTimeseries{handler:handler} | |
| self472.processorMap["deleteTimeseries"] = &iClientRPCServiceProcessorDeleteTimeseries{handler:handler} | |
| self472.processorMap["deleteStorageGroups"] = &iClientRPCServiceProcessorDeleteStorageGroups{handler:handler} | |
| self472.processorMap["insertRecord"] = &iClientRPCServiceProcessorInsertRecord{handler:handler} | |
| self472.processorMap["insertStringRecord"] = &iClientRPCServiceProcessorInsertStringRecord{handler:handler} | |
| self472.processorMap["insertTablet"] = &iClientRPCServiceProcessorInsertTablet{handler:handler} | |
| self472.processorMap["insertTablets"] = &iClientRPCServiceProcessorInsertTablets{handler:handler} | |
| self472.processorMap["insertRecords"] = &iClientRPCServiceProcessorInsertRecords{handler:handler} | |
| self472.processorMap["insertRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertRecordsOfOneDevice{handler:handler} | |
| self472.processorMap["insertStringRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertStringRecordsOfOneDevice{handler:handler} | |
| self472.processorMap["insertStringRecords"] = &iClientRPCServiceProcessorInsertStringRecords{handler:handler} | |
| self472.processorMap["testInsertTablet"] = &iClientRPCServiceProcessorTestInsertTablet{handler:handler} | |
| self472.processorMap["testInsertTablets"] = &iClientRPCServiceProcessorTestInsertTablets{handler:handler} | |
| self472.processorMap["testInsertRecord"] = &iClientRPCServiceProcessorTestInsertRecord{handler:handler} | |
| self472.processorMap["testInsertStringRecord"] = &iClientRPCServiceProcessorTestInsertStringRecord{handler:handler} | |
| self472.processorMap["testInsertRecords"] = &iClientRPCServiceProcessorTestInsertRecords{handler:handler} | |
| self472.processorMap["testInsertRecordsOfOneDevice"] = &iClientRPCServiceProcessorTestInsertRecordsOfOneDevice{handler:handler} | |
| self472.processorMap["testInsertStringRecords"] = &iClientRPCServiceProcessorTestInsertStringRecords{handler:handler} | |
| self472.processorMap["deleteData"] = &iClientRPCServiceProcessorDeleteData{handler:handler} | |
| self472.processorMap["executeRawDataQuery"] = &iClientRPCServiceProcessorExecuteRawDataQuery{handler:handler} | |
| self472.processorMap["executeLastDataQuery"] = &iClientRPCServiceProcessorExecuteLastDataQuery{handler:handler} | |
| self472.processorMap["executeAggregationQuery"] = &iClientRPCServiceProcessorExecuteAggregationQuery{handler:handler} | |
| self472.processorMap["requestStatementId"] = &iClientRPCServiceProcessorRequestStatementId{handler:handler} | |
| self472.processorMap["createSchemaTemplate"] = &iClientRPCServiceProcessorCreateSchemaTemplate{handler:handler} | |
| self472.processorMap["appendSchemaTemplate"] = &iClientRPCServiceProcessorAppendSchemaTemplate{handler:handler} | |
| self472.processorMap["pruneSchemaTemplate"] = &iClientRPCServiceProcessorPruneSchemaTemplate{handler:handler} | |
| self472.processorMap["querySchemaTemplate"] = &iClientRPCServiceProcessorQuerySchemaTemplate{handler:handler} | |
| self472.processorMap["showConfigurationTemplate"] = &iClientRPCServiceProcessorShowConfigurationTemplate{handler:handler} | |
| self472.processorMap["showConfiguration"] = &iClientRPCServiceProcessorShowConfiguration{handler:handler} | |
| self472.processorMap["setSchemaTemplate"] = &iClientRPCServiceProcessorSetSchemaTemplate{handler:handler} | |
| self472.processorMap["unsetSchemaTemplate"] = &iClientRPCServiceProcessorUnsetSchemaTemplate{handler:handler} | |
| self472.processorMap["dropSchemaTemplate"] = &iClientRPCServiceProcessorDropSchemaTemplate{handler:handler} | |
| self472.processorMap["createTimeseriesUsingSchemaTemplate"] = &iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate{handler:handler} | |
| self472.processorMap["handshake"] = &iClientRPCServiceProcessorHandshake{handler:handler} | |
| self472.processorMap["sendPipeData"] = &iClientRPCServiceProcessorSendPipeData{handler:handler} | |
| self472.processorMap["sendFile"] = &iClientRPCServiceProcessorSendFile{handler:handler} | |
| self472.processorMap["pipeTransfer"] = &iClientRPCServiceProcessorPipeTransfer{handler:handler} | |
| self472.processorMap["pipeSubscribe"] = &iClientRPCServiceProcessorPipeSubscribe{handler:handler} | |
| self472.processorMap["getBackupConfiguration"] = &iClientRPCServiceProcessorGetBackupConfiguration{handler:handler} | |
| self472.processorMap["fetchAllConnectionsInfo"] = &iClientRPCServiceProcessorFetchAllConnectionsInfo{handler:handler} | |
| self472.processorMap["testConnectionEmptyRPC"] = &iClientRPCServiceProcessorTestConnectionEmptyRPC{handler:handler} | |
| return self472 | |
| } | |
| func (p *IClientRPCServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) | |
| if err2 != nil { return false, thrift.WrapTException(err2) } | |
| if processor, ok := p.GetProcessorFunction(name); ok { | |
| return processor.Process(ctx, seqId, iprot, oprot) | |
| } | |
| iprot.Skip(ctx, thrift.STRUCT) | |
| iprot.ReadMessageEnd(ctx) | |
| x473 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) | |
| oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) | |
| x473.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, x473 | |
| } | |
| type iClientRPCServiceProcessorExecuteQueryStatementV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteQueryStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err474 thrift.TException | |
| args := IClientRPCServiceExecuteQueryStatementV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteQueryStatementV2Result{} | |
| if retval, err2 := p.handler.ExecuteQueryStatementV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc475 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeQueryStatementV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc475.Write(ctx, oprot); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if _write_err474 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err474, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err474 == nil && err2 != nil { | |
| _write_err474 = thrift.WrapTException(err2) | |
| } | |
| if _write_err474 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err474, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteUpdateStatementV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteUpdateStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err476 thrift.TException | |
| args := IClientRPCServiceExecuteUpdateStatementV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteUpdateStatementV2Result{} | |
| if retval, err2 := p.handler.ExecuteUpdateStatementV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc477 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeUpdateStatementV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc477.Write(ctx, oprot); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if _write_err476 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err476, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err476 == nil && err2 != nil { | |
| _write_err476 = thrift.WrapTException(err2) | |
| } | |
| if _write_err476 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err476, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteStatementV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err478 thrift.TException | |
| args := IClientRPCServiceExecuteStatementV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteStatementV2Result{} | |
| if retval, err2 := p.handler.ExecuteStatementV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc479 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeStatementV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc479.Write(ctx, oprot); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if _write_err478 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err478, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err478 == nil && err2 != nil { | |
| _write_err478 = thrift.WrapTException(err2) | |
| } | |
| if _write_err478 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err478, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteRawDataQueryV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteRawDataQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err480 thrift.TException | |
| args := IClientRPCServiceExecuteRawDataQueryV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteRawDataQueryV2Result{} | |
| if retval, err2 := p.handler.ExecuteRawDataQueryV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc481 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQueryV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc481.Write(ctx, oprot); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if _write_err480 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err480, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err480 == nil && err2 != nil { | |
| _write_err480 = thrift.WrapTException(err2) | |
| } | |
| if _write_err480 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err480, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteLastDataQueryV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteLastDataQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err482 thrift.TException | |
| args := IClientRPCServiceExecuteLastDataQueryV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteLastDataQueryV2Result{} | |
| if retval, err2 := p.handler.ExecuteLastDataQueryV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc483 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeLastDataQueryV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc483.Write(ctx, oprot); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if _write_err482 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err482, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err482 == nil && err2 != nil { | |
| _write_err482 = thrift.WrapTException(err2) | |
| } | |
| if _write_err482 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err482, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteFastLastDataQueryForOnePrefixPath struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteFastLastDataQueryForOnePrefixPath) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err484 thrift.TException | |
| args := IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOnePrefixPath", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult{} | |
| if retval, err2 := p.handler.ExecuteFastLastDataQueryForOnePrefixPath(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc485 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeFastLastDataQueryForOnePrefixPath: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOnePrefixPath", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc485.Write(ctx, oprot); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if _write_err484 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err484, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOnePrefixPath", thrift.REPLY, seqId); err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err484 == nil && err2 != nil { | |
| _write_err484 = thrift.WrapTException(err2) | |
| } | |
| if _write_err484 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err484, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err486 thrift.TException | |
| args := IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOneDeviceV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result{} | |
| if retval, err2 := p.handler.ExecuteFastLastDataQueryForOneDeviceV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc487 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeFastLastDataQueryForOneDeviceV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOneDeviceV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc487.Write(ctx, oprot); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if _write_err486 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err486, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOneDeviceV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err486 == nil && err2 != nil { | |
| _write_err486 = thrift.WrapTException(err2) | |
| } | |
| if _write_err486 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err486, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteAggregationQueryV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteAggregationQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err488 thrift.TException | |
| args := IClientRPCServiceExecuteAggregationQueryV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteAggregationQueryV2Result{} | |
| if retval, err2 := p.handler.ExecuteAggregationQueryV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc489 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeAggregationQueryV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc489.Write(ctx, oprot); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if _write_err488 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err488, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err488 == nil && err2 != nil { | |
| _write_err488 = thrift.WrapTException(err2) | |
| } | |
| if _write_err488 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err488, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorFetchResultsV2 struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorFetchResultsV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err490 thrift.TException | |
| args := IClientRPCServiceFetchResultsV2Args{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceFetchResultsV2Result{} | |
| if retval, err2 := p.handler.FetchResultsV2(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc491 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchResultsV2: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc491.Write(ctx, oprot); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if _write_err490 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err490, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.REPLY, seqId); err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err490 == nil && err2 != nil { | |
| _write_err490 = thrift.WrapTException(err2) | |
| } | |
| if _write_err490 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err490, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorOpenSession struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorOpenSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err492 thrift.TException | |
| args := IClientRPCServiceOpenSessionArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceOpenSessionResult{} | |
| if retval, err2 := p.handler.OpenSession(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc493 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing openSession: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc493.Write(ctx, oprot); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if _write_err492 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err492, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "openSession", thrift.REPLY, seqId); err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err492 == nil && err2 != nil { | |
| _write_err492 = thrift.WrapTException(err2) | |
| } | |
| if _write_err492 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err492, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCloseSession struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCloseSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err494 thrift.TException | |
| args := IClientRPCServiceCloseSessionArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCloseSessionResult{} | |
| if retval, err2 := p.handler.CloseSession(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc495 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeSession: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc495.Write(ctx, oprot); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if _write_err494 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err494, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "closeSession", thrift.REPLY, seqId); err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err494 == nil && err2 != nil { | |
| _write_err494 = thrift.WrapTException(err2) | |
| } | |
| if _write_err494 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err494, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err496 thrift.TException | |
| args := IClientRPCServiceExecuteStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteStatementResult{} | |
| if retval, err2 := p.handler.ExecuteStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc497 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc497.Write(ctx, oprot); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if _write_err496 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err496, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err496 == nil && err2 != nil { | |
| _write_err496 = thrift.WrapTException(err2) | |
| } | |
| if _write_err496 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err496, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteBatchStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteBatchStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err498 thrift.TException | |
| args := IClientRPCServiceExecuteBatchStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteBatchStatementResult{} | |
| if retval, err2 := p.handler.ExecuteBatchStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc499 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeBatchStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc499.Write(ctx, oprot); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if _write_err498 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err498, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err498 == nil && err2 != nil { | |
| _write_err498 = thrift.WrapTException(err2) | |
| } | |
| if _write_err498 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err498, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteQueryStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteQueryStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err500 thrift.TException | |
| args := IClientRPCServiceExecuteQueryStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteQueryStatementResult{} | |
| if retval, err2 := p.handler.ExecuteQueryStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc501 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeQueryStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc501.Write(ctx, oprot); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if _write_err500 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err500, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err500 == nil && err2 != nil { | |
| _write_err500 = thrift.WrapTException(err2) | |
| } | |
| if _write_err500 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err500, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteUpdateStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err502 thrift.TException | |
| args := IClientRPCServiceExecuteUpdateStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteUpdateStatementResult{} | |
| if retval, err2 := p.handler.ExecuteUpdateStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc503 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeUpdateStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc503.Write(ctx, oprot); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if _write_err502 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err502, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err502 == nil && err2 != nil { | |
| _write_err502 = thrift.WrapTException(err2) | |
| } | |
| if _write_err502 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err502, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorFetchResults struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorFetchResults) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err504 thrift.TException | |
| args := IClientRPCServiceFetchResultsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceFetchResultsResult{} | |
| if retval, err2 := p.handler.FetchResults(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc505 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchResults: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc505.Write(ctx, oprot); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if _write_err504 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err504, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchResults", thrift.REPLY, seqId); err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err504 == nil && err2 != nil { | |
| _write_err504 = thrift.WrapTException(err2) | |
| } | |
| if _write_err504 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err504, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorFetchMetadata struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorFetchMetadata) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err506 thrift.TException | |
| args := IClientRPCServiceFetchMetadataArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceFetchMetadataResult{} | |
| if retval, err2 := p.handler.FetchMetadata(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc507 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchMetadata: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc507.Write(ctx, oprot); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if _write_err506 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err506, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.REPLY, seqId); err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err506 == nil && err2 != nil { | |
| _write_err506 = thrift.WrapTException(err2) | |
| } | |
| if _write_err506 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err506, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCancelOperation struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCancelOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err508 thrift.TException | |
| args := IClientRPCServiceCancelOperationArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCancelOperationResult{} | |
| if retval, err2 := p.handler.CancelOperation(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc509 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing cancelOperation: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc509.Write(ctx, oprot); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if _write_err508 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err508, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.REPLY, seqId); err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err508 == nil && err2 != nil { | |
| _write_err508 = thrift.WrapTException(err2) | |
| } | |
| if _write_err508 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err508, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCloseOperation struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCloseOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err510 thrift.TException | |
| args := IClientRPCServiceCloseOperationArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCloseOperationResult{} | |
| if retval, err2 := p.handler.CloseOperation(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc511 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeOperation: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc511.Write(ctx, oprot); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if _write_err510 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err510, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "closeOperation", thrift.REPLY, seqId); err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err510 == nil && err2 != nil { | |
| _write_err510 = thrift.WrapTException(err2) | |
| } | |
| if _write_err510 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err510, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorPrepareStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorPrepareStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err512 thrift.TException | |
| args := IClientRPCServicePrepareStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "prepareStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServicePrepareStatementResult{} | |
| if retval, err2 := p.handler.PrepareStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc513 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing prepareStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "prepareStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc513.Write(ctx, oprot); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if _write_err512 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err512, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "prepareStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err512 == nil && err2 != nil { | |
| _write_err512 = thrift.WrapTException(err2) | |
| } | |
| if _write_err512 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err512, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecutePreparedStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecutePreparedStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err514 thrift.TException | |
| args := IClientRPCServiceExecutePreparedStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executePreparedStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecutePreparedStatementResult{} | |
| if retval, err2 := p.handler.ExecutePreparedStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc515 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executePreparedStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executePreparedStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc515.Write(ctx, oprot); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if _write_err514 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err514, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executePreparedStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err514 == nil && err2 != nil { | |
| _write_err514 = thrift.WrapTException(err2) | |
| } | |
| if _write_err514 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err514, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorDeallocatePreparedStatement struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorDeallocatePreparedStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err516 thrift.TException | |
| args := IClientRPCServiceDeallocatePreparedStatementArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "deallocatePreparedStatement", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceDeallocatePreparedStatementResult{} | |
| if retval, err2 := p.handler.DeallocatePreparedStatement(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc517 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deallocatePreparedStatement: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "deallocatePreparedStatement", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc517.Write(ctx, oprot); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if _write_err516 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err516, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "deallocatePreparedStatement", thrift.REPLY, seqId); err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err516 == nil && err2 != nil { | |
| _write_err516 = thrift.WrapTException(err2) | |
| } | |
| if _write_err516 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err516, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorGetTimeZone struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err518 thrift.TException | |
| args := IClientRPCServiceGetTimeZoneArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceGetTimeZoneResult{} | |
| if retval, err2 := p.handler.GetTimeZone(ctx, args.SessionId); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc519 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTimeZone: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc519.Write(ctx, oprot); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if _write_err518 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err518, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.REPLY, seqId); err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err518 == nil && err2 != nil { | |
| _write_err518 = thrift.WrapTException(err2) | |
| } | |
| if _write_err518 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err518, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorSetTimeZone struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err520 thrift.TException | |
| args := IClientRPCServiceSetTimeZoneArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceSetTimeZoneResult{} | |
| if retval, err2 := p.handler.SetTimeZone(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc521 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setTimeZone: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc521.Write(ctx, oprot); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if _write_err520 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err520, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.REPLY, seqId); err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err520 == nil && err2 != nil { | |
| _write_err520 = thrift.WrapTException(err2) | |
| } | |
| if _write_err520 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err520, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorGetProperties struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorGetProperties) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err522 thrift.TException | |
| args := IClientRPCServiceGetPropertiesArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceGetPropertiesResult{} | |
| if retval, err2 := p.handler.GetProperties(ctx); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc523 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getProperties: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc523.Write(ctx, oprot); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if _write_err522 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err522, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "getProperties", thrift.REPLY, seqId); err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err522 == nil && err2 != nil { | |
| _write_err522 = thrift.WrapTException(err2) | |
| } | |
| if _write_err522 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err522, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorSetStorageGroup struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err524 thrift.TException | |
| args := IClientRPCServiceSetStorageGroupArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceSetStorageGroupResult{} | |
| if retval, err2 := p.handler.SetStorageGroup(ctx, args.SessionId, args.StorageGroup); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc525 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setStorageGroup: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc525.Write(ctx, oprot); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if _write_err524 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err524, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.REPLY, seqId); err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err524 == nil && err2 != nil { | |
| _write_err524 = thrift.WrapTException(err2) | |
| } | |
| if _write_err524 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err524, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCreateTimeseries struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCreateTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err526 thrift.TException | |
| args := IClientRPCServiceCreateTimeseriesArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCreateTimeseriesResult{} | |
| if retval, err2 := p.handler.CreateTimeseries(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc527 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTimeseries: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc527.Write(ctx, oprot); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if _write_err526 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err526, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.REPLY, seqId); err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err526 == nil && err2 != nil { | |
| _write_err526 = thrift.WrapTException(err2) | |
| } | |
| if _write_err526 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err526, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCreateAlignedTimeseries struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err528 thrift.TException | |
| args := IClientRPCServiceCreateAlignedTimeseriesArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCreateAlignedTimeseriesResult{} | |
| if retval, err2 := p.handler.CreateAlignedTimeseries(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc529 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createAlignedTimeseries: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc529.Write(ctx, oprot); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if _write_err528 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err528, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.REPLY, seqId); err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err528 == nil && err2 != nil { | |
| _write_err528 = thrift.WrapTException(err2) | |
| } | |
| if _write_err528 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err528, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCreateMultiTimeseries struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err530 thrift.TException | |
| args := IClientRPCServiceCreateMultiTimeseriesArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCreateMultiTimeseriesResult{} | |
| if retval, err2 := p.handler.CreateMultiTimeseries(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc531 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createMultiTimeseries: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc531.Write(ctx, oprot); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if _write_err530 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err530, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.REPLY, seqId); err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err530 == nil && err2 != nil { | |
| _write_err530 = thrift.WrapTException(err2) | |
| } | |
| if _write_err530 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err530, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorDeleteTimeseries struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err532 thrift.TException | |
| args := IClientRPCServiceDeleteTimeseriesArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceDeleteTimeseriesResult{} | |
| if retval, err2 := p.handler.DeleteTimeseries(ctx, args.SessionId, args.Path); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc533 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTimeseries: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc533.Write(ctx, oprot); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if _write_err532 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err532, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.REPLY, seqId); err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err532 == nil && err2 != nil { | |
| _write_err532 = thrift.WrapTException(err2) | |
| } | |
| if _write_err532 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err532, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorDeleteStorageGroups struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorDeleteStorageGroups) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err534 thrift.TException | |
| args := IClientRPCServiceDeleteStorageGroupsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceDeleteStorageGroupsResult{} | |
| if retval, err2 := p.handler.DeleteStorageGroups(ctx, args.SessionId, args.StorageGroup); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc535 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteStorageGroups: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc535.Write(ctx, oprot); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if _write_err534 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err534, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.REPLY, seqId); err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err534 == nil && err2 != nil { | |
| _write_err534 = thrift.WrapTException(err2) | |
| } | |
| if _write_err534 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err534, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertRecord struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err536 thrift.TException | |
| args := IClientRPCServiceInsertRecordArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertRecordResult{} | |
| if retval, err2 := p.handler.InsertRecord(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc537 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecord: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc537.Write(ctx, oprot); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if _write_err536 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err536, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecord", thrift.REPLY, seqId); err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err536 == nil && err2 != nil { | |
| _write_err536 = thrift.WrapTException(err2) | |
| } | |
| if _write_err536 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err536, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertStringRecord struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err538 thrift.TException | |
| args := IClientRPCServiceInsertStringRecordArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertStringRecordResult{} | |
| if retval, err2 := p.handler.InsertStringRecord(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc539 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecord: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc539.Write(ctx, oprot); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if _write_err538 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err538, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.REPLY, seqId); err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err538 == nil && err2 != nil { | |
| _write_err538 = thrift.WrapTException(err2) | |
| } | |
| if _write_err538 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err538, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertTablet struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err540 thrift.TException | |
| args := IClientRPCServiceInsertTabletArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertTabletResult{} | |
| if retval, err2 := p.handler.InsertTablet(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc541 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablet: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc541.Write(ctx, oprot); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if _write_err540 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err540, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertTablet", thrift.REPLY, seqId); err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err540 == nil && err2 != nil { | |
| _write_err540 = thrift.WrapTException(err2) | |
| } | |
| if _write_err540 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err540, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertTablets struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err542 thrift.TException | |
| args := IClientRPCServiceInsertTabletsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertTabletsResult{} | |
| if retval, err2 := p.handler.InsertTablets(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc543 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablets: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc543.Write(ctx, oprot); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if _write_err542 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err542, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertTablets", thrift.REPLY, seqId); err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err542 == nil && err2 != nil { | |
| _write_err542 = thrift.WrapTException(err2) | |
| } | |
| if _write_err542 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err542, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertRecords struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err544 thrift.TException | |
| args := IClientRPCServiceInsertRecordsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertRecordsResult{} | |
| if retval, err2 := p.handler.InsertRecords(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc545 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecords: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc545.Write(ctx, oprot); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if _write_err544 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err544, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecords", thrift.REPLY, seqId); err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err544 == nil && err2 != nil { | |
| _write_err544 = thrift.WrapTException(err2) | |
| } | |
| if _write_err544 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err544, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertRecordsOfOneDevice struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err546 thrift.TException | |
| args := IClientRPCServiceInsertRecordsOfOneDeviceArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertRecordsOfOneDeviceResult{} | |
| if retval, err2 := p.handler.InsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc547 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecordsOfOneDevice: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc547.Write(ctx, oprot); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if _write_err546 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err546, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err546 == nil && err2 != nil { | |
| _write_err546 = thrift.WrapTException(err2) | |
| } | |
| if _write_err546 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err546, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertStringRecordsOfOneDevice struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err548 thrift.TException | |
| args := IClientRPCServiceInsertStringRecordsOfOneDeviceArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertStringRecordsOfOneDeviceResult{} | |
| if retval, err2 := p.handler.InsertStringRecordsOfOneDevice(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc549 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecordsOfOneDevice: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc549.Write(ctx, oprot); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if _write_err548 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err548, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err548 == nil && err2 != nil { | |
| _write_err548 = thrift.WrapTException(err2) | |
| } | |
| if _write_err548 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err548, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorInsertStringRecords struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err550 thrift.TException | |
| args := IClientRPCServiceInsertStringRecordsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceInsertStringRecordsResult{} | |
| if retval, err2 := p.handler.InsertStringRecords(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc551 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecords: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc551.Write(ctx, oprot); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if _write_err550 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err550, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.REPLY, seqId); err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err550 == nil && err2 != nil { | |
| _write_err550 = thrift.WrapTException(err2) | |
| } | |
| if _write_err550 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err550, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertTablet struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err552 thrift.TException | |
| args := IClientRPCServiceTestInsertTabletArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertTabletResult{} | |
| if retval, err2 := p.handler.TestInsertTablet(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc553 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablet: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc553.Write(ctx, oprot); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if _write_err552 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err552, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.REPLY, seqId); err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err552 == nil && err2 != nil { | |
| _write_err552 = thrift.WrapTException(err2) | |
| } | |
| if _write_err552 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err552, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertTablets struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err554 thrift.TException | |
| args := IClientRPCServiceTestInsertTabletsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertTabletsResult{} | |
| if retval, err2 := p.handler.TestInsertTablets(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc555 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablets: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc555.Write(ctx, oprot); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if _write_err554 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err554, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.REPLY, seqId); err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err554 == nil && err2 != nil { | |
| _write_err554 = thrift.WrapTException(err2) | |
| } | |
| if _write_err554 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err554, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertRecord struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err556 thrift.TException | |
| args := IClientRPCServiceTestInsertRecordArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertRecordResult{} | |
| if retval, err2 := p.handler.TestInsertRecord(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc557 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecord: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc557.Write(ctx, oprot); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if _write_err556 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err556, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.REPLY, seqId); err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err556 == nil && err2 != nil { | |
| _write_err556 = thrift.WrapTException(err2) | |
| } | |
| if _write_err556 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err556, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertStringRecord struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err558 thrift.TException | |
| args := IClientRPCServiceTestInsertStringRecordArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertStringRecordResult{} | |
| if retval, err2 := p.handler.TestInsertStringRecord(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc559 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecord: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc559.Write(ctx, oprot); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if _write_err558 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err558, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.REPLY, seqId); err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err558 == nil && err2 != nil { | |
| _write_err558 = thrift.WrapTException(err2) | |
| } | |
| if _write_err558 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err558, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertRecords struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err560 thrift.TException | |
| args := IClientRPCServiceTestInsertRecordsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertRecordsResult{} | |
| if retval, err2 := p.handler.TestInsertRecords(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc561 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecords: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc561.Write(ctx, oprot); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if _write_err560 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err560, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.REPLY, seqId); err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err560 == nil && err2 != nil { | |
| _write_err560 = thrift.WrapTException(err2) | |
| } | |
| if _write_err560 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err560, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertRecordsOfOneDevice struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err562 thrift.TException | |
| args := IClientRPCServiceTestInsertRecordsOfOneDeviceArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} | |
| if retval, err2 := p.handler.TestInsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc563 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecordsOfOneDevice: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc563.Write(ctx, oprot); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if _write_err562 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err562, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err562 == nil && err2 != nil { | |
| _write_err562 = thrift.WrapTException(err2) | |
| } | |
| if _write_err562 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err562, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestInsertStringRecords struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err564 thrift.TException | |
| args := IClientRPCServiceTestInsertStringRecordsArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestInsertStringRecordsResult{} | |
| if retval, err2 := p.handler.TestInsertStringRecords(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc565 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecords: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc565.Write(ctx, oprot); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if _write_err564 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err564, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.REPLY, seqId); err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err564 == nil && err2 != nil { | |
| _write_err564 = thrift.WrapTException(err2) | |
| } | |
| if _write_err564 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err564, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorDeleteData struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorDeleteData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err566 thrift.TException | |
| args := IClientRPCServiceDeleteDataArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceDeleteDataResult{} | |
| if retval, err2 := p.handler.DeleteData(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc567 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteData: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc567.Write(ctx, oprot); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if _write_err566 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err566, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "deleteData", thrift.REPLY, seqId); err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err566 == nil && err2 != nil { | |
| _write_err566 = thrift.WrapTException(err2) | |
| } | |
| if _write_err566 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err566, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteRawDataQuery struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err568 thrift.TException | |
| args := IClientRPCServiceExecuteRawDataQueryArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteRawDataQueryResult{} | |
| if retval, err2 := p.handler.ExecuteRawDataQuery(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc569 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQuery: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc569.Write(ctx, oprot); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if _write_err568 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err568, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.REPLY, seqId); err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err568 == nil && err2 != nil { | |
| _write_err568 = thrift.WrapTException(err2) | |
| } | |
| if _write_err568 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err568, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteLastDataQuery struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err570 thrift.TException | |
| args := IClientRPCServiceExecuteLastDataQueryArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteLastDataQueryResult{} | |
| if retval, err2 := p.handler.ExecuteLastDataQuery(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc571 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeLastDataQuery: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc571.Write(ctx, oprot); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if _write_err570 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err570, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.REPLY, seqId); err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err570 == nil && err2 != nil { | |
| _write_err570 = thrift.WrapTException(err2) | |
| } | |
| if _write_err570 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err570, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorExecuteAggregationQuery struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err572 thrift.TException | |
| args := IClientRPCServiceExecuteAggregationQueryArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceExecuteAggregationQueryResult{} | |
| if retval, err2 := p.handler.ExecuteAggregationQuery(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc573 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeAggregationQuery: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc573.Write(ctx, oprot); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if _write_err572 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err572, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.REPLY, seqId); err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err572 == nil && err2 != nil { | |
| _write_err572 = thrift.WrapTException(err2) | |
| } | |
| if _write_err572 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err572, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorRequestStatementId struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorRequestStatementId) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err574 thrift.TException | |
| args := IClientRPCServiceRequestStatementIdArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceRequestStatementIdResult{} | |
| if retval, err2 := p.handler.RequestStatementId(ctx, args.SessionId); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc575 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing requestStatementId: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc575.Write(ctx, oprot); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if _write_err574 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err574, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = &retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.REPLY, seqId); err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err574 == nil && err2 != nil { | |
| _write_err574 = thrift.WrapTException(err2) | |
| } | |
| if _write_err574 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err574, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCreateSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err576 thrift.TException | |
| args := IClientRPCServiceCreateSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCreateSchemaTemplateResult{} | |
| if retval, err2 := p.handler.CreateSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc577 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc577.Write(ctx, oprot); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if _write_err576 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err576, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err576 == nil && err2 != nil { | |
| _write_err576 = thrift.WrapTException(err2) | |
| } | |
| if _write_err576 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err576, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorAppendSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err578 thrift.TException | |
| args := IClientRPCServiceAppendSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceAppendSchemaTemplateResult{} | |
| if retval, err2 := p.handler.AppendSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc579 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing appendSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc579.Write(ctx, oprot); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if _write_err578 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err578, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err578 == nil && err2 != nil { | |
| _write_err578 = thrift.WrapTException(err2) | |
| } | |
| if _write_err578 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err578, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorPruneSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err580 thrift.TException | |
| args := IClientRPCServicePruneSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServicePruneSchemaTemplateResult{} | |
| if retval, err2 := p.handler.PruneSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc581 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pruneSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc581.Write(ctx, oprot); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if _write_err580 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err580, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err580 == nil && err2 != nil { | |
| _write_err580 = thrift.WrapTException(err2) | |
| } | |
| if _write_err580 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err580, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorQuerySchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err582 thrift.TException | |
| args := IClientRPCServiceQuerySchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceQuerySchemaTemplateResult{} | |
| if retval, err2 := p.handler.QuerySchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc583 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing querySchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc583.Write(ctx, oprot); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if _write_err582 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err582, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err582 == nil && err2 != nil { | |
| _write_err582 = thrift.WrapTException(err2) | |
| } | |
| if _write_err582 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err582, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorShowConfigurationTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorShowConfigurationTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err584 thrift.TException | |
| args := IClientRPCServiceShowConfigurationTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceShowConfigurationTemplateResult{} | |
| if retval, err2 := p.handler.ShowConfigurationTemplate(ctx); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc585 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing showConfigurationTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc585.Write(ctx, oprot); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if _write_err584 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err584, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err584 == nil && err2 != nil { | |
| _write_err584 = thrift.WrapTException(err2) | |
| } | |
| if _write_err584 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err584, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorShowConfiguration struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorShowConfiguration) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err586 thrift.TException | |
| args := IClientRPCServiceShowConfigurationArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceShowConfigurationResult{} | |
| if retval, err2 := p.handler.ShowConfiguration(ctx, args.NodeId); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc587 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing showConfiguration: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc587.Write(ctx, oprot); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if _write_err586 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err586, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.REPLY, seqId); err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err586 == nil && err2 != nil { | |
| _write_err586 = thrift.WrapTException(err2) | |
| } | |
| if _write_err586 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err586, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorSetSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err588 thrift.TException | |
| args := IClientRPCServiceSetSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceSetSchemaTemplateResult{} | |
| if retval, err2 := p.handler.SetSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc589 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc589.Write(ctx, oprot); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if _write_err588 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err588, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err588 == nil && err2 != nil { | |
| _write_err588 = thrift.WrapTException(err2) | |
| } | |
| if _write_err588 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err588, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorUnsetSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err590 thrift.TException | |
| args := IClientRPCServiceUnsetSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceUnsetSchemaTemplateResult{} | |
| if retval, err2 := p.handler.UnsetSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc591 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unsetSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc591.Write(ctx, oprot); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if _write_err590 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err590, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err590 == nil && err2 != nil { | |
| _write_err590 = thrift.WrapTException(err2) | |
| } | |
| if _write_err590 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err590, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorDropSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err592 thrift.TException | |
| args := IClientRPCServiceDropSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceDropSchemaTemplateResult{} | |
| if retval, err2 := p.handler.DropSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc593 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing dropSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc593.Write(ctx, oprot); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if _write_err592 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err592, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err592 == nil && err2 != nil { | |
| _write_err592 = thrift.WrapTException(err2) | |
| } | |
| if _write_err592 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err592, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err594 thrift.TException | |
| args := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} | |
| if retval, err2 := p.handler.CreateTimeseriesUsingSchemaTemplate(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc595 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTimeseriesUsingSchemaTemplate: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc595.Write(ctx, oprot); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if _write_err594 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err594, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.REPLY, seqId); err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err594 == nil && err2 != nil { | |
| _write_err594 = thrift.WrapTException(err2) | |
| } | |
| if _write_err594 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err594, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorHandshake struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err596 thrift.TException | |
| args := IClientRPCServiceHandshakeArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "handshake", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceHandshakeResult{} | |
| if retval, err2 := p.handler.Handshake(ctx, args.Info); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc597 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing handshake: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "handshake", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc597.Write(ctx, oprot); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if _write_err596 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err596, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "handshake", thrift.REPLY, seqId); err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err596 == nil && err2 != nil { | |
| _write_err596 = thrift.WrapTException(err2) | |
| } | |
| if _write_err596 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err596, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorSendPipeData struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err598 thrift.TException | |
| args := IClientRPCServiceSendPipeDataArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceSendPipeDataResult{} | |
| if retval, err2 := p.handler.SendPipeData(ctx, args.Buff); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc599 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendPipeData: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc599.Write(ctx, oprot); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if _write_err598 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err598, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.REPLY, seqId); err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err598 == nil && err2 != nil { | |
| _write_err598 = thrift.WrapTException(err2) | |
| } | |
| if _write_err598 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err598, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorSendFile struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorSendFile) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err600 thrift.TException | |
| args := IClientRPCServiceSendFileArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceSendFileResult{} | |
| if retval, err2 := p.handler.SendFile(ctx, args.MetaInfo, args.Buff); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc601 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendFile: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc601.Write(ctx, oprot); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if _write_err600 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err600, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "sendFile", thrift.REPLY, seqId); err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err600 == nil && err2 != nil { | |
| _write_err600 = thrift.WrapTException(err2) | |
| } | |
| if _write_err600 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err600, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorPipeTransfer struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorPipeTransfer) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err602 thrift.TException | |
| args := IClientRPCServicePipeTransferArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServicePipeTransferResult{} | |
| if retval, err2 := p.handler.PipeTransfer(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc603 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pipeTransfer: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc603.Write(ctx, oprot); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if _write_err602 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err602, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.REPLY, seqId); err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err602 == nil && err2 != nil { | |
| _write_err602 = thrift.WrapTException(err2) | |
| } | |
| if _write_err602 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err602, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorPipeSubscribe struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorPipeSubscribe) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err604 thrift.TException | |
| args := IClientRPCServicePipeSubscribeArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServicePipeSubscribeResult{} | |
| if retval, err2 := p.handler.PipeSubscribe(ctx, args.Req); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc605 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pipeSubscribe: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc605.Write(ctx, oprot); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if _write_err604 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err604, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.REPLY, seqId); err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err604 == nil && err2 != nil { | |
| _write_err604 = thrift.WrapTException(err2) | |
| } | |
| if _write_err604 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err604, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorGetBackupConfiguration struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorGetBackupConfiguration) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err606 thrift.TException | |
| args := IClientRPCServiceGetBackupConfigurationArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceGetBackupConfigurationResult{} | |
| if retval, err2 := p.handler.GetBackupConfiguration(ctx); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc607 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getBackupConfiguration: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc607.Write(ctx, oprot); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if _write_err606 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err606, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.REPLY, seqId); err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err606 == nil && err2 != nil { | |
| _write_err606 = thrift.WrapTException(err2) | |
| } | |
| if _write_err606 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err606, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorFetchAllConnectionsInfo struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorFetchAllConnectionsInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err608 thrift.TException | |
| args := IClientRPCServiceFetchAllConnectionsInfoArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceFetchAllConnectionsInfoResult{} | |
| if retval, err2 := p.handler.FetchAllConnectionsInfo(ctx); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc609 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchAllConnectionsInfo: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc609.Write(ctx, oprot); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if _write_err608 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err608, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.REPLY, seqId); err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err608 == nil && err2 != nil { | |
| _write_err608 = thrift.WrapTException(err2) | |
| } | |
| if _write_err608 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err608, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| type iClientRPCServiceProcessorTestConnectionEmptyRPC struct { | |
| handler IClientRPCService | |
| } | |
| func (p *iClientRPCServiceProcessorTestConnectionEmptyRPC) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { | |
| var _write_err610 thrift.TException | |
| args := IClientRPCServiceTestConnectionEmptyRPCArgs{} | |
| if err2 := args.Read(ctx, iprot); err2 != nil { | |
| iprot.ReadMessageEnd(ctx) | |
| x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) | |
| oprot.WriteMessageBegin(ctx, "testConnectionEmptyRPC", thrift.EXCEPTION, seqId) | |
| x.Write(ctx, oprot) | |
| oprot.WriteMessageEnd(ctx) | |
| oprot.Flush(ctx) | |
| return false, thrift.WrapTException(err2) | |
| } | |
| iprot.ReadMessageEnd(ctx) | |
| tickerCancel := func() {} | |
| // Start a goroutine to do server side connectivity check. | |
| if thrift.ServerConnectivityCheckInterval > 0 { | |
| var cancel context.CancelCauseFunc | |
| ctx, cancel = context.WithCancelCause(ctx) | |
| defer cancel(nil) | |
| var tickerCtx context.Context | |
| tickerCtx, tickerCancel = context.WithCancel(context.Background()) | |
| defer tickerCancel() | |
| go func(ctx context.Context, cancel context.CancelCauseFunc) { | |
| ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) | |
| defer ticker.Stop() | |
| for { | |
| select { | |
| case <-ctx.Done(): | |
| return | |
| case <-ticker.C: | |
| if !iprot.Transport().IsOpen() { | |
| cancel(thrift.ErrAbandonRequest) | |
| return | |
| } | |
| } | |
| } | |
| }(tickerCtx, cancel) | |
| } | |
| result := IClientRPCServiceTestConnectionEmptyRPCResult{} | |
| if retval, err2 := p.handler.TestConnectionEmptyRPC(ctx); err2 != nil { | |
| tickerCancel() | |
| err = thrift.WrapTException(err2) | |
| if errors.Is(err2, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err2), | |
| EndpointError: err, | |
| } | |
| } | |
| if errors.Is(err2, context.Canceled) { | |
| if err3 := context.Cause(ctx); errors.Is(err3, thrift.ErrAbandonRequest) { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: thrift.WrapTException(err3), | |
| EndpointError: err, | |
| } | |
| } | |
| } | |
| _exc611 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testConnectionEmptyRPC: " + err2.Error()) | |
| if err2 := oprot.WriteMessageBegin(ctx, "testConnectionEmptyRPC", thrift.EXCEPTION, seqId); err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := _exc611.Write(ctx, oprot); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if _write_err610 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err610, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } else { | |
| result.Success = retval | |
| } | |
| tickerCancel() | |
| if err2 := oprot.WriteMessageBegin(ctx, "testConnectionEmptyRPC", thrift.REPLY, seqId); err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := result.Write(ctx, oprot); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.WriteMessageEnd(ctx); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if err2 := oprot.Flush(ctx); _write_err610 == nil && err2 != nil { | |
| _write_err610 = thrift.WrapTException(err2) | |
| } | |
| if _write_err610 != nil { | |
| return false, &thrift.ProcessorError{ | |
| WriteError: _write_err610, | |
| EndpointError: err, | |
| } | |
| } | |
| return true, err | |
| } | |
| // HELPER FUNCTIONS AND STRUCTURES | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteQueryStatementV2Args struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteQueryStatementV2Args() *IClientRPCServiceExecuteQueryStatementV2Args { | |
| return &IClientRPCServiceExecuteQueryStatementV2Args{} | |
| } | |
| var IClientRPCServiceExecuteQueryStatementV2Args_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteQueryStatementV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeQueryStatementV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteQueryStatementV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteQueryStatementV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteQueryStatementV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteQueryStatementV2Result() *IClientRPCServiceExecuteQueryStatementV2Result { | |
| return &IClientRPCServiceExecuteQueryStatementV2Result{} | |
| } | |
| var IClientRPCServiceExecuteQueryStatementV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteQueryStatementV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeQueryStatementV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteQueryStatementV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteQueryStatementV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteUpdateStatementV2Args struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteUpdateStatementV2Args() *IClientRPCServiceExecuteUpdateStatementV2Args { | |
| return &IClientRPCServiceExecuteUpdateStatementV2Args{} | |
| } | |
| var IClientRPCServiceExecuteUpdateStatementV2Args_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteUpdateStatementV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeUpdateStatementV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteUpdateStatementV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteUpdateStatementV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteUpdateStatementV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteUpdateStatementV2Result() *IClientRPCServiceExecuteUpdateStatementV2Result { | |
| return &IClientRPCServiceExecuteUpdateStatementV2Result{} | |
| } | |
| var IClientRPCServiceExecuteUpdateStatementV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteUpdateStatementV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeUpdateStatementV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteUpdateStatementV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteUpdateStatementV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteStatementV2Args struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteStatementV2Args() *IClientRPCServiceExecuteStatementV2Args { | |
| return &IClientRPCServiceExecuteStatementV2Args{} | |
| } | |
| var IClientRPCServiceExecuteStatementV2Args_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteStatementV2Args) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteStatementV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeStatementV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteStatementV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteStatementV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteStatementV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteStatementV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteStatementV2Result() *IClientRPCServiceExecuteStatementV2Result { | |
| return &IClientRPCServiceExecuteStatementV2Result{} | |
| } | |
| var IClientRPCServiceExecuteStatementV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteStatementV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteStatementV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeStatementV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteStatementV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteStatementV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteStatementV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteStatementV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteRawDataQueryV2Args struct { | |
| Req *TSRawDataQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteRawDataQueryV2Args() *IClientRPCServiceExecuteRawDataQueryV2Args { | |
| return &IClientRPCServiceExecuteRawDataQueryV2Args{} | |
| } | |
| var IClientRPCServiceExecuteRawDataQueryV2Args_Req_DEFAULT *TSRawDataQueryReq | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) GetReq() *TSRawDataQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteRawDataQueryV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSRawDataQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeRawDataQueryV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteRawDataQueryV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteRawDataQueryV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteRawDataQueryV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteRawDataQueryV2Result() *IClientRPCServiceExecuteRawDataQueryV2Result { | |
| return &IClientRPCServiceExecuteRawDataQueryV2Result{} | |
| } | |
| var IClientRPCServiceExecuteRawDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteRawDataQueryV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeRawDataQueryV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteRawDataQueryV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteRawDataQueryV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteLastDataQueryV2Args struct { | |
| Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteLastDataQueryV2Args() *IClientRPCServiceExecuteLastDataQueryV2Args { | |
| return &IClientRPCServiceExecuteLastDataQueryV2Args{} | |
| } | |
| var IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT *TSLastDataQueryReq | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) GetReq() *TSLastDataQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSLastDataQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteLastDataQueryV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteLastDataQueryV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteLastDataQueryV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteLastDataQueryV2Result() *IClientRPCServiceExecuteLastDataQueryV2Result { | |
| return &IClientRPCServiceExecuteLastDataQueryV2Result{} | |
| } | |
| var IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteLastDataQueryV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteLastDataQueryV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs struct { | |
| Req *TSFastLastDataQueryForOnePrefixPathReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs() *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs { | |
| return &IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs{} | |
| } | |
| var IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs_Req_DEFAULT *TSFastLastDataQueryForOnePrefixPathReq | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) GetReq() *TSFastLastDataQueryForOnePrefixPathReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSFastLastDataQueryForOnePrefixPathReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOnePrefixPath_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult() *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult { | |
| return &IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult{} | |
| } | |
| var IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOnePrefixPath_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args struct { | |
| Req *TSFastLastDataQueryForOneDeviceReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args() *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { | |
| return &IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args{} | |
| } | |
| var IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args_Req_DEFAULT *TSFastLastDataQueryForOneDeviceReq | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) GetReq() *TSFastLastDataQueryForOneDeviceReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSFastLastDataQueryForOneDeviceReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOneDeviceV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result() *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { | |
| return &IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result{} | |
| } | |
| var IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOneDeviceV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteAggregationQueryV2Args struct { | |
| Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteAggregationQueryV2Args() *IClientRPCServiceExecuteAggregationQueryV2Args { | |
| return &IClientRPCServiceExecuteAggregationQueryV2Args{} | |
| } | |
| var IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT *TSAggregationQueryReq | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) GetReq() *TSAggregationQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSAggregationQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteAggregationQueryV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteAggregationQueryV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteAggregationQueryV2Result struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteAggregationQueryV2Result() *IClientRPCServiceExecuteAggregationQueryV2Result { | |
| return &IClientRPCServiceExecuteAggregationQueryV2Result{} | |
| } | |
| var IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteAggregationQueryV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteAggregationQueryV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceFetchResultsV2Args struct { | |
| Req *TSFetchResultsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceFetchResultsV2Args() *IClientRPCServiceFetchResultsV2Args { | |
| return &IClientRPCServiceFetchResultsV2Args{} | |
| } | |
| var IClientRPCServiceFetchResultsV2Args_Req_DEFAULT *TSFetchResultsReq | |
| func (p *IClientRPCServiceFetchResultsV2Args) GetReq() *TSFetchResultsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceFetchResultsV2Args_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSFetchResultsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchResultsV2_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchResultsV2Args(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Args) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchResultsV2Args", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchResultsV2Args)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceFetchResultsV2Result struct { | |
| Success *TSFetchResultsResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceFetchResultsV2Result() *IClientRPCServiceFetchResultsV2Result { | |
| return &IClientRPCServiceFetchResultsV2Result{} | |
| } | |
| var IClientRPCServiceFetchResultsV2Result_Success_DEFAULT *TSFetchResultsResp | |
| func (p *IClientRPCServiceFetchResultsV2Result) GetSuccess() *TSFetchResultsResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceFetchResultsV2Result_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSFetchResultsResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchResultsV2_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchResultsV2Result(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchResultsV2Result) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchResultsV2Result", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchResultsV2Result)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceOpenSessionArgs struct { | |
| Req *TSOpenSessionReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceOpenSessionArgs() *IClientRPCServiceOpenSessionArgs { | |
| return &IClientRPCServiceOpenSessionArgs{} | |
| } | |
| var IClientRPCServiceOpenSessionArgs_Req_DEFAULT *TSOpenSessionReq | |
| func (p *IClientRPCServiceOpenSessionArgs) GetReq() *TSOpenSessionReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceOpenSessionArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSOpenSessionReq{ | |
| ClientProtocol: 2, | |
| } | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "openSession_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceOpenSessionArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceOpenSessionArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceOpenSessionArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceOpenSessionArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceOpenSessionResult struct { | |
| Success *TSOpenSessionResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceOpenSessionResult() *IClientRPCServiceOpenSessionResult { | |
| return &IClientRPCServiceOpenSessionResult{} | |
| } | |
| var IClientRPCServiceOpenSessionResult_Success_DEFAULT *TSOpenSessionResp | |
| func (p *IClientRPCServiceOpenSessionResult) GetSuccess() *TSOpenSessionResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceOpenSessionResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSOpenSessionResp{ | |
| ServerProtocolVersion: 0, | |
| } | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "openSession_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceOpenSessionResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceOpenSessionResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceOpenSessionResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceOpenSessionResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCloseSessionArgs struct { | |
| Req *TSCloseSessionReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCloseSessionArgs() *IClientRPCServiceCloseSessionArgs { | |
| return &IClientRPCServiceCloseSessionArgs{} | |
| } | |
| var IClientRPCServiceCloseSessionArgs_Req_DEFAULT *TSCloseSessionReq | |
| func (p *IClientRPCServiceCloseSessionArgs) GetReq() *TSCloseSessionReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCloseSessionArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCloseSessionReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "closeSession_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCloseSessionArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCloseSessionArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCloseSessionArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCloseSessionArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCloseSessionResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCloseSessionResult() *IClientRPCServiceCloseSessionResult { | |
| return &IClientRPCServiceCloseSessionResult{} | |
| } | |
| var IClientRPCServiceCloseSessionResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCloseSessionResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCloseSessionResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "closeSession_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCloseSessionResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCloseSessionResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCloseSessionResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCloseSessionResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteStatementArgs struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteStatementArgs() *IClientRPCServiceExecuteStatementArgs { | |
| return &IClientRPCServiceExecuteStatementArgs{} | |
| } | |
| var IClientRPCServiceExecuteStatementArgs_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteStatementArgs) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteStatementResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteStatementResult() *IClientRPCServiceExecuteStatementResult { | |
| return &IClientRPCServiceExecuteStatementResult{} | |
| } | |
| var IClientRPCServiceExecuteStatementResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteStatementResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteBatchStatementArgs struct { | |
| Req *TSExecuteBatchStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteBatchStatementArgs() *IClientRPCServiceExecuteBatchStatementArgs { | |
| return &IClientRPCServiceExecuteBatchStatementArgs{} | |
| } | |
| var IClientRPCServiceExecuteBatchStatementArgs_Req_DEFAULT *TSExecuteBatchStatementReq | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) GetReq() *TSExecuteBatchStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteBatchStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteBatchStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteBatchStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteBatchStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteBatchStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteBatchStatementResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteBatchStatementResult() *IClientRPCServiceExecuteBatchStatementResult { | |
| return &IClientRPCServiceExecuteBatchStatementResult{} | |
| } | |
| var IClientRPCServiceExecuteBatchStatementResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteBatchStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteBatchStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteBatchStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteBatchStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteBatchStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteQueryStatementArgs struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteQueryStatementArgs() *IClientRPCServiceExecuteQueryStatementArgs { | |
| return &IClientRPCServiceExecuteQueryStatementArgs{} | |
| } | |
| var IClientRPCServiceExecuteQueryStatementArgs_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteQueryStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteQueryStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteQueryStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteQueryStatementResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteQueryStatementResult() *IClientRPCServiceExecuteQueryStatementResult { | |
| return &IClientRPCServiceExecuteQueryStatementResult{} | |
| } | |
| var IClientRPCServiceExecuteQueryStatementResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteQueryStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteQueryStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteQueryStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteQueryStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteUpdateStatementArgs struct { | |
| Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteUpdateStatementArgs() *IClientRPCServiceExecuteUpdateStatementArgs { | |
| return &IClientRPCServiceExecuteUpdateStatementArgs{} | |
| } | |
| var IClientRPCServiceExecuteUpdateStatementArgs_Req_DEFAULT *TSExecuteStatementReq | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) GetReq() *TSExecuteStatementReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteUpdateStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecuteStatementReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteUpdateStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteUpdateStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteUpdateStatementResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteUpdateStatementResult() *IClientRPCServiceExecuteUpdateStatementResult { | |
| return &IClientRPCServiceExecuteUpdateStatementResult{} | |
| } | |
| var IClientRPCServiceExecuteUpdateStatementResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteUpdateStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteUpdateStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteUpdateStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteUpdateStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceFetchResultsArgs struct { | |
| Req *TSFetchResultsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceFetchResultsArgs() *IClientRPCServiceFetchResultsArgs { | |
| return &IClientRPCServiceFetchResultsArgs{} | |
| } | |
| var IClientRPCServiceFetchResultsArgs_Req_DEFAULT *TSFetchResultsReq | |
| func (p *IClientRPCServiceFetchResultsArgs) GetReq() *TSFetchResultsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceFetchResultsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSFetchResultsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchResults_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchResultsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchResultsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchResultsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchResultsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceFetchResultsResult struct { | |
| Success *TSFetchResultsResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceFetchResultsResult() *IClientRPCServiceFetchResultsResult { | |
| return &IClientRPCServiceFetchResultsResult{} | |
| } | |
| var IClientRPCServiceFetchResultsResult_Success_DEFAULT *TSFetchResultsResp | |
| func (p *IClientRPCServiceFetchResultsResult) GetSuccess() *TSFetchResultsResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceFetchResultsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSFetchResultsResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchResults_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchResultsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchResultsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchResultsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchResultsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceFetchMetadataArgs struct { | |
| Req *TSFetchMetadataReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceFetchMetadataArgs() *IClientRPCServiceFetchMetadataArgs { | |
| return &IClientRPCServiceFetchMetadataArgs{} | |
| } | |
| var IClientRPCServiceFetchMetadataArgs_Req_DEFAULT *TSFetchMetadataReq | |
| func (p *IClientRPCServiceFetchMetadataArgs) GetReq() *TSFetchMetadataReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceFetchMetadataArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSFetchMetadataReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchMetadata_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchMetadataArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchMetadataArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchMetadataArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchMetadataArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceFetchMetadataResult struct { | |
| Success *TSFetchMetadataResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceFetchMetadataResult() *IClientRPCServiceFetchMetadataResult { | |
| return &IClientRPCServiceFetchMetadataResult{} | |
| } | |
| var IClientRPCServiceFetchMetadataResult_Success_DEFAULT *TSFetchMetadataResp | |
| func (p *IClientRPCServiceFetchMetadataResult) GetSuccess() *TSFetchMetadataResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceFetchMetadataResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSFetchMetadataResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchMetadata_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchMetadataResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchMetadataResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchMetadataResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchMetadataResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCancelOperationArgs struct { | |
| Req *TSCancelOperationReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCancelOperationArgs() *IClientRPCServiceCancelOperationArgs { | |
| return &IClientRPCServiceCancelOperationArgs{} | |
| } | |
| var IClientRPCServiceCancelOperationArgs_Req_DEFAULT *TSCancelOperationReq | |
| func (p *IClientRPCServiceCancelOperationArgs) GetReq() *TSCancelOperationReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCancelOperationArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCancelOperationReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "cancelOperation_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCancelOperationArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCancelOperationArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCancelOperationArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCancelOperationArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCancelOperationResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCancelOperationResult() *IClientRPCServiceCancelOperationResult { | |
| return &IClientRPCServiceCancelOperationResult{} | |
| } | |
| var IClientRPCServiceCancelOperationResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCancelOperationResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCancelOperationResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "cancelOperation_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCancelOperationResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCancelOperationResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCancelOperationResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCancelOperationResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCloseOperationArgs struct { | |
| Req *TSCloseOperationReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCloseOperationArgs() *IClientRPCServiceCloseOperationArgs { | |
| return &IClientRPCServiceCloseOperationArgs{} | |
| } | |
| var IClientRPCServiceCloseOperationArgs_Req_DEFAULT *TSCloseOperationReq | |
| func (p *IClientRPCServiceCloseOperationArgs) GetReq() *TSCloseOperationReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCloseOperationArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCloseOperationReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "closeOperation_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCloseOperationArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCloseOperationArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCloseOperationArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCloseOperationArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCloseOperationResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCloseOperationResult() *IClientRPCServiceCloseOperationResult { | |
| return &IClientRPCServiceCloseOperationResult{} | |
| } | |
| var IClientRPCServiceCloseOperationResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCloseOperationResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCloseOperationResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "closeOperation_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCloseOperationResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCloseOperationResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCloseOperationResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCloseOperationResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServicePrepareStatementArgs struct { | |
| Req *TSPrepareReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServicePrepareStatementArgs() *IClientRPCServicePrepareStatementArgs { | |
| return &IClientRPCServicePrepareStatementArgs{} | |
| } | |
| var IClientRPCServicePrepareStatementArgs_Req_DEFAULT *TSPrepareReq | |
| func (p *IClientRPCServicePrepareStatementArgs) GetReq() *TSPrepareReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServicePrepareStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSPrepareReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "prepareStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePrepareStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePrepareStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePrepareStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePrepareStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServicePrepareStatementResult struct { | |
| Success *TSPrepareResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServicePrepareStatementResult() *IClientRPCServicePrepareStatementResult { | |
| return &IClientRPCServicePrepareStatementResult{} | |
| } | |
| var IClientRPCServicePrepareStatementResult_Success_DEFAULT *TSPrepareResp | |
| func (p *IClientRPCServicePrepareStatementResult) GetSuccess() *TSPrepareResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServicePrepareStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSPrepareResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "prepareStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePrepareStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePrepareStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePrepareStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePrepareStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecutePreparedStatementArgs struct { | |
| Req *TSExecutePreparedReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecutePreparedStatementArgs() *IClientRPCServiceExecutePreparedStatementArgs { | |
| return &IClientRPCServiceExecutePreparedStatementArgs{} | |
| } | |
| var IClientRPCServiceExecutePreparedStatementArgs_Req_DEFAULT *TSExecutePreparedReq | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) GetReq() *TSExecutePreparedReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecutePreparedStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSExecutePreparedReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executePreparedStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecutePreparedStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecutePreparedStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecutePreparedStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecutePreparedStatementResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecutePreparedStatementResult() *IClientRPCServiceExecutePreparedStatementResult { | |
| return &IClientRPCServiceExecutePreparedStatementResult{} | |
| } | |
| var IClientRPCServiceExecutePreparedStatementResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecutePreparedStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executePreparedStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecutePreparedStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecutePreparedStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecutePreparedStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecutePreparedStatementResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceDeallocatePreparedStatementArgs struct { | |
| Req *TSDeallocatePreparedReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceDeallocatePreparedStatementArgs() *IClientRPCServiceDeallocatePreparedStatementArgs { | |
| return &IClientRPCServiceDeallocatePreparedStatementArgs{} | |
| } | |
| var IClientRPCServiceDeallocatePreparedStatementArgs_Req_DEFAULT *TSDeallocatePreparedReq | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) GetReq() *TSDeallocatePreparedReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceDeallocatePreparedStatementArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSDeallocatePreparedReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deallocatePreparedStatement_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeallocatePreparedStatementArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeallocatePreparedStatementArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeallocatePreparedStatementArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceDeallocatePreparedStatementResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceDeallocatePreparedStatementResult() *IClientRPCServiceDeallocatePreparedStatementResult { | |
| return &IClientRPCServiceDeallocatePreparedStatementResult{} | |
| } | |
| var IClientRPCServiceDeallocatePreparedStatementResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceDeallocatePreparedStatementResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deallocatePreparedStatement_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeallocatePreparedStatementResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeallocatePreparedStatementResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeallocatePreparedStatementResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeallocatePreparedStatementResult)(nil) | |
| // Attributes: | |
| // - SessionId | |
| // | |
| type IClientRPCServiceGetTimeZoneArgs struct { | |
| SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` | |
| } | |
| func NewIClientRPCServiceGetTimeZoneArgs() *IClientRPCServiceGetTimeZoneArgs { | |
| return &IClientRPCServiceGetTimeZoneArgs{} | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getTimeZone_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetTimeZoneArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetTimeZoneArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetTimeZoneArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceGetTimeZoneResult struct { | |
| Success *TSGetTimeZoneResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceGetTimeZoneResult() *IClientRPCServiceGetTimeZoneResult { | |
| return &IClientRPCServiceGetTimeZoneResult{} | |
| } | |
| var IClientRPCServiceGetTimeZoneResult_Success_DEFAULT *TSGetTimeZoneResp | |
| func (p *IClientRPCServiceGetTimeZoneResult) GetSuccess() *TSGetTimeZoneResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceGetTimeZoneResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSGetTimeZoneResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getTimeZone_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetTimeZoneResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetTimeZoneResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetTimeZoneResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetTimeZoneResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceSetTimeZoneArgs struct { | |
| Req *TSSetTimeZoneReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceSetTimeZoneArgs() *IClientRPCServiceSetTimeZoneArgs { | |
| return &IClientRPCServiceSetTimeZoneArgs{} | |
| } | |
| var IClientRPCServiceSetTimeZoneArgs_Req_DEFAULT *TSSetTimeZoneReq | |
| func (p *IClientRPCServiceSetTimeZoneArgs) GetReq() *TSSetTimeZoneReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceSetTimeZoneArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSSetTimeZoneReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setTimeZone_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetTimeZoneArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetTimeZoneArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetTimeZoneArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceSetTimeZoneResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceSetTimeZoneResult() *IClientRPCServiceSetTimeZoneResult { | |
| return &IClientRPCServiceSetTimeZoneResult{} | |
| } | |
| var IClientRPCServiceSetTimeZoneResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceSetTimeZoneResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceSetTimeZoneResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setTimeZone_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetTimeZoneResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetTimeZoneResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetTimeZoneResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetTimeZoneResult)(nil) | |
| type IClientRPCServiceGetPropertiesArgs struct { | |
| } | |
| func NewIClientRPCServiceGetPropertiesArgs() *IClientRPCServiceGetPropertiesArgs { | |
| return &IClientRPCServiceGetPropertiesArgs{} | |
| } | |
| func (p *IClientRPCServiceGetPropertiesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getProperties_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetPropertiesArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetPropertiesArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetPropertiesArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetPropertiesArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceGetPropertiesResult struct { | |
| Success *ServerProperties `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceGetPropertiesResult() *IClientRPCServiceGetPropertiesResult { | |
| return &IClientRPCServiceGetPropertiesResult{} | |
| } | |
| var IClientRPCServiceGetPropertiesResult_Success_DEFAULT *ServerProperties | |
| func (p *IClientRPCServiceGetPropertiesResult) GetSuccess() *ServerProperties { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceGetPropertiesResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &ServerProperties{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getProperties_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetPropertiesResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetPropertiesResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetPropertiesResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetPropertiesResult)(nil) | |
| // Attributes: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| type IClientRPCServiceSetStorageGroupArgs struct { | |
| SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` | |
| StorageGroup string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` | |
| } | |
| func NewIClientRPCServiceSetStorageGroupArgs() *IClientRPCServiceSetStorageGroupArgs { | |
| return &IClientRPCServiceSetStorageGroupArgs{} | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) GetStorageGroup() string { | |
| return p.StorageGroup | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.StorageGroup = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setStorageGroup_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroup: ", p), err) | |
| } | |
| if err := oprot.WriteString(ctx, string(p.StorageGroup)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.storageGroup (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroup: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetStorageGroupArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetStorageGroupArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetStorageGroupArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceSetStorageGroupResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceSetStorageGroupResult() *IClientRPCServiceSetStorageGroupResult { | |
| return &IClientRPCServiceSetStorageGroupResult{} | |
| } | |
| var IClientRPCServiceSetStorageGroupResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceSetStorageGroupResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceSetStorageGroupResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setStorageGroup_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetStorageGroupResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetStorageGroupResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetStorageGroupResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetStorageGroupResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCreateTimeseriesArgs struct { | |
| Req *TSCreateTimeseriesReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCreateTimeseriesArgs() *IClientRPCServiceCreateTimeseriesArgs { | |
| return &IClientRPCServiceCreateTimeseriesArgs{} | |
| } | |
| var IClientRPCServiceCreateTimeseriesArgs_Req_DEFAULT *TSCreateTimeseriesReq | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) GetReq() *TSCreateTimeseriesReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCreateTimeseriesArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCreateTimeseriesReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createTimeseries_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateTimeseriesArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateTimeseriesArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateTimeseriesArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCreateTimeseriesResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCreateTimeseriesResult() *IClientRPCServiceCreateTimeseriesResult { | |
| return &IClientRPCServiceCreateTimeseriesResult{} | |
| } | |
| var IClientRPCServiceCreateTimeseriesResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCreateTimeseriesResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCreateTimeseriesResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createTimeseries_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateTimeseriesResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateTimeseriesResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateTimeseriesResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCreateAlignedTimeseriesArgs struct { | |
| Req *TSCreateAlignedTimeseriesReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCreateAlignedTimeseriesArgs() *IClientRPCServiceCreateAlignedTimeseriesArgs { | |
| return &IClientRPCServiceCreateAlignedTimeseriesArgs{} | |
| } | |
| var IClientRPCServiceCreateAlignedTimeseriesArgs_Req_DEFAULT *TSCreateAlignedTimeseriesReq | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) GetReq() *TSCreateAlignedTimeseriesReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCreateAlignedTimeseriesArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCreateAlignedTimeseriesReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateAlignedTimeseriesArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateAlignedTimeseriesArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateAlignedTimeseriesArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCreateAlignedTimeseriesResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCreateAlignedTimeseriesResult() *IClientRPCServiceCreateAlignedTimeseriesResult { | |
| return &IClientRPCServiceCreateAlignedTimeseriesResult{} | |
| } | |
| var IClientRPCServiceCreateAlignedTimeseriesResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCreateAlignedTimeseriesResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateAlignedTimeseriesResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateAlignedTimeseriesResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateAlignedTimeseriesResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateAlignedTimeseriesResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCreateMultiTimeseriesArgs struct { | |
| Req *TSCreateMultiTimeseriesReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCreateMultiTimeseriesArgs() *IClientRPCServiceCreateMultiTimeseriesArgs { | |
| return &IClientRPCServiceCreateMultiTimeseriesArgs{} | |
| } | |
| var IClientRPCServiceCreateMultiTimeseriesArgs_Req_DEFAULT *TSCreateMultiTimeseriesReq | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) GetReq() *TSCreateMultiTimeseriesReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCreateMultiTimeseriesArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCreateMultiTimeseriesReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateMultiTimeseriesArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateMultiTimeseriesArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateMultiTimeseriesArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCreateMultiTimeseriesResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCreateMultiTimeseriesResult() *IClientRPCServiceCreateMultiTimeseriesResult { | |
| return &IClientRPCServiceCreateMultiTimeseriesResult{} | |
| } | |
| var IClientRPCServiceCreateMultiTimeseriesResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCreateMultiTimeseriesResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateMultiTimeseriesResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateMultiTimeseriesResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateMultiTimeseriesResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateMultiTimeseriesResult)(nil) | |
| // Attributes: | |
| // - SessionId | |
| // - Path | |
| // | |
| type IClientRPCServiceDeleteTimeseriesArgs struct { | |
| SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` | |
| Path []string `thrift:"path,2" db:"path" json:"path"` | |
| } | |
| func NewIClientRPCServiceDeleteTimeseriesArgs() *IClientRPCServiceDeleteTimeseriesArgs { | |
| return &IClientRPCServiceDeleteTimeseriesArgs{} | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) GetPath() []string { | |
| return p.Path | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.Path = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem612 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem612 = v | |
| } | |
| p.Path = append(p.Path, _elem612) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "path", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Path)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.Path { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteTimeseriesArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteTimeseriesArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteTimeseriesArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceDeleteTimeseriesResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceDeleteTimeseriesResult() *IClientRPCServiceDeleteTimeseriesResult { | |
| return &IClientRPCServiceDeleteTimeseriesResult{} | |
| } | |
| var IClientRPCServiceDeleteTimeseriesResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceDeleteTimeseriesResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteTimeseriesResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteTimeseriesResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteTimeseriesResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteTimeseriesResult)(nil) | |
| // Attributes: | |
| // - SessionId | |
| // - StorageGroup | |
| // | |
| type IClientRPCServiceDeleteStorageGroupsArgs struct { | |
| SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` | |
| StorageGroup []string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` | |
| } | |
| func NewIClientRPCServiceDeleteStorageGroupsArgs() *IClientRPCServiceDeleteStorageGroupsArgs { | |
| return &IClientRPCServiceDeleteStorageGroupsArgs{} | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) GetStorageGroup() []string { | |
| return p.StorageGroup | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.LIST { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| _, size, err := iprot.ReadListBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError("error reading list begin: ", err) | |
| } | |
| tSlice := make([]string, 0, size) | |
| p.StorageGroup = tSlice | |
| for i := 0; i < size; i++ { | |
| var _elem613 string | |
| if v, err := iprot.ReadString(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| _elem613 = v | |
| } | |
| p.StorageGroup = append(p.StorageGroup, _elem613) | |
| } | |
| if err := iprot.ReadListEnd(ctx); err != nil { | |
| return thrift.PrependError("error reading list end: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.LIST, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroup: ", p), err) | |
| } | |
| if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.StorageGroup)); err != nil { | |
| return thrift.PrependError("error writing list begin: ", err) | |
| } | |
| for _, v := range p.StorageGroup { | |
| if err := oprot.WriteString(ctx, string(v)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) | |
| } | |
| } | |
| if err := oprot.WriteListEnd(ctx); err != nil { | |
| return thrift.PrependError("error writing list end: ", err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroup: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteStorageGroupsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteStorageGroupsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteStorageGroupsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceDeleteStorageGroupsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceDeleteStorageGroupsResult() *IClientRPCServiceDeleteStorageGroupsResult { | |
| return &IClientRPCServiceDeleteStorageGroupsResult{} | |
| } | |
| var IClientRPCServiceDeleteStorageGroupsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceDeleteStorageGroupsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteStorageGroupsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteStorageGroupsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteStorageGroupsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteStorageGroupsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertRecordArgs struct { | |
| Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertRecordArgs() *IClientRPCServiceInsertRecordArgs { | |
| return &IClientRPCServiceInsertRecordArgs{} | |
| } | |
| var IClientRPCServiceInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq | |
| func (p *IClientRPCServiceInsertRecordArgs) GetReq() *TSInsertRecordReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertRecordArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecord_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertRecordResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertRecordResult() *IClientRPCServiceInsertRecordResult { | |
| return &IClientRPCServiceInsertRecordResult{} | |
| } | |
| var IClientRPCServiceInsertRecordResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertRecordResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertRecordResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecord_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertStringRecordArgs struct { | |
| Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordArgs() *IClientRPCServiceInsertStringRecordArgs { | |
| return &IClientRPCServiceInsertStringRecordArgs{} | |
| } | |
| var IClientRPCServiceInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq | |
| func (p *IClientRPCServiceInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertStringRecordArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertStringRecordReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecord_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertStringRecordResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordResult() *IClientRPCServiceInsertStringRecordResult { | |
| return &IClientRPCServiceInsertStringRecordResult{} | |
| } | |
| var IClientRPCServiceInsertStringRecordResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertStringRecordResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertStringRecordResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecord_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertTabletArgs struct { | |
| Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertTabletArgs() *IClientRPCServiceInsertTabletArgs { | |
| return &IClientRPCServiceInsertTabletArgs{} | |
| } | |
| var IClientRPCServiceInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq | |
| func (p *IClientRPCServiceInsertTabletArgs) GetReq() *TSInsertTabletReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertTabletArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertTabletReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertTablet_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertTabletArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertTabletArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertTabletArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertTabletArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertTabletResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertTabletResult() *IClientRPCServiceInsertTabletResult { | |
| return &IClientRPCServiceInsertTabletResult{} | |
| } | |
| var IClientRPCServiceInsertTabletResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertTabletResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertTabletResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertTablet_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertTabletResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertTabletResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertTabletResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertTabletResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertTabletsArgs struct { | |
| Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertTabletsArgs() *IClientRPCServiceInsertTabletsArgs { | |
| return &IClientRPCServiceInsertTabletsArgs{} | |
| } | |
| var IClientRPCServiceInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq | |
| func (p *IClientRPCServiceInsertTabletsArgs) GetReq() *TSInsertTabletsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertTabletsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertTabletsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertTablets_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertTabletsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertTabletsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertTabletsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertTabletsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertTabletsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertTabletsResult() *IClientRPCServiceInsertTabletsResult { | |
| return &IClientRPCServiceInsertTabletsResult{} | |
| } | |
| var IClientRPCServiceInsertTabletsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertTabletsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertTabletsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertTablets_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertTabletsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertTabletsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertTabletsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertTabletsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertRecordsArgs struct { | |
| Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertRecordsArgs() *IClientRPCServiceInsertRecordsArgs { | |
| return &IClientRPCServiceInsertRecordsArgs{} | |
| } | |
| var IClientRPCServiceInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq | |
| func (p *IClientRPCServiceInsertRecordsArgs) GetReq() *TSInsertRecordsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertRecordsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecords_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertRecordsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertRecordsResult() *IClientRPCServiceInsertRecordsResult { | |
| return &IClientRPCServiceInsertRecordsResult{} | |
| } | |
| var IClientRPCServiceInsertRecordsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertRecordsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertRecordsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecords_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertRecordsOfOneDeviceArgs struct { | |
| Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertRecordsOfOneDeviceArgs() *IClientRPCServiceInsertRecordsOfOneDeviceArgs { | |
| return &IClientRPCServiceInsertRecordsOfOneDeviceArgs{} | |
| } | |
| var IClientRPCServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordsOfOneDeviceReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordsOfOneDeviceArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordsOfOneDeviceArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordsOfOneDeviceArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertRecordsOfOneDeviceResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertRecordsOfOneDeviceResult() *IClientRPCServiceInsertRecordsOfOneDeviceResult { | |
| return &IClientRPCServiceInsertRecordsOfOneDeviceResult{} | |
| } | |
| var IClientRPCServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertRecordsOfOneDeviceResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertRecordsOfOneDeviceResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertRecordsOfOneDeviceResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertStringRecordsOfOneDeviceArgs struct { | |
| Req *TSInsertStringRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordsOfOneDeviceArgs() *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { | |
| return &IClientRPCServiceInsertStringRecordsOfOneDeviceArgs{} | |
| } | |
| var IClientRPCServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertStringRecordsOfOneDeviceReq | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) GetReq() *TSInsertStringRecordsOfOneDeviceReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertStringRecordsOfOneDeviceReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordsOfOneDeviceArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordsOfOneDeviceArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordsOfOneDeviceArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertStringRecordsOfOneDeviceResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordsOfOneDeviceResult() *IClientRPCServiceInsertStringRecordsOfOneDeviceResult { | |
| return &IClientRPCServiceInsertStringRecordsOfOneDeviceResult{} | |
| } | |
| var IClientRPCServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordsOfOneDeviceResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordsOfOneDeviceResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordsOfOneDeviceResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceInsertStringRecordsArgs struct { | |
| Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordsArgs() *IClientRPCServiceInsertStringRecordsArgs { | |
| return &IClientRPCServiceInsertStringRecordsArgs{} | |
| } | |
| var IClientRPCServiceInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceInsertStringRecordsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertStringRecordsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecords_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceInsertStringRecordsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceInsertStringRecordsResult() *IClientRPCServiceInsertStringRecordsResult { | |
| return &IClientRPCServiceInsertStringRecordsResult{} | |
| } | |
| var IClientRPCServiceInsertStringRecordsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceInsertStringRecordsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceInsertStringRecordsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "insertStringRecords_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceInsertStringRecordsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceInsertStringRecordsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceInsertStringRecordsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceInsertStringRecordsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertTabletArgs struct { | |
| Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertTabletArgs() *IClientRPCServiceTestInsertTabletArgs { | |
| return &IClientRPCServiceTestInsertTabletArgs{} | |
| } | |
| var IClientRPCServiceTestInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq | |
| func (p *IClientRPCServiceTestInsertTabletArgs) GetReq() *TSInsertTabletReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertTabletArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertTabletReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertTablet_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertTabletArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertTabletArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertTabletArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertTabletResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertTabletResult() *IClientRPCServiceTestInsertTabletResult { | |
| return &IClientRPCServiceTestInsertTabletResult{} | |
| } | |
| var IClientRPCServiceTestInsertTabletResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertTabletResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertTabletResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertTablet_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertTabletResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertTabletResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertTabletResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertTabletsArgs struct { | |
| Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertTabletsArgs() *IClientRPCServiceTestInsertTabletsArgs { | |
| return &IClientRPCServiceTestInsertTabletsArgs{} | |
| } | |
| var IClientRPCServiceTestInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) GetReq() *TSInsertTabletsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertTabletsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertTabletsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertTablets_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertTabletsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertTabletsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertTabletsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertTabletsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertTabletsResult() *IClientRPCServiceTestInsertTabletsResult { | |
| return &IClientRPCServiceTestInsertTabletsResult{} | |
| } | |
| var IClientRPCServiceTestInsertTabletsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertTabletsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertTabletsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertTablets_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertTabletsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertTabletsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertTabletsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertTabletsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertRecordArgs struct { | |
| Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordArgs() *IClientRPCServiceTestInsertRecordArgs { | |
| return &IClientRPCServiceTestInsertRecordArgs{} | |
| } | |
| var IClientRPCServiceTestInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq | |
| func (p *IClientRPCServiceTestInsertRecordArgs) GetReq() *TSInsertRecordReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertRecordArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecord_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertRecordResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordResult() *IClientRPCServiceTestInsertRecordResult { | |
| return &IClientRPCServiceTestInsertRecordResult{} | |
| } | |
| var IClientRPCServiceTestInsertRecordResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertRecordResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertRecordResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecord_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertStringRecordArgs struct { | |
| Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertStringRecordArgs() *IClientRPCServiceTestInsertStringRecordArgs { | |
| return &IClientRPCServiceTestInsertStringRecordArgs{} | |
| } | |
| var IClientRPCServiceTestInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertStringRecordArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertStringRecordReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertStringRecordArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertStringRecordArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertStringRecordResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertStringRecordResult() *IClientRPCServiceTestInsertStringRecordResult { | |
| return &IClientRPCServiceTestInsertStringRecordResult{} | |
| } | |
| var IClientRPCServiceTestInsertStringRecordResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertStringRecordResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertStringRecordResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertStringRecordResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertRecordsArgs struct { | |
| Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordsArgs() *IClientRPCServiceTestInsertRecordsArgs { | |
| return &IClientRPCServiceTestInsertRecordsArgs{} | |
| } | |
| var IClientRPCServiceTestInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) GetReq() *TSInsertRecordsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertRecordsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecords_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertRecordsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordsResult() *IClientRPCServiceTestInsertRecordsResult { | |
| return &IClientRPCServiceTestInsertRecordsResult{} | |
| } | |
| var IClientRPCServiceTestInsertRecordsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertRecordsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertRecordsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecords_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertRecordsOfOneDeviceArgs struct { | |
| Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordsOfOneDeviceArgs() *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { | |
| return &IClientRPCServiceTestInsertRecordsOfOneDeviceArgs{} | |
| } | |
| var IClientRPCServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertRecordsOfOneDeviceReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordsOfOneDeviceArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordsOfOneDeviceArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordsOfOneDeviceArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertRecordsOfOneDeviceResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertRecordsOfOneDeviceResult() *IClientRPCServiceTestInsertRecordsOfOneDeviceResult { | |
| return &IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} | |
| } | |
| var IClientRPCServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertRecordsOfOneDeviceResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertRecordsOfOneDeviceResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertRecordsOfOneDeviceResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceTestInsertStringRecordsArgs struct { | |
| Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceTestInsertStringRecordsArgs() *IClientRPCServiceTestInsertStringRecordsArgs { | |
| return &IClientRPCServiceTestInsertStringRecordsArgs{} | |
| } | |
| var IClientRPCServiceTestInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceTestInsertStringRecordsArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSInsertStringRecordsReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordsArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertStringRecordsArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertStringRecordsArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestInsertStringRecordsResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestInsertStringRecordsResult() *IClientRPCServiceTestInsertStringRecordsResult { | |
| return &IClientRPCServiceTestInsertStringRecordsResult{} | |
| } | |
| var IClientRPCServiceTestInsertStringRecordsResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestInsertStringRecordsResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordsResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestInsertStringRecordsResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestInsertStringRecordsResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestInsertStringRecordsResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceDeleteDataArgs struct { | |
| Req *TSDeleteDataReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceDeleteDataArgs() *IClientRPCServiceDeleteDataArgs { | |
| return &IClientRPCServiceDeleteDataArgs{} | |
| } | |
| var IClientRPCServiceDeleteDataArgs_Req_DEFAULT *TSDeleteDataReq | |
| func (p *IClientRPCServiceDeleteDataArgs) GetReq() *TSDeleteDataReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceDeleteDataArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSDeleteDataReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteData_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteDataArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteDataArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteDataArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteDataArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceDeleteDataResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceDeleteDataResult() *IClientRPCServiceDeleteDataResult { | |
| return &IClientRPCServiceDeleteDataResult{} | |
| } | |
| var IClientRPCServiceDeleteDataResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceDeleteDataResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceDeleteDataResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "deleteData_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDeleteDataResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDeleteDataResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDeleteDataResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDeleteDataResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteRawDataQueryArgs struct { | |
| Req *TSRawDataQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteRawDataQueryArgs() *IClientRPCServiceExecuteRawDataQueryArgs { | |
| return &IClientRPCServiceExecuteRawDataQueryArgs{} | |
| } | |
| var IClientRPCServiceExecuteRawDataQueryArgs_Req_DEFAULT *TSRawDataQueryReq | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) GetReq() *TSRawDataQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteRawDataQueryArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSRawDataQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteRawDataQueryArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteRawDataQueryArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteRawDataQueryResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteRawDataQueryResult() *IClientRPCServiceExecuteRawDataQueryResult { | |
| return &IClientRPCServiceExecuteRawDataQueryResult{} | |
| } | |
| var IClientRPCServiceExecuteRawDataQueryResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteRawDataQueryResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteRawDataQueryResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteRawDataQueryResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteRawDataQueryResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteLastDataQueryArgs struct { | |
| Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteLastDataQueryArgs() *IClientRPCServiceExecuteLastDataQueryArgs { | |
| return &IClientRPCServiceExecuteLastDataQueryArgs{} | |
| } | |
| var IClientRPCServiceExecuteLastDataQueryArgs_Req_DEFAULT *TSLastDataQueryReq | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) GetReq() *TSLastDataQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteLastDataQueryArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSLastDataQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteLastDataQueryArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteLastDataQueryArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteLastDataQueryResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteLastDataQueryResult() *IClientRPCServiceExecuteLastDataQueryResult { | |
| return &IClientRPCServiceExecuteLastDataQueryResult{} | |
| } | |
| var IClientRPCServiceExecuteLastDataQueryResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteLastDataQueryResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteLastDataQueryResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteLastDataQueryResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteLastDataQueryResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceExecuteAggregationQueryArgs struct { | |
| Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceExecuteAggregationQueryArgs() *IClientRPCServiceExecuteAggregationQueryArgs { | |
| return &IClientRPCServiceExecuteAggregationQueryArgs{} | |
| } | |
| var IClientRPCServiceExecuteAggregationQueryArgs_Req_DEFAULT *TSAggregationQueryReq | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) GetReq() *TSAggregationQueryReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceExecuteAggregationQueryArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSAggregationQueryReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeAggregationQuery_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteAggregationQueryArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteAggregationQueryArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceExecuteAggregationQueryResult struct { | |
| Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceExecuteAggregationQueryResult() *IClientRPCServiceExecuteAggregationQueryResult { | |
| return &IClientRPCServiceExecuteAggregationQueryResult{} | |
| } | |
| var IClientRPCServiceExecuteAggregationQueryResult_Success_DEFAULT *TSExecuteStatementResp | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) GetSuccess() *TSExecuteStatementResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceExecuteAggregationQueryResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSExecuteStatementResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "executeAggregationQuery_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceExecuteAggregationQueryResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceExecuteAggregationQueryResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceExecuteAggregationQueryResult)(nil) | |
| // Attributes: | |
| // - SessionId | |
| // | |
| type IClientRPCServiceRequestStatementIdArgs struct { | |
| SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` | |
| } | |
| func NewIClientRPCServiceRequestStatementIdArgs() *IClientRPCServiceRequestStatementIdArgs { | |
| return &IClientRPCServiceRequestStatementIdArgs{} | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) GetSessionId() int64 { | |
| return p.SessionId | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.SessionId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "requestStatementId_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceRequestStatementIdArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceRequestStatementIdArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceRequestStatementIdArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceRequestStatementIdResult struct { | |
| Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceRequestStatementIdResult() *IClientRPCServiceRequestStatementIdResult { | |
| return &IClientRPCServiceRequestStatementIdResult{} | |
| } | |
| var IClientRPCServiceRequestStatementIdResult_Success_DEFAULT int64 | |
| func (p *IClientRPCServiceRequestStatementIdResult) GetSuccess() int64 { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceRequestStatementIdResult_Success_DEFAULT | |
| } | |
| return *p.Success | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.I64 { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI64(ctx); err != nil { | |
| return thrift.PrependError("error reading field 0: ", err) | |
| } else { | |
| p.Success = &v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "requestStatementId_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceRequestStatementIdResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceRequestStatementIdResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceRequestStatementIdResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceRequestStatementIdResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCreateSchemaTemplateArgs struct { | |
| Req *TSCreateSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCreateSchemaTemplateArgs() *IClientRPCServiceCreateSchemaTemplateArgs { | |
| return &IClientRPCServiceCreateSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceCreateSchemaTemplateArgs_Req_DEFAULT *TSCreateSchemaTemplateReq | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) GetReq() *TSCreateSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCreateSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSCreateSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCreateSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCreateSchemaTemplateResult() *IClientRPCServiceCreateSchemaTemplateResult { | |
| return &IClientRPCServiceCreateSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceCreateSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCreateSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceAppendSchemaTemplateArgs struct { | |
| Req *TSAppendSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceAppendSchemaTemplateArgs() *IClientRPCServiceAppendSchemaTemplateArgs { | |
| return &IClientRPCServiceAppendSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceAppendSchemaTemplateArgs_Req_DEFAULT *TSAppendSchemaTemplateReq | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) GetReq() *TSAppendSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceAppendSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSAppendSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceAppendSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceAppendSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceAppendSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceAppendSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceAppendSchemaTemplateResult() *IClientRPCServiceAppendSchemaTemplateResult { | |
| return &IClientRPCServiceAppendSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceAppendSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceAppendSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceAppendSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceAppendSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceAppendSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceAppendSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServicePruneSchemaTemplateArgs struct { | |
| Req *TSPruneSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServicePruneSchemaTemplateArgs() *IClientRPCServicePruneSchemaTemplateArgs { | |
| return &IClientRPCServicePruneSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServicePruneSchemaTemplateArgs_Req_DEFAULT *TSPruneSchemaTemplateReq | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) GetReq() *TSPruneSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServicePruneSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSPruneSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePruneSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePruneSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePruneSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServicePruneSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServicePruneSchemaTemplateResult() *IClientRPCServicePruneSchemaTemplateResult { | |
| return &IClientRPCServicePruneSchemaTemplateResult{} | |
| } | |
| var IClientRPCServicePruneSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServicePruneSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePruneSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePruneSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePruneSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePruneSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceQuerySchemaTemplateArgs struct { | |
| Req *TSQueryTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceQuerySchemaTemplateArgs() *IClientRPCServiceQuerySchemaTemplateArgs { | |
| return &IClientRPCServiceQuerySchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceQuerySchemaTemplateArgs_Req_DEFAULT *TSQueryTemplateReq | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) GetReq() *TSQueryTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceQuerySchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSQueryTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceQuerySchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceQuerySchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceQuerySchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceQuerySchemaTemplateResult struct { | |
| Success *TSQueryTemplateResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceQuerySchemaTemplateResult() *IClientRPCServiceQuerySchemaTemplateResult { | |
| return &IClientRPCServiceQuerySchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceQuerySchemaTemplateResult_Success_DEFAULT *TSQueryTemplateResp | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) GetSuccess() *TSQueryTemplateResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceQuerySchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSQueryTemplateResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceQuerySchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceQuerySchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceQuerySchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceQuerySchemaTemplateResult)(nil) | |
| type IClientRPCServiceShowConfigurationTemplateArgs struct { | |
| } | |
| func NewIClientRPCServiceShowConfigurationTemplateArgs() *IClientRPCServiceShowConfigurationTemplateArgs { | |
| return &IClientRPCServiceShowConfigurationTemplateArgs{} | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "showConfigurationTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceShowConfigurationTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceShowConfigurationTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceShowConfigurationTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceShowConfigurationTemplateResult struct { | |
| Success *common.TShowConfigurationTemplateResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceShowConfigurationTemplateResult() *IClientRPCServiceShowConfigurationTemplateResult { | |
| return &IClientRPCServiceShowConfigurationTemplateResult{} | |
| } | |
| var IClientRPCServiceShowConfigurationTemplateResult_Success_DEFAULT *common.TShowConfigurationTemplateResp | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) GetSuccess() *common.TShowConfigurationTemplateResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceShowConfigurationTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TShowConfigurationTemplateResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "showConfigurationTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceShowConfigurationTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceShowConfigurationTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceShowConfigurationTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceShowConfigurationTemplateResult)(nil) | |
| // Attributes: | |
| // - NodeId | |
| // | |
| type IClientRPCServiceShowConfigurationArgs struct { | |
| NodeId int32 `thrift:"nodeId,1" db:"nodeId" json:"nodeId"` | |
| } | |
| func NewIClientRPCServiceShowConfigurationArgs() *IClientRPCServiceShowConfigurationArgs { | |
| return &IClientRPCServiceShowConfigurationArgs{} | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) GetNodeId() int32 { | |
| return p.NodeId | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.I32 { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadI32(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.NodeId = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "showConfiguration_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "nodeId", thrift.I32, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:nodeId: ", p), err) | |
| } | |
| if err := oprot.WriteI32(ctx, int32(p.NodeId)); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.nodeId (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:nodeId: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceShowConfigurationArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceShowConfigurationArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceShowConfigurationArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceShowConfigurationArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceShowConfigurationResult struct { | |
| Success *common.TShowConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceShowConfigurationResult() *IClientRPCServiceShowConfigurationResult { | |
| return &IClientRPCServiceShowConfigurationResult{} | |
| } | |
| var IClientRPCServiceShowConfigurationResult_Success_DEFAULT *common.TShowConfigurationResp | |
| func (p *IClientRPCServiceShowConfigurationResult) GetSuccess() *common.TShowConfigurationResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceShowConfigurationResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TShowConfigurationResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "showConfiguration_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceShowConfigurationResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceShowConfigurationResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceShowConfigurationResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceShowConfigurationResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceSetSchemaTemplateArgs struct { | |
| Req *TSSetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceSetSchemaTemplateArgs() *IClientRPCServiceSetSchemaTemplateArgs { | |
| return &IClientRPCServiceSetSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceSetSchemaTemplateArgs_Req_DEFAULT *TSSetSchemaTemplateReq | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) GetReq() *TSSetSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceSetSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSSetSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceSetSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceSetSchemaTemplateResult() *IClientRPCServiceSetSchemaTemplateResult { | |
| return &IClientRPCServiceSetSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceSetSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceSetSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSetSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSetSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSetSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSetSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceUnsetSchemaTemplateArgs struct { | |
| Req *TSUnsetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceUnsetSchemaTemplateArgs() *IClientRPCServiceUnsetSchemaTemplateArgs { | |
| return &IClientRPCServiceUnsetSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceUnsetSchemaTemplateArgs_Req_DEFAULT *TSUnsetSchemaTemplateReq | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) GetReq() *TSUnsetSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceUnsetSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSUnsetSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceUnsetSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceUnsetSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceUnsetSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceUnsetSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceUnsetSchemaTemplateResult() *IClientRPCServiceUnsetSchemaTemplateResult { | |
| return &IClientRPCServiceUnsetSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceUnsetSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceUnsetSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceUnsetSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceUnsetSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceUnsetSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceUnsetSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceDropSchemaTemplateArgs struct { | |
| Req *TSDropSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceDropSchemaTemplateArgs() *IClientRPCServiceDropSchemaTemplateArgs { | |
| return &IClientRPCServiceDropSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceDropSchemaTemplateArgs_Req_DEFAULT *TSDropSchemaTemplateReq | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) GetReq() *TSDropSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceDropSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TSDropSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDropSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDropSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDropSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceDropSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceDropSchemaTemplateResult() *IClientRPCServiceDropSchemaTemplateResult { | |
| return &IClientRPCServiceDropSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceDropSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceDropSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceDropSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceDropSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceDropSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceDropSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs struct { | |
| Req *TCreateTimeseriesUsingSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` | |
| } | |
| func NewIClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs() *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { | |
| return &IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs{} | |
| } | |
| var IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs_Req_DEFAULT *TCreateTimeseriesUsingSchemaTemplateReq | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) GetReq() *TCreateTimeseriesUsingSchemaTemplateReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TCreateTimeseriesUsingSchemaTemplateReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createTimeseriesUsingSchemaTemplate_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult() *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { | |
| return &IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} | |
| } | |
| var IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "createTimeseriesUsingSchemaTemplate_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult)(nil) | |
| // Attributes: | |
| // - Info | |
| // | |
| type IClientRPCServiceHandshakeArgs struct { | |
| Info *TSyncIdentityInfo | |
| } | |
| func NewIClientRPCServiceHandshakeArgs() *IClientRPCServiceHandshakeArgs { | |
| return &IClientRPCServiceHandshakeArgs{} | |
| } | |
| var IClientRPCServiceHandshakeArgs_Info_DEFAULT *TSyncIdentityInfo | |
| func (p *IClientRPCServiceHandshakeArgs) GetInfo() *TSyncIdentityInfo { | |
| if !p.IsSetInfo() { | |
| return IClientRPCServiceHandshakeArgs_Info_DEFAULT | |
| } | |
| return p.Info | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) IsSetInfo() bool { | |
| return p.Info != nil | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case -1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField_1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Info = &TSyncIdentityInfo{} | |
| if err := p.Info.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Info), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "handshake_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField_1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) writeField_1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "info", thrift.STRUCT, -1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:info: ", p), err) | |
| } | |
| if err := p.Info.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Info), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error -1:info: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceHandshakeArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceHandshakeArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceHandshakeArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceHandshakeArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceHandshakeResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceHandshakeResult() *IClientRPCServiceHandshakeResult { | |
| return &IClientRPCServiceHandshakeResult{} | |
| } | |
| var IClientRPCServiceHandshakeResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceHandshakeResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceHandshakeResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "handshake_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceHandshakeResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceHandshakeResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceHandshakeResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceHandshakeResult)(nil) | |
| // Attributes: | |
| // - Buff | |
| // | |
| type IClientRPCServiceSendPipeDataArgs struct { | |
| Buff []byte `thrift:"buff,1" db:"buff" json:"buff"` | |
| } | |
| func NewIClientRPCServiceSendPipeDataArgs() *IClientRPCServiceSendPipeDataArgs { | |
| return &IClientRPCServiceSendPipeDataArgs{} | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) GetBuff() []byte { | |
| return p.Buff | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 1: ", err) | |
| } else { | |
| p.Buff = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "sendPipeData_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "buff", thrift.STRING, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:buff: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Buff); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.buff (1) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:buff: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSendPipeDataArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSendPipeDataArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSendPipeDataArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSendPipeDataArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceSendPipeDataResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceSendPipeDataResult() *IClientRPCServiceSendPipeDataResult { | |
| return &IClientRPCServiceSendPipeDataResult{} | |
| } | |
| var IClientRPCServiceSendPipeDataResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceSendPipeDataResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceSendPipeDataResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "sendPipeData_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSendPipeDataResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSendPipeDataResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSendPipeDataResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSendPipeDataResult)(nil) | |
| // Attributes: | |
| // - MetaInfo | |
| // - Buff | |
| // | |
| type IClientRPCServiceSendFileArgs struct { | |
| MetaInfo *TSyncTransportMetaInfo `thrift:"metaInfo,1" db:"metaInfo" json:"metaInfo"` | |
| Buff []byte `thrift:"buff,2" db:"buff" json:"buff"` | |
| } | |
| func NewIClientRPCServiceSendFileArgs() *IClientRPCServiceSendFileArgs { | |
| return &IClientRPCServiceSendFileArgs{} | |
| } | |
| var IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT *TSyncTransportMetaInfo | |
| func (p *IClientRPCServiceSendFileArgs) GetMetaInfo() *TSyncTransportMetaInfo { | |
| if !p.IsSetMetaInfo() { | |
| return IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT | |
| } | |
| return p.MetaInfo | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) GetBuff() []byte { | |
| return p.Buff | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) IsSetMetaInfo() bool { | |
| return p.MetaInfo != nil | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| case 2: | |
| if fieldTypeId == thrift.STRING { | |
| if err := p.ReadField2(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.MetaInfo = &TSyncTransportMetaInfo{} | |
| if err := p.MetaInfo.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MetaInfo), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { | |
| if v, err := iprot.ReadBinary(ctx); err != nil { | |
| return thrift.PrependError("error reading field 2: ", err) | |
| } else { | |
| p.Buff = v | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "sendFile_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField1(ctx, oprot); err != nil { return err } | |
| if err := p.writeField2(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "metaInfo", thrift.STRUCT, 1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:metaInfo: ", p), err) | |
| } | |
| if err := p.MetaInfo.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MetaInfo), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 1:metaInfo: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "buff", thrift.STRING, 2); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:buff: ", p), err) | |
| } | |
| if err := oprot.WriteBinary(ctx, p.Buff); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T.buff (2) field write error: ", p), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 2:buff: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSendFileArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSendFileArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSendFileArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSendFileArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceSendFileResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceSendFileResult() *IClientRPCServiceSendFileResult { | |
| return &IClientRPCServiceSendFileResult{} | |
| } | |
| var IClientRPCServiceSendFileResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceSendFileResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceSendFileResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceSendFileResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceSendFileResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "sendFile_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceSendFileResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceSendFileResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceSendFileResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceSendFileResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceSendFileResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceSendFileResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServicePipeTransferArgs struct { | |
| Req *TPipeTransferReq | |
| } | |
| func NewIClientRPCServicePipeTransferArgs() *IClientRPCServicePipeTransferArgs { | |
| return &IClientRPCServicePipeTransferArgs{} | |
| } | |
| var IClientRPCServicePipeTransferArgs_Req_DEFAULT *TPipeTransferReq | |
| func (p *IClientRPCServicePipeTransferArgs) GetReq() *TPipeTransferReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServicePipeTransferArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case -1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField_1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TPipeTransferReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pipeTransfer_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField_1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) writeField_1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, -1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error -1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePipeTransferArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePipeTransferArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePipeTransferArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePipeTransferArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServicePipeTransferResult struct { | |
| Success *TPipeTransferResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServicePipeTransferResult() *IClientRPCServicePipeTransferResult { | |
| return &IClientRPCServicePipeTransferResult{} | |
| } | |
| var IClientRPCServicePipeTransferResult_Success_DEFAULT *TPipeTransferResp | |
| func (p *IClientRPCServicePipeTransferResult) GetSuccess() *TPipeTransferResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServicePipeTransferResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TPipeTransferResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pipeTransfer_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePipeTransferResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePipeTransferResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePipeTransferResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePipeTransferResult)(nil) | |
| // Attributes: | |
| // - Req | |
| // | |
| type IClientRPCServicePipeSubscribeArgs struct { | |
| Req *TPipeSubscribeReq | |
| } | |
| func NewIClientRPCServicePipeSubscribeArgs() *IClientRPCServicePipeSubscribeArgs { | |
| return &IClientRPCServicePipeSubscribeArgs{} | |
| } | |
| var IClientRPCServicePipeSubscribeArgs_Req_DEFAULT *TPipeSubscribeReq | |
| func (p *IClientRPCServicePipeSubscribeArgs) GetReq() *TPipeSubscribeReq { | |
| if !p.IsSetReq() { | |
| return IClientRPCServicePipeSubscribeArgs_Req_DEFAULT | |
| } | |
| return p.Req | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) IsSetReq() bool { | |
| return p.Req != nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case -1: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField_1(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Req = &TPipeSubscribeReq{} | |
| if err := p.Req.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pipeSubscribe_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField_1(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) writeField_1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, -1); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:req: ", p), err) | |
| } | |
| if err := p.Req.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error -1:req: ", p), err) | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePipeSubscribeArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePipeSubscribeArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePipeSubscribeArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePipeSubscribeArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServicePipeSubscribeResult struct { | |
| Success *TPipeSubscribeResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServicePipeSubscribeResult() *IClientRPCServicePipeSubscribeResult { | |
| return &IClientRPCServicePipeSubscribeResult{} | |
| } | |
| var IClientRPCServicePipeSubscribeResult_Success_DEFAULT *TPipeSubscribeResp | |
| func (p *IClientRPCServicePipeSubscribeResult) GetSuccess() *TPipeSubscribeResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServicePipeSubscribeResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TPipeSubscribeResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "pipeSubscribe_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServicePipeSubscribeResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServicePipeSubscribeResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServicePipeSubscribeResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServicePipeSubscribeResult)(nil) | |
| type IClientRPCServiceGetBackupConfigurationArgs struct { | |
| } | |
| func NewIClientRPCServiceGetBackupConfigurationArgs() *IClientRPCServiceGetBackupConfigurationArgs { | |
| return &IClientRPCServiceGetBackupConfigurationArgs{} | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetBackupConfigurationArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetBackupConfigurationArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceGetBackupConfigurationResult struct { | |
| Success *TSBackupConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceGetBackupConfigurationResult() *IClientRPCServiceGetBackupConfigurationResult { | |
| return &IClientRPCServiceGetBackupConfigurationResult{} | |
| } | |
| var IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT *TSBackupConfigurationResp | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) GetSuccess() *TSBackupConfigurationResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSBackupConfigurationResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceGetBackupConfigurationResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceGetBackupConfigurationResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceGetBackupConfigurationResult)(nil) | |
| type IClientRPCServiceFetchAllConnectionsInfoArgs struct { | |
| } | |
| func NewIClientRPCServiceFetchAllConnectionsInfoArgs() *IClientRPCServiceFetchAllConnectionsInfoArgs { | |
| return &IClientRPCServiceFetchAllConnectionsInfoArgs{} | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchAllConnectionsInfoArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchAllConnectionsInfoArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceFetchAllConnectionsInfoResult struct { | |
| Success *TSConnectionInfoResp `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceFetchAllConnectionsInfoResult() *IClientRPCServiceFetchAllConnectionsInfoResult { | |
| return &IClientRPCServiceFetchAllConnectionsInfoResult{} | |
| } | |
| var IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT *TSConnectionInfoResp | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) GetSuccess() *TSConnectionInfoResp { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &TSConnectionInfoResp{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceFetchAllConnectionsInfoResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceFetchAllConnectionsInfoResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceFetchAllConnectionsInfoResult)(nil) | |
| type IClientRPCServiceTestConnectionEmptyRPCArgs struct { | |
| } | |
| func NewIClientRPCServiceTestConnectionEmptyRPCArgs() *IClientRPCServiceTestConnectionEmptyRPCArgs { | |
| return &IClientRPCServiceTestConnectionEmptyRPCArgs{} | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testConnectionEmptyRPC_args"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestConnectionEmptyRPCArgs(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestConnectionEmptyRPCArgs", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestConnectionEmptyRPCArgs)(nil) | |
| // Attributes: | |
| // - Success | |
| // | |
| type IClientRPCServiceTestConnectionEmptyRPCResult struct { | |
| Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` | |
| } | |
| func NewIClientRPCServiceTestConnectionEmptyRPCResult() *IClientRPCServiceTestConnectionEmptyRPCResult { | |
| return &IClientRPCServiceTestConnectionEmptyRPCResult{} | |
| } | |
| var IClientRPCServiceTestConnectionEmptyRPCResult_Success_DEFAULT *common.TSStatus | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) GetSuccess() *common.TSStatus { | |
| if !p.IsSetSuccess() { | |
| return IClientRPCServiceTestConnectionEmptyRPCResult_Success_DEFAULT | |
| } | |
| return p.Success | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) IsSetSuccess() bool { | |
| return p.Success != nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) Read(ctx context.Context, iprot thrift.TProtocol) error { | |
| if _, err := iprot.ReadStructBegin(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) | |
| } | |
| for { | |
| _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) | |
| if err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) | |
| } | |
| if fieldTypeId == thrift.STOP { | |
| break | |
| } | |
| switch fieldId { | |
| case 0: | |
| if fieldTypeId == thrift.STRUCT { | |
| if err := p.ReadField0(ctx, iprot); err != nil { | |
| return err | |
| } | |
| } else { | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| default: | |
| if err := iprot.Skip(ctx, fieldTypeId); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadFieldEnd(ctx); err != nil { | |
| return err | |
| } | |
| } | |
| if err := iprot.ReadStructEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { | |
| p.Success = &common.TSStatus{} | |
| if err := p.Success.Read(ctx, iprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) Write(ctx context.Context, oprot thrift.TProtocol) error { | |
| if err := oprot.WriteStructBegin(ctx, "testConnectionEmptyRPC_result"); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) | |
| } | |
| if p != nil { | |
| if err := p.writeField0(ctx, oprot); err != nil { return err } | |
| } | |
| if err := oprot.WriteFieldStop(ctx); err != nil { | |
| return thrift.PrependError("write field stop error: ", err) | |
| } | |
| if err := oprot.WriteStructEnd(ctx); err != nil { | |
| return thrift.PrependError("write struct stop error: ", err) | |
| } | |
| return nil | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
| if p.IsSetSuccess() { | |
| if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) | |
| } | |
| if err := p.Success.Write(ctx, oprot); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) | |
| } | |
| if err := oprot.WriteFieldEnd(ctx); err != nil { | |
| return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) | |
| } | |
| } | |
| return err | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) String() string { | |
| if p == nil { | |
| return "<nil>" | |
| } | |
| return fmt.Sprintf("IClientRPCServiceTestConnectionEmptyRPCResult(%+v)", *p) | |
| } | |
| func (p *IClientRPCServiceTestConnectionEmptyRPCResult) LogValue() slog.Value { | |
| if p == nil { | |
| return slog.AnyValue(nil) | |
| } | |
| v := thrift.SlogTStructWrapper{ | |
| Type: "*rpc.IClientRPCServiceTestConnectionEmptyRPCResult", | |
| Value: p, | |
| } | |
| return slog.AnyValue(v) | |
| } | |
| var _ slog.LogValuer = (*IClientRPCServiceTestConnectionEmptyRPCResult)(nil) | |