base

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

README

base

base contains optimised generated code for kitex generic. base is used widely in internal systems, so we expect to have a unified place for base. It deprecates Base and BaseResp structs in kitex and dynamicgo

Users should not use this package, it's only for cloudwego internals.

The code under this package is generated by fastgo version of thriftgo which we haven't released yet and is only used in a few repos. You can find the code here.

Use thriftgo fastgo at your own risks. it's NOT fully tested and that's why we manually add test code in this package.

Documentation

Overview

Code generated by thriftgo (0.3.15) (fastgo). DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var BaseResp_Extra_DEFAULT map[string]string
View Source
var Base_Extra_DEFAULT map[string]string

Functions

This section is empty.

Types

type Base

type Base struct {
	LogID  string            `thrift:"LogID,1" json:"LogID"`
	Caller string            `thrift:"Caller,2" json:"Caller"`
	Addr   string            `thrift:"Addr,3" json:"Addr"`
	Extra  map[string]string `thrift:"Extra,6,optional" json:"Extra,omitempty"`
}

func NewBase

func NewBase() *Base

func (*Base) BLength

func (p *Base) BLength() int

func (*Base) FastRead

func (p *Base) FastRead(b []byte) (off int, err error)

func (*Base) FastWrite

func (p *Base) FastWrite(b []byte) int

func (*Base) FastWriteNocopy

func (p *Base) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int

func (*Base) GetAddr added in v0.1.1

func (p *Base) GetAddr() (v string)

func (*Base) GetCaller added in v0.1.1

func (p *Base) GetCaller() (v string)

func (*Base) GetExtra added in v0.1.1

func (p *Base) GetExtra() (v map[string]string)

func (*Base) GetLogID added in v0.1.1

func (p *Base) GetLogID() (v string)

func (*Base) InitDefault

func (p *Base) InitDefault()

func (*Base) IsSetExtra added in v0.1.1

func (p *Base) IsSetExtra() bool

func (*Base) SetAddr added in v0.1.1

func (p *Base) SetAddr(val string)

func (*Base) SetCaller added in v0.1.1

func (p *Base) SetCaller(val string)

func (*Base) SetExtra added in v0.1.1

func (p *Base) SetExtra(val map[string]string)

func (*Base) SetLogID added in v0.1.1

func (p *Base) SetLogID(val string)

func (*Base) String

func (p *Base) String() string

type BaseResp

type BaseResp struct {
	StatusMessage string            `thrift:"StatusMessage,1" json:"StatusMessage"`
	StatusCode    int32             `thrift:"StatusCode,2" json:"StatusCode"`
	Extra         map[string]string `thrift:"Extra,3,optional" json:"Extra,omitempty"`
}

func NewBaseResp

func NewBaseResp() *BaseResp

func (*BaseResp) BLength

func (p *BaseResp) BLength() int

func (*BaseResp) FastRead

func (p *BaseResp) FastRead(b []byte) (off int, err error)

func (*BaseResp) FastWrite

func (p *BaseResp) FastWrite(b []byte) int

func (*BaseResp) FastWriteNocopy

func (p *BaseResp) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int

func (*BaseResp) GetExtra added in v0.1.1

func (p *BaseResp) GetExtra() (v map[string]string)

func (*BaseResp) GetStatusCode added in v0.1.1

func (p *BaseResp) GetStatusCode() (v int32)

func (*BaseResp) GetStatusMessage added in v0.1.1

func (p *BaseResp) GetStatusMessage() (v string)

func (*BaseResp) InitDefault

func (p *BaseResp) InitDefault()

func (*BaseResp) IsSetExtra added in v0.1.1

func (p *BaseResp) IsSetExtra() bool

func (*BaseResp) SetExtra added in v0.1.1

func (p *BaseResp) SetExtra(val map[string]string)

func (*BaseResp) SetStatusCode added in v0.1.1

func (p *BaseResp) SetStatusCode(val int32)

func (*BaseResp) SetStatusMessage added in v0.1.1

func (p *BaseResp) SetStatusMessage(val string)

func (*BaseResp) String

func (p *BaseResp) String() string

Jump to

Keyboard shortcuts

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