Documentation
¶
Index ¶
- Constants
- Variables
- type BaseService
- type BaseServiceClient
- type BaseServiceProcessor
- func (p *BaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *BaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *BaseServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *BaseServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type GetServerTimeArgs
- type GetServerTimeResult
- func (p *GetServerTimeResult) GetSuccess() int64
- func (p *GetServerTimeResult) IsSetSuccess() bool
- func (p *GetServerTimeResult) Read(iprot thrift.TProtocol) error
- func (p *GetServerTimeResult) ReadField0(iprot thrift.TProtocol) error
- func (p *GetServerTimeResult) String() string
- func (p *GetServerTimeResult) Write(oprot thrift.TProtocol) error
- type GetServerVersionArgs
- type GetServerVersionResult
- func (p *GetServerVersionResult) GetSe() *errors.ServiceException
- func (p *GetServerVersionResult) GetSuccess() *Version
- func (p *GetServerVersionResult) IsSetSe() bool
- func (p *GetServerVersionResult) IsSetSuccess() bool
- func (p *GetServerVersionResult) Read(iprot thrift.TProtocol) error
- func (p *GetServerVersionResult) ReadField0(iprot thrift.TProtocol) error
- func (p *GetServerVersionResult) ReadField1(iprot thrift.TProtocol) error
- func (p *GetServerVersionResult) String() string
- func (p *GetServerVersionResult) Write(oprot thrift.TProtocol) error
- type ThriftProtocol
- type ValidateClientVersionArgs
- func (p *ValidateClientVersionArgs) GetClientVersion() *Version
- func (p *ValidateClientVersionArgs) IsSetClientVersion() bool
- func (p *ValidateClientVersionArgs) Read(iprot thrift.TProtocol) error
- func (p *ValidateClientVersionArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *ValidateClientVersionArgs) String() string
- func (p *ValidateClientVersionArgs) Write(oprot thrift.TProtocol) error
- type ValidateClientVersionResult
- func (p *ValidateClientVersionResult) GetSe() *errors.ServiceException
- func (p *ValidateClientVersionResult) IsSetSe() bool
- func (p *ValidateClientVersionResult) Read(iprot thrift.TProtocol) error
- func (p *ValidateClientVersionResult) ReadField1(iprot thrift.TProtocol) error
- func (p *ValidateClientVersionResult) String() string
- func (p *ValidateClientVersionResult) Write(oprot thrift.TProtocol) error
- type Version
- func (p *Version) GetComments() string
- func (p *Version) GetMajor() int32
- func (p *Version) GetMinor() int32
- func (p *Version) GetPatch() string
- func (p *Version) IsSetComments() bool
- func (p *Version) IsSetMajor() bool
- func (p *Version) IsSetMinor() bool
- func (p *Version) IsSetPatch() bool
- func (p *Version) Read(iprot thrift.TProtocol) error
- func (p *Version) ReadField1(iprot thrift.TProtocol) error
- func (p *Version) ReadField2(iprot thrift.TProtocol) error
- func (p *Version) ReadField3(iprot thrift.TProtocol) error
- func (p *Version) ReadField4(iprot thrift.TProtocol) error
- func (p *Version) String() string
- func (p *Version) Write(oprot thrift.TProtocol) error
Constants ¶
View Source
const ADMIN_SERVICE_PATH = "/v1/api/admin"
View Source
const API_ROOT_PATH = "/v1/api"
View Source
const AUTH_SERVICE_PATH = "/v1/api/auth"
View Source
const DEFAULT_ADMIN_CLIENT_TIMEOUT = 30000
View Source
const DEFAULT_CLIENT_CONN_TIMEOUT = 3000
View Source
const DEFAULT_CLIENT_TIMEOUT = 10000
View Source
const DEFAULT_MAX_CLIENT_TIMEOUT = 10000
View Source
const DEFAULT_SECURE_SERVICE_ENDPOINT = "https://sds.api.xiaomi.com"
View Source
const DEFAULT_SERVICE_ENDPOINT = "http://sds.api.xiaomi.com"
View Source
const DEFAULT_THRIFT_HEADER = "application/x-thrift"
View Source
const HK_ERROR_CODE_HEADER = "X-Xiaomi-Error-Code"
View Source
const HK_REQUEST_TIMEOUT = "X-Xiaomi-Request-Timeout"
View Source
const MAX_CONTENT_SIZE = 524288
View Source
const RESTFUL_SERVICE_PATH = "/v1/api/restful"
View Source
const SCAN_COUNT = "count"
View Source
const TABLE_SERVICE_PATH = "/v1/api/table"
View Source
const THRIFT_BINARY_HEADER = "application/x-thrift-binary"
View Source
const THRIFT_BINARY_PROTOCOL_ACCELERATED_CLASS = "TBinaryProtocolAccelerated"
View Source
const THRIFT_BINARY_PROTOCOL_CLASS = "TBinaryProtocol"
View Source
const THRIFT_COMPACT_HEADER = "application/x-thrift-compact"
View Source
const THRIFT_COMPACT_PROTOCOL_CLASS = "TCompactProtocol"
View Source
const THRIFT_JSON_HEADER = "application/x-thrift-json"
View Source
const THRIFT_JSON_PROTOCOL_CLASS = "TJSONProtocol"
Variables ¶
View Source
var GetServerTimeResult_Success_DEFAULT int64
View Source
var GetServerVersionResult_Se_DEFAULT *errors.ServiceException
View Source
var GoUnusedProtection__ int
View Source
var HEADER_THRIFT_MAP map[string]ThriftProtocol
View Source
var THRIFT_HEADER_MAP map[ThriftProtocol]string
View Source
var THRIFT_PROTOCOL_MAP map[ThriftProtocol]string
View Source
var ValidateClientVersionResult_Se_DEFAULT *errors.ServiceException
View Source
var Version_Comments_DEFAULT string = ""
View Source
var Version_Major_DEFAULT int32 = 1
View Source
var Version_Minor_DEFAULT int32 = 0
View Source
var Version_Patch_DEFAULT string = "328cff44"
Functions ¶
This section is empty.
Types ¶
type BaseService ¶
type BaseServiceClient ¶
type BaseServiceClient struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
结构化存储基础接口
func NewBaseServiceClientFactory ¶
func NewBaseServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *BaseServiceClient
func NewBaseServiceClientProtocol ¶
func NewBaseServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BaseServiceClient
func (*BaseServiceClient) GetServerTime ¶
func (p *BaseServiceClient) GetServerTime() (r int64, err error)
获取服务器端当前时间,1970/0/0开始的秒数,可用作ping检查联通性
func (*BaseServiceClient) GetServerVersion ¶
func (p *BaseServiceClient) GetServerVersion() (r *Version, err error)
获取服务端版本
func (*BaseServiceClient) ValidateClientVersion ¶
func (p *BaseServiceClient) ValidateClientVersion(clientVersion *Version) (err error)
检查版本兼容性
Parameters:
- ClientVersion
type BaseServiceProcessor ¶
type BaseServiceProcessor struct {
// contains filtered or unexported fields
}
func NewBaseServiceProcessor ¶
func NewBaseServiceProcessor(handler BaseService) *BaseServiceProcessor
func (*BaseServiceProcessor) AddToProcessorMap ¶
func (p *BaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*BaseServiceProcessor) GetProcessorFunction ¶
func (p *BaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*BaseServiceProcessor) Process ¶
func (p *BaseServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
func (*BaseServiceProcessor) ProcessorMap ¶
func (p *BaseServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
type GetServerTimeArgs ¶
type GetServerTimeArgs struct { }
func NewGetServerTimeArgs ¶
func NewGetServerTimeArgs() *GetServerTimeArgs
func (*GetServerTimeArgs) String ¶
func (p *GetServerTimeArgs) String() string
type GetServerTimeResult ¶
type GetServerTimeResult struct {
Success *int64 `thrift:"success,0" json:"success"`
}
func NewGetServerTimeResult ¶
func NewGetServerTimeResult() *GetServerTimeResult
func (*GetServerTimeResult) GetSuccess ¶
func (p *GetServerTimeResult) GetSuccess() int64
func (*GetServerTimeResult) IsSetSuccess ¶
func (p *GetServerTimeResult) IsSetSuccess() bool
func (*GetServerTimeResult) ReadField0 ¶
func (p *GetServerTimeResult) ReadField0(iprot thrift.TProtocol) error
func (*GetServerTimeResult) String ¶
func (p *GetServerTimeResult) String() string
type GetServerVersionArgs ¶
type GetServerVersionArgs struct { }
func NewGetServerVersionArgs ¶
func NewGetServerVersionArgs() *GetServerVersionArgs
func (*GetServerVersionArgs) Read ¶
func (p *GetServerVersionArgs) Read(iprot thrift.TProtocol) error
func (*GetServerVersionArgs) String ¶
func (p *GetServerVersionArgs) String() string
type GetServerVersionResult ¶
type GetServerVersionResult struct { Success *Version `thrift:"success,0" json:"success"` Se *errors.ServiceException `thrift:"se,1" json:"se"` }
func NewGetServerVersionResult ¶
func NewGetServerVersionResult() *GetServerVersionResult
func (*GetServerVersionResult) GetSe ¶
func (p *GetServerVersionResult) GetSe() *errors.ServiceException
func (*GetServerVersionResult) GetSuccess ¶
func (p *GetServerVersionResult) GetSuccess() *Version
func (*GetServerVersionResult) IsSetSe ¶
func (p *GetServerVersionResult) IsSetSe() bool
func (*GetServerVersionResult) IsSetSuccess ¶
func (p *GetServerVersionResult) IsSetSuccess() bool
func (*GetServerVersionResult) Read ¶
func (p *GetServerVersionResult) Read(iprot thrift.TProtocol) error
func (*GetServerVersionResult) ReadField0 ¶
func (p *GetServerVersionResult) ReadField0(iprot thrift.TProtocol) error
func (*GetServerVersionResult) ReadField1 ¶
func (p *GetServerVersionResult) ReadField1(iprot thrift.TProtocol) error
func (*GetServerVersionResult) String ¶
func (p *GetServerVersionResult) String() string
type ThriftProtocol ¶
type ThriftProtocol int64
thrift传输协议
const ( ThriftProtocol_TCOMPACT ThriftProtocol = 0 ThriftProtocol_TJSON ThriftProtocol = 1 ThriftProtocol_TBINARY ThriftProtocol = 2 ThriftProtocol_TBINARYACCELERATED ThriftProtocol = 3 )
func ThriftProtocolFromString ¶
func ThriftProtocolFromString(s string) (ThriftProtocol, error)
func ThriftProtocolPtr ¶
func ThriftProtocolPtr(v ThriftProtocol) *ThriftProtocol
func (ThriftProtocol) String ¶
func (p ThriftProtocol) String() string
type ValidateClientVersionArgs ¶
type ValidateClientVersionArgs struct {
ClientVersion *Version `thrift:"clientVersion,1" json:"clientVersion"`
}
func NewValidateClientVersionArgs ¶
func NewValidateClientVersionArgs() *ValidateClientVersionArgs
func (*ValidateClientVersionArgs) GetClientVersion ¶
func (p *ValidateClientVersionArgs) GetClientVersion() *Version
func (*ValidateClientVersionArgs) IsSetClientVersion ¶
func (p *ValidateClientVersionArgs) IsSetClientVersion() bool
func (*ValidateClientVersionArgs) Read ¶
func (p *ValidateClientVersionArgs) Read(iprot thrift.TProtocol) error
func (*ValidateClientVersionArgs) ReadField1 ¶
func (p *ValidateClientVersionArgs) ReadField1(iprot thrift.TProtocol) error
func (*ValidateClientVersionArgs) String ¶
func (p *ValidateClientVersionArgs) String() string
type ValidateClientVersionResult ¶
type ValidateClientVersionResult struct {
Se *errors.ServiceException `thrift:"se,1" json:"se"`
}
func NewValidateClientVersionResult ¶
func NewValidateClientVersionResult() *ValidateClientVersionResult
func (*ValidateClientVersionResult) GetSe ¶
func (p *ValidateClientVersionResult) GetSe() *errors.ServiceException
func (*ValidateClientVersionResult) IsSetSe ¶
func (p *ValidateClientVersionResult) IsSetSe() bool
func (*ValidateClientVersionResult) Read ¶
func (p *ValidateClientVersionResult) Read(iprot thrift.TProtocol) error
func (*ValidateClientVersionResult) ReadField1 ¶
func (p *ValidateClientVersionResult) ReadField1(iprot thrift.TProtocol) error
func (*ValidateClientVersionResult) String ¶
func (p *ValidateClientVersionResult) String() string
type Version ¶
type Version struct { Major int32 `thrift:"major,1" json:"major"` Minor int32 `thrift:"minor,2" json:"minor"` Patch string `thrift:"patch,3" json:"patch"` Comments string `thrift:"comments,4" json:"comments"` }
var GetServerVersionResult_Success_DEFAULT *Version
var ValidateClientVersionArgs_ClientVersion_DEFAULT *Version
func NewVersion ¶
func NewVersion() *Version
func (*Version) GetComments ¶
func (*Version) IsSetComments ¶
func (*Version) IsSetMajor ¶
func (*Version) IsSetMinor ¶
func (*Version) IsSetPatch ¶
Click to show internal directories.
Click to hide internal directories.