analytics

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_analytics_healthy_proto protoreflect.FileDescriptor
View Source
var File_proto_analytics_query_proto protoreflect.FileDescriptor
View Source
var File_proto_analytics_record_proto protoreflect.FileDescriptor
View Source
var File_proto_analytics_shared_proto protoreflect.FileDescriptor

Functions

func NewHealthyEndpoints

func NewHealthyEndpoints() []*api.Endpoint

func NewQueryEndpoints

func NewQueryEndpoints() []*api.Endpoint

func NewRecordEndpoints

func NewRecordEndpoints() []*api.Endpoint

func RegisterHealthyHandler added in v1.4.0

func RegisterHealthyHandler(s server.Server, hdlr HealthyHandler, opts ...server.HandlerOption) error

func RegisterQueryHandler added in v1.2.0

func RegisterQueryHandler(s server.Server, hdlr QueryHandler, opts ...server.HandlerOption) error

func RegisterRecordHandler

func RegisterRecordHandler(s server.Server, hdlr RecordHandler, opts ...server.HandlerOption) error

Types

type Agent

type Agent struct {
	SerialNumber    string `protobuf:"bytes,1,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"`       // 序列号
	SoftwareFamily  string `protobuf:"bytes,2,opt,name=softwareFamily,proto3" json:"softwareFamily,omitempty"`   // 软件家族
	SoftwareVersion string `protobuf:"bytes,3,opt,name=softwareVersion,proto3" json:"softwareVersion,omitempty"` // 软件版本
	SystemFamily    string `protobuf:"bytes,4,opt,name=systemFamily,proto3" json:"systemFamily,omitempty"`       // 系统家族
	SystemVersion   string `protobuf:"bytes,5,opt,name=systemVersion,proto3" json:"systemVersion,omitempty"`     // 系统版本
	DeviceModel     string `protobuf:"bytes,6,opt,name=deviceModel,proto3" json:"deviceModel,omitempty"`         // 设备模型
	DeviceType      string `protobuf:"bytes,7,opt,name=deviceType,proto3" json:"deviceType,omitempty"`           // 设备类型
	Profile         string `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile,omitempty"`                 // 简要资料
	// contains filtered or unexported fields
}

个体

func (*Agent) Descriptor deprecated

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

Deprecated: Use Agent.ProtoReflect.Descriptor instead.

func (*Agent) GetDeviceModel

func (x *Agent) GetDeviceModel() string

func (*Agent) GetDeviceType

func (x *Agent) GetDeviceType() string

func (*Agent) GetProfile added in v1.2.1

func (x *Agent) GetProfile() string

func (*Agent) GetSerialNumber

func (x *Agent) GetSerialNumber() string

func (*Agent) GetSoftwareFamily

func (x *Agent) GetSoftwareFamily() string

func (*Agent) GetSoftwareVersion

func (x *Agent) GetSoftwareVersion() string

func (*Agent) GetSystemFamily

func (x *Agent) GetSystemFamily() string

func (*Agent) GetSystemVersion

func (x *Agent) GetSystemVersion() string

func (*Agent) ProtoMessage

func (*Agent) ProtoMessage()

func (*Agent) ProtoReflect

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

func (*Agent) Reset

func (x *Agent) Reset()

func (*Agent) String

func (x *Agent) String() string

type BlankResponse

type BlankResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	// contains filtered or unexported fields
}

空白回复

func (*BlankResponse) Descriptor deprecated

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

Deprecated: Use BlankResponse.ProtoReflect.Descriptor instead.

func (*BlankResponse) GetStatus

func (x *BlankResponse) GetStatus() *Status

func (*BlankResponse) ProtoMessage

func (*BlankResponse) ProtoMessage()

func (*BlankResponse) ProtoReflect

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

func (*BlankResponse) Reset

func (x *BlankResponse) Reset()

func (*BlankResponse) String

func (x *BlankResponse) String() string

type EchoRequest added in v1.4.0

type EchoRequest struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

回显的请求

func (*EchoRequest) Descriptor deprecated added in v1.4.0

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMsg added in v1.4.0

func (x *EchoRequest) GetMsg() string

func (*EchoRequest) ProtoMessage added in v1.4.0

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset added in v1.4.0

func (x *EchoRequest) Reset()

func (*EchoRequest) String added in v1.4.0

func (x *EchoRequest) String() string

type EchoResponse added in v1.4.0

type EchoResponse struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

回显的回复

func (*EchoResponse) Descriptor deprecated added in v1.4.0

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMsg added in v1.4.0

func (x *EchoResponse) GetMsg() string

func (*EchoResponse) ProtoMessage added in v1.4.0

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset added in v1.4.0

func (x *EchoResponse) Reset()

func (*EchoResponse) String added in v1.4.0

func (x *EchoResponse) String() string

type Event added in v1.5.0

type Event struct {
	Id        string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`               // 事件唯一ID
	Alias     string       `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`         // 事件显示名
	Parameter []*Parameter `protobuf:"bytes,3,rep,name=parameter,proto3" json:"parameter,omitempty"` // 事件参数
	// contains filtered or unexported fields
}

事件

func (*Event) Descriptor deprecated added in v1.5.0

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAlias added in v1.5.0

func (x *Event) GetAlias() string

func (*Event) GetId added in v1.5.0

func (x *Event) GetId() string

func (*Event) GetParameter added in v1.5.0

func (x *Event) GetParameter() []*Parameter

func (*Event) ProtoMessage added in v1.5.0

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset added in v1.5.0

func (x *Event) Reset()

func (*Event) String added in v1.5.0

func (x *Event) String() string

type HealthyHandler added in v1.4.0

type HealthyHandler interface {
	// 回显
	Echo(context.Context, *EchoRequest, *EchoResponse) error
}

type HealthyService added in v1.4.0

type HealthyService interface {
	// 回显
	Echo(ctx context.Context, in *EchoRequest, opts ...client.CallOption) (*EchoResponse, error)
}

func NewHealthyService added in v1.4.0

func NewHealthyService(name string, c client.Client) HealthyService

type Parameter added in v1.5.0

type Parameter struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`     // 键
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // 值
	Type  string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`   // 类型
	// contains filtered or unexported fields
}

参数

func (*Parameter) Descriptor deprecated added in v1.5.0

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

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetKey added in v1.5.0

func (x *Parameter) GetKey() string

func (*Parameter) GetType added in v1.5.0

func (x *Parameter) GetType() string

func (*Parameter) GetValue added in v1.5.0

func (x *Parameter) GetValue() string

func (*Parameter) ProtoMessage added in v1.5.0

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

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

func (*Parameter) Reset added in v1.5.0

func (x *Parameter) Reset()

func (*Parameter) String added in v1.5.0

func (x *Parameter) String() string

type QueryAgentRequest added in v1.2.0

type QueryAgentRequest struct {
	Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // 偏移量
	Count  int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`   // 数量
	// contains filtered or unexported fields
}

查询个体的请求

func (*QueryAgentRequest) Descriptor deprecated added in v1.2.0

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

Deprecated: Use QueryAgentRequest.ProtoReflect.Descriptor instead.

func (*QueryAgentRequest) GetCount added in v1.2.0

func (x *QueryAgentRequest) GetCount() int64

func (*QueryAgentRequest) GetOffset added in v1.2.0

func (x *QueryAgentRequest) GetOffset() int64

func (*QueryAgentRequest) ProtoMessage added in v1.2.0

func (*QueryAgentRequest) ProtoMessage()

func (*QueryAgentRequest) ProtoReflect

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

func (*QueryAgentRequest) Reset added in v1.2.0

func (x *QueryAgentRequest) Reset()

func (*QueryAgentRequest) String added in v1.2.0

func (x *QueryAgentRequest) String() string

type QueryAgentResponse added in v1.2.0

type QueryAgentResponse struct {
	Status *Status  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 状态
	Total  int64    `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`  // 总数
	Agent  []*Agent `protobuf:"bytes,3,rep,name=agent,proto3" json:"agent,omitempty"`   // 个体列表
	// contains filtered or unexported fields
}

查询个体的回复

func (*QueryAgentResponse) Descriptor deprecated added in v1.2.0

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

Deprecated: Use QueryAgentResponse.ProtoReflect.Descriptor instead.

func (*QueryAgentResponse) GetAgent added in v1.2.0

func (x *QueryAgentResponse) GetAgent() []*Agent

func (*QueryAgentResponse) GetStatus added in v1.2.0

func (x *QueryAgentResponse) GetStatus() *Status

func (*QueryAgentResponse) GetTotal added in v1.2.0

func (x *QueryAgentResponse) GetTotal() int64

func (*QueryAgentResponse) ProtoMessage added in v1.2.0

func (*QueryAgentResponse) ProtoMessage()

func (*QueryAgentResponse) ProtoReflect

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

func (*QueryAgentResponse) Reset added in v1.2.0

func (x *QueryAgentResponse) Reset()

func (*QueryAgentResponse) String added in v1.2.0

func (x *QueryAgentResponse) String() string

type QueryEventRequest added in v1.5.0

type QueryEventRequest struct {
	Offset     int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`         // 偏移量
	Count      int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`           // 数量
	StartTime  int64  `protobuf:"varint,3,opt,name=startTime,proto3" json:"startTime,omitempty"`   // 开始时间
	EndTime    int64  `protobuf:"varint,4,opt,name=endTime,proto3" json:"endTime,omitempty"`       // 结束时间
	AppID      string `protobuf:"bytes,5,opt,name=appID,proto3" json:"appID,omitempty"`            // 应用ID
	DeviceID   string `protobuf:"bytes,6,opt,name=deviceID,proto3" json:"deviceID,omitempty"`      // 设备ID
	UserID     string `protobuf:"bytes,7,opt,name=userID,proto3" json:"userID,omitempty"`          // 用户ID
	EventID    string `protobuf:"bytes,8,opt,name=eventID,proto3" json:"eventID,omitempty"`        // 事件ID
	EventKey   string `protobuf:"bytes,9,opt,name=eventKey,proto3" json:"eventKey,omitempty"`      // 事件键
	EventValue string `protobuf:"bytes,10,opt,name=eventValue,proto3" json:"eventValue,omitempty"` // 事件值
	Template   string `protobuf:"bytes,11,opt,name=template,proto3" json:"template,omitempty"`     // 报表模板
	// contains filtered or unexported fields
}

查询事件的请求

func (*QueryEventRequest) Descriptor deprecated added in v1.5.0

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

Deprecated: Use QueryEventRequest.ProtoReflect.Descriptor instead.

func (*QueryEventRequest) GetAppID added in v1.5.0

func (x *QueryEventRequest) GetAppID() string

func (*QueryEventRequest) GetCount added in v1.5.0

func (x *QueryEventRequest) GetCount() int64

func (*QueryEventRequest) GetDeviceID added in v1.5.0

func (x *QueryEventRequest) GetDeviceID() string

func (*QueryEventRequest) GetEndTime added in v1.6.0

func (x *QueryEventRequest) GetEndTime() int64

func (*QueryEventRequest) GetEventID added in v1.5.0

func (x *QueryEventRequest) GetEventID() string

func (*QueryEventRequest) GetEventKey added in v1.6.0

func (x *QueryEventRequest) GetEventKey() string

func (*QueryEventRequest) GetEventValue added in v1.6.0

func (x *QueryEventRequest) GetEventValue() string

func (*QueryEventRequest) GetOffset added in v1.5.0

func (x *QueryEventRequest) GetOffset() int64

func (*QueryEventRequest) GetStartTime added in v1.6.0

func (x *QueryEventRequest) GetStartTime() int64

func (*QueryEventRequest) GetTemplate added in v1.6.0

func (x *QueryEventRequest) GetTemplate() string

func (*QueryEventRequest) GetUserID added in v1.5.0

func (x *QueryEventRequest) GetUserID() string

func (*QueryEventRequest) ProtoMessage added in v1.5.0

func (*QueryEventRequest) ProtoMessage()

func (*QueryEventRequest) ProtoReflect

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

func (*QueryEventRequest) Reset added in v1.5.0

func (x *QueryEventRequest) Reset()

func (*QueryEventRequest) String added in v1.5.0

func (x *QueryEventRequest) String() string

type QueryEventResponse added in v1.6.0

type QueryEventResponse struct {
	Status  *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`   // 状态
	Content string  `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 报表内容
	// contains filtered or unexported fields
}

查询事件的回复

func (*QueryEventResponse) Descriptor deprecated added in v1.6.0

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

Deprecated: Use QueryEventResponse.ProtoReflect.Descriptor instead.

func (*QueryEventResponse) GetContent added in v1.6.0

func (x *QueryEventResponse) GetContent() string

func (*QueryEventResponse) GetStatus added in v1.6.0

func (x *QueryEventResponse) GetStatus() *Status

func (*QueryEventResponse) ProtoMessage added in v1.6.0

func (*QueryEventResponse) ProtoMessage()

func (*QueryEventResponse) ProtoReflect

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

func (*QueryEventResponse) Reset added in v1.6.0

func (x *QueryEventResponse) Reset()

func (*QueryEventResponse) String added in v1.6.0

func (x *QueryEventResponse) String() string

type QueryHandler added in v1.2.0

type QueryHandler interface {
	// 个体
	Agent(context.Context, *QueryAgentRequest, *QueryAgentResponse) error
	// 事件
	Event(context.Context, *QueryEventRequest, *QueryEventResponse) error
}

type QueryService added in v1.2.0

type QueryService interface {
	// 个体
	Agent(ctx context.Context, in *QueryAgentRequest, opts ...client.CallOption) (*QueryAgentResponse, error)
	// 事件
	Event(ctx context.Context, in *QueryEventRequest, opts ...client.CallOption) (*QueryEventResponse, error)
}

func NewQueryService added in v1.2.0

func NewQueryService(name string, c client.Client) QueryService

type RecordActivityRequest added in v1.5.0

type RecordActivityRequest struct {
	AppID     string       `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"`         // 应用ID
	DeviceID  string       `protobuf:"bytes,2,opt,name=deviceID,proto3" json:"deviceID,omitempty"`   // 设备ID
	UserID    string       `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID,omitempty"`       // 用户ID
	EventID   string       `protobuf:"bytes,4,opt,name=eventID,proto3" json:"eventID,omitempty"`     // 事件ID
	Parameter []*Parameter `protobuf:"bytes,5,rep,name=parameter,proto3" json:"parameter,omitempty"` // 参数
	// contains filtered or unexported fields
}

记录活动的请求

func (*RecordActivityRequest) Descriptor deprecated added in v1.5.0

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

Deprecated: Use RecordActivityRequest.ProtoReflect.Descriptor instead.

func (*RecordActivityRequest) GetAppID added in v1.5.0

func (x *RecordActivityRequest) GetAppID() string

func (*RecordActivityRequest) GetDeviceID added in v1.5.0

func (x *RecordActivityRequest) GetDeviceID() string

func (*RecordActivityRequest) GetEventID added in v1.5.0

func (x *RecordActivityRequest) GetEventID() string

func (*RecordActivityRequest) GetParameter added in v1.5.0

func (x *RecordActivityRequest) GetParameter() []*Parameter

func (*RecordActivityRequest) GetUserID added in v1.5.0

func (x *RecordActivityRequest) GetUserID() string

func (*RecordActivityRequest) ProtoMessage added in v1.5.0

func (*RecordActivityRequest) ProtoMessage()

func (*RecordActivityRequest) ProtoReflect

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

func (*RecordActivityRequest) Reset added in v1.5.0

func (x *RecordActivityRequest) Reset()

func (*RecordActivityRequest) String added in v1.5.0

func (x *RecordActivityRequest) String() string

type RecordHandler

type RecordHandler interface {
	// 活跃
	Wake(context.Context, *Agent, *BlankResponse) error
	// 活动
	Activity(context.Context, *RecordActivityRequest, *BlankResponse) error
}

type RecordService

type RecordService interface {
	// 活跃
	Wake(ctx context.Context, in *Agent, opts ...client.CallOption) (*BlankResponse, error)
	// 活动
	Activity(ctx context.Context, in *RecordActivityRequest, opts ...client.CallOption) (*BlankResponse, error)
}

func NewRecordService

func NewRecordService(name string, c client.Client) RecordService

type Status

type Status struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`      // 状态码
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态信息
	// contains filtered or unexported fields
}

状态

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() int32

func (*Status) GetMessage

func (x *Status) GetMessage() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

Jump to

Keyboard shortcuts

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