notify

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_Response_RetType = int32(-400)
)

Default values for Response fields.

Variables

View Source
var (
	NotifyType_name = map[int32]string{
		0: "NotifyType_None",
		1: "NotifyType_GtwEvent",
		2: "NotifyType_ProgramStatus",
		3: "NotifyType_ConnStatus",
		4: "NotifyType_QotRight",
		5: "NotifyType_APILevel",
		6: "NotifyType_APIQuota",
	}
	NotifyType_value = map[string]int32{
		"NotifyType_None":          0,
		"NotifyType_GtwEvent":      1,
		"NotifyType_ProgramStatus": 2,
		"NotifyType_ConnStatus":    3,
		"NotifyType_QotRight":      4,
		"NotifyType_APILevel":      5,
		"NotifyType_APIQuota":      6,
	}
)

Enum value maps for NotifyType.

View Source
var (
	GtwEventType_name = map[int32]string{
		0:  "GtwEventType_None",
		1:  "GtwEventType_LocalCfgLoadFailed",
		2:  "GtwEventType_APISvrRunFailed",
		3:  "GtwEventType_ForceUpdate",
		4:  "GtwEventType_LoginFailed",
		5:  "GtwEventType_UnAgreeDisclaimer",
		6:  "GtwEventType_NetCfgMissing",
		7:  "GtwEventType_KickedOut",
		8:  "GtwEventType_LoginPwdChanged",
		9:  "GtwEventType_BanLogin",
		10: "GtwEventType_NeedPicVerifyCode",
		11: "GtwEventType_NeedPhoneVerifyCode",
		12: "GtwEventType_AppDataNotExist",
		13: "GtwEventType_NessaryDataMissing",
		14: "GtwEventType_TradePwdChanged",
		15: "GtwEventType_EnableDeviceLock",
	}
	GtwEventType_value = map[string]int32{
		"GtwEventType_None":                0,
		"GtwEventType_LocalCfgLoadFailed":  1,
		"GtwEventType_APISvrRunFailed":     2,
		"GtwEventType_ForceUpdate":         3,
		"GtwEventType_LoginFailed":         4,
		"GtwEventType_UnAgreeDisclaimer":   5,
		"GtwEventType_NetCfgMissing":       6,
		"GtwEventType_KickedOut":           7,
		"GtwEventType_LoginPwdChanged":     8,
		"GtwEventType_BanLogin":            9,
		"GtwEventType_NeedPicVerifyCode":   10,
		"GtwEventType_NeedPhoneVerifyCode": 11,
		"GtwEventType_AppDataNotExist":     12,
		"GtwEventType_NessaryDataMissing":  13,
		"GtwEventType_TradePwdChanged":     14,
		"GtwEventType_EnableDeviceLock":    15,
	}
)

Enum value maps for GtwEventType.

View Source
var File_Notify_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type APILevel

type APILevel struct {
	ApiLevel *string `protobuf:"bytes,3,req,name=apiLevel" json:"apiLevel,omitempty"` //api用户等级描述,已在2.10版本之后废弃
	// contains filtered or unexported fields
}

func (*APILevel) Descriptor deprecated

func (*APILevel) Descriptor() ([]byte, []int)

Deprecated: Use APILevel.ProtoReflect.Descriptor instead.

func (*APILevel) GetApiLevel

func (x *APILevel) GetApiLevel() string

func (*APILevel) ProtoMessage

func (*APILevel) ProtoMessage()

func (*APILevel) ProtoReflect

func (x *APILevel) ProtoReflect() protoreflect.Message

func (*APILevel) Reset

func (x *APILevel) Reset()

func (*APILevel) String

func (x *APILevel) String() string

type APIQuota

type APIQuota struct {
	SubQuota       *int32 `protobuf:"varint,1,req,name=subQuota" json:"subQuota,omitempty"`             //订阅额度
	HistoryKLQuota *int32 `protobuf:"varint,2,req,name=historyKLQuota" json:"historyKLQuota,omitempty"` //历史K线额度
	// contains filtered or unexported fields
}

func (*APIQuota) Descriptor deprecated

func (*APIQuota) Descriptor() ([]byte, []int)

Deprecated: Use APIQuota.ProtoReflect.Descriptor instead.

func (*APIQuota) GetHistoryKLQuota

func (x *APIQuota) GetHistoryKLQuota() int32

func (*APIQuota) GetSubQuota

func (x *APIQuota) GetSubQuota() int32

func (*APIQuota) ProtoMessage

func (*APIQuota) ProtoMessage()

func (*APIQuota) ProtoReflect

func (x *APIQuota) ProtoReflect() protoreflect.Message

func (*APIQuota) Reset

func (x *APIQuota) Reset()

func (*APIQuota) String

func (x *APIQuota) String() string

type ConnectStatus

type ConnectStatus struct {
	QotLogined *bool `protobuf:"varint,1,req,name=qotLogined" json:"qotLogined,omitempty"` //是否登陆行情服务器
	TrdLogined *bool `protobuf:"varint,2,req,name=trdLogined" json:"trdLogined,omitempty"` //是否登陆交易服务器
	// contains filtered or unexported fields
}

func (*ConnectStatus) Descriptor deprecated

func (*ConnectStatus) Descriptor() ([]byte, []int)

Deprecated: Use ConnectStatus.ProtoReflect.Descriptor instead.

func (*ConnectStatus) GetQotLogined

func (x *ConnectStatus) GetQotLogined() bool

func (*ConnectStatus) GetTrdLogined

func (x *ConnectStatus) GetTrdLogined() bool

func (*ConnectStatus) ProtoMessage

func (*ConnectStatus) ProtoMessage()

func (*ConnectStatus) ProtoReflect

func (x *ConnectStatus) ProtoReflect() protoreflect.Message

func (*ConnectStatus) Reset

func (x *ConnectStatus) Reset()

func (*ConnectStatus) String

func (x *ConnectStatus) String() string

type GtwEvent

type GtwEvent struct {
	EventType *int32  `protobuf:"varint,1,req,name=eventType" json:"eventType,omitempty"` //GtwEventType,事件类型
	Desc      *string `protobuf:"bytes,2,req,name=desc" json:"desc,omitempty"`            //事件描述
	// contains filtered or unexported fields
}

func (*GtwEvent) Descriptor deprecated

func (*GtwEvent) Descriptor() ([]byte, []int)

Deprecated: Use GtwEvent.ProtoReflect.Descriptor instead.

func (*GtwEvent) GetDesc

func (x *GtwEvent) GetDesc() string

func (*GtwEvent) GetEventType

func (x *GtwEvent) GetEventType() int32

func (*GtwEvent) ProtoMessage

func (*GtwEvent) ProtoMessage()

func (*GtwEvent) ProtoReflect

func (x *GtwEvent) ProtoReflect() protoreflect.Message

func (*GtwEvent) Reset

func (x *GtwEvent) Reset()

func (*GtwEvent) String

func (x *GtwEvent) String() string

type GtwEventType

type GtwEventType int32
const (
	GtwEventType_GtwEventType_None                GtwEventType = 0  //正常无错
	GtwEventType_GtwEventType_LocalCfgLoadFailed  GtwEventType = 1  //加载本地配置失败
	GtwEventType_GtwEventType_APISvrRunFailed     GtwEventType = 2  //服务器启动失败
	GtwEventType_GtwEventType_ForceUpdate         GtwEventType = 3  //客户端版本过低
	GtwEventType_GtwEventType_LoginFailed         GtwEventType = 4  //登录失败
	GtwEventType_GtwEventType_UnAgreeDisclaimer   GtwEventType = 5  //未同意免责声明
	GtwEventType_GtwEventType_NetCfgMissing       GtwEventType = 6  //缺少必要网络配置信息;例如控制订阅额度 //已优化,不会再出现该情况
	GtwEventType_GtwEventType_KickedOut           GtwEventType = 7  //牛牛帐号在别处登录
	GtwEventType_GtwEventType_LoginPwdChanged     GtwEventType = 8  //登录密码被修改
	GtwEventType_GtwEventType_BanLogin            GtwEventType = 9  //用户被禁止登录
	GtwEventType_GtwEventType_NeedPicVerifyCode   GtwEventType = 10 //需要图形验证码
	GtwEventType_GtwEventType_NeedPhoneVerifyCode GtwEventType = 11 //需要手机验证码
	GtwEventType_GtwEventType_AppDataNotExist     GtwEventType = 12 //程序自带数据不存在
	GtwEventType_GtwEventType_NessaryDataMissing  GtwEventType = 13 //缺少必要数据
	GtwEventType_GtwEventType_TradePwdChanged     GtwEventType = 14 //交易密码被修改
	GtwEventType_GtwEventType_EnableDeviceLock    GtwEventType = 15 //启用设备锁
)

func (GtwEventType) Descriptor

func (GtwEventType) Enum

func (x GtwEventType) Enum() *GtwEventType

func (GtwEventType) EnumDescriptor deprecated

func (GtwEventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GtwEventType.Descriptor instead.

func (GtwEventType) Number

func (GtwEventType) String

func (x GtwEventType) String() string

func (GtwEventType) Type

func (*GtwEventType) UnmarshalJSON deprecated

func (x *GtwEventType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type NotifyType

type NotifyType int32
const (
	NotifyType_NotifyType_None          NotifyType = 0 //无
	NotifyType_NotifyType_GtwEvent      NotifyType = 1 //OpenD运行事件通知
	NotifyType_NotifyType_ProgramStatus NotifyType = 2 //程序状态
	NotifyType_NotifyType_ConnStatus    NotifyType = 3 //连接状态
	NotifyType_NotifyType_QotRight      NotifyType = 4 //行情权限
	NotifyType_NotifyType_APILevel      NotifyType = 5 //用户等级,已在2.10版本之后废弃
	NotifyType_NotifyType_APIQuota      NotifyType = 6 //API额度
)

func (NotifyType) Descriptor

func (NotifyType) Descriptor() protoreflect.EnumDescriptor

func (NotifyType) Enum

func (x NotifyType) Enum() *NotifyType

func (NotifyType) EnumDescriptor deprecated

func (NotifyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use NotifyType.Descriptor instead.

func (NotifyType) Number

func (x NotifyType) Number() protoreflect.EnumNumber

func (NotifyType) String

func (x NotifyType) String() string

func (NotifyType) Type

func (*NotifyType) UnmarshalJSON deprecated

func (x *NotifyType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type ProgramStatus

type ProgramStatus struct {
	ProgramStatus *common.ProgramStatus `protobuf:"bytes,1,req,name=programStatus" json:"programStatus,omitempty"` //当前程序状态
	// contains filtered or unexported fields
}

func (*ProgramStatus) Descriptor deprecated

func (*ProgramStatus) Descriptor() ([]byte, []int)

Deprecated: Use ProgramStatus.ProtoReflect.Descriptor instead.

func (*ProgramStatus) GetProgramStatus

func (x *ProgramStatus) GetProgramStatus() *common.ProgramStatus

func (*ProgramStatus) ProtoMessage

func (*ProgramStatus) ProtoMessage()

func (*ProgramStatus) ProtoReflect

func (x *ProgramStatus) ProtoReflect() protoreflect.Message

func (*ProgramStatus) Reset

func (x *ProgramStatus) Reset()

func (*ProgramStatus) String

func (x *ProgramStatus) String() string

type QotRight

type QotRight struct {
	HkQotRight          *int32 `protobuf:"varint,4,req,name=hkQotRight" json:"hkQotRight,omitempty"`                   //港股行情权限, Qot_Common.QotRight
	UsQotRight          *int32 `protobuf:"varint,5,req,name=usQotRight" json:"usQotRight,omitempty"`                   //美股行情权限, Qot_Common.QotRight
	CnQotRight          *int32 `protobuf:"varint,6,req,name=cnQotRight" json:"cnQotRight,omitempty"`                   //A股行情权限, Qot_Common.QotRight
	HkOptionQotRight    *int32 `protobuf:"varint,7,opt,name=hkOptionQotRight" json:"hkOptionQotRight,omitempty"`       //港股期权行情权限, Qot_Common.QotRight
	HasUSOptionQotRight *bool  `protobuf:"varint,8,opt,name=hasUSOptionQotRight" json:"hasUSOptionQotRight,omitempty"` //是否有美股期权行情权限
	HkFutureQotRight    *int32 `protobuf:"varint,9,opt,name=hkFutureQotRight" json:"hkFutureQotRight,omitempty"`       //港股期货行情权限, Qot_Common.QotRight
	UsFutureQotRight    *int32 `protobuf:"varint,10,opt,name=usFutureQotRight" json:"usFutureQotRight,omitempty"`      //美股期货行情权限, Qot_Common.QotRight
	UsOptionQotRight    *int32 `protobuf:"varint,11,opt,name=usOptionQotRight" json:"usOptionQotRight,omitempty"`      //美股期货行情权限, Qot_Common.QotRight
	// contains filtered or unexported fields
}

func (*QotRight) Descriptor deprecated

func (*QotRight) Descriptor() ([]byte, []int)

Deprecated: Use QotRight.ProtoReflect.Descriptor instead.

func (*QotRight) GetCnQotRight

func (x *QotRight) GetCnQotRight() int32

func (*QotRight) GetHasUSOptionQotRight

func (x *QotRight) GetHasUSOptionQotRight() bool

func (*QotRight) GetHkFutureQotRight

func (x *QotRight) GetHkFutureQotRight() int32

func (*QotRight) GetHkOptionQotRight

func (x *QotRight) GetHkOptionQotRight() int32

func (*QotRight) GetHkQotRight

func (x *QotRight) GetHkQotRight() int32

func (*QotRight) GetUsFutureQotRight

func (x *QotRight) GetUsFutureQotRight() int32

func (*QotRight) GetUsOptionQotRight

func (x *QotRight) GetUsOptionQotRight() int32

func (*QotRight) GetUsQotRight

func (x *QotRight) GetUsQotRight() int32

func (*QotRight) ProtoMessage

func (*QotRight) ProtoMessage()

func (*QotRight) ProtoReflect

func (x *QotRight) ProtoReflect() protoreflect.Message

func (*QotRight) Reset

func (x *QotRight) Reset()

func (*QotRight) String

func (x *QotRight) String() string

type Response

type Response struct {
	RetType *int32  `protobuf:"varint,1,req,name=retType,def=-400" json:"retType,omitempty"` //RetType,返回结果
	RetMsg  *string `protobuf:"bytes,2,opt,name=retMsg" json:"retMsg,omitempty"`
	ErrCode *int32  `protobuf:"varint,3,opt,name=errCode" json:"errCode,omitempty"`
	S2C     *S2C    `protobuf:"bytes,4,opt,name=s2c" json:"s2c,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetErrCode

func (x *Response) GetErrCode() int32

func (*Response) GetRetMsg

func (x *Response) GetRetMsg() string

func (*Response) GetRetType

func (x *Response) GetRetType() int32

func (*Response) GetS2C

func (x *Response) GetS2C() *S2C

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ResponseChan

type ResponseChan chan *Response

func (ResponseChan) Close

func (ch ResponseChan) Close()

func (ResponseChan) Send

func (ch ResponseChan) Send(b []byte) error

type S2C

type S2C struct {
	Type          *int32         `protobuf:"varint,1,req,name=type" json:"type,omitempty"`                  //通知类型
	Event         *GtwEvent      `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"`                 //事件通息
	ProgramStatus *ProgramStatus `protobuf:"bytes,3,opt,name=programStatus" json:"programStatus,omitempty"` //程序状态
	ConnectStatus *ConnectStatus `protobuf:"bytes,4,opt,name=connectStatus" json:"connectStatus,omitempty"` //连接状态
	QotRight      *QotRight      `protobuf:"bytes,5,opt,name=qotRight" json:"qotRight,omitempty"`           //行情权限
	ApiLevel      *APILevel      `protobuf:"bytes,6,opt,name=apiLevel" json:"apiLevel,omitempty"`           //用户等级,已在2.10版本之后废弃
	ApiQuota      *APIQuota      `protobuf:"bytes,7,opt,name=apiQuota" json:"apiQuota,omitempty"`           //API额度
	// contains filtered or unexported fields
}

func (*S2C) Descriptor deprecated

func (*S2C) Descriptor() ([]byte, []int)

Deprecated: Use S2C.ProtoReflect.Descriptor instead.

func (*S2C) GetApiLevel

func (x *S2C) GetApiLevel() *APILevel

func (*S2C) GetApiQuota

func (x *S2C) GetApiQuota() *APIQuota

func (*S2C) GetConnectStatus

func (x *S2C) GetConnectStatus() *ConnectStatus

func (*S2C) GetEvent

func (x *S2C) GetEvent() *GtwEvent

func (*S2C) GetProgramStatus

func (x *S2C) GetProgramStatus() *ProgramStatus

func (*S2C) GetQotRight

func (x *S2C) GetQotRight() *QotRight

func (*S2C) GetType

func (x *S2C) GetType() int32

func (*S2C) ProtoMessage

func (*S2C) ProtoMessage()

func (*S2C) ProtoReflect

func (x *S2C) ProtoReflect() protoreflect.Message

func (*S2C) Reset

func (x *S2C) Reset()

func (*S2C) String

func (x *S2C) String() string

Jump to

Keyboard shortcuts

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