model

package
v0.1.124 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudEvents

type CloudEvents struct {

	// 事件唯一标识串,同一个事件来源里必须唯一
	Id string `json:"id"`

	// 事件来源上下文标识串,source+id可以唯一确定一个事件。采用URI-Reference格式,参考https://tools.ietf.org/html/rfc3986#section-4.1
	Source string `json:"source"`

	// CloudEvents协议版本,格式为major.minor
	Specversion string `json:"specversion"`

	// 事件类型
	Type string `json:"type"`

	// 事件内容格式,采用MIME格式,遵循RFC2046,参考https://tools.ietf.org/html/rfc2046
	Datacontenttype *string `json:"datacontenttype,omitempty"`

	// 件内容模型定义的URI,遵循RFC3986,参考https://tools.ietf.org/html/rfc3986#section-4.3
	Dataschema *string `json:"dataschema,omitempty"`

	// 事件的负载内容,采用datacontenttype字段指定的格式,内容字段遵循dataschema字段的描述
	Data *interface{} `json:"data,omitempty"`

	// 事件发生UTC日期时间,相同来源的事件格式相同,遵循RFC3339,格式需满足2018-04-05T17:31:00Z,参考https://tools.ietf.org/html/rfc3339
	Time *string `json:"time,omitempty"`

	// 事件发生的主题或对象,用以标识哪个具体对象发生了当前事件
	Subject *string `json:"subject,omitempty"`
}

CloudEvents CloudEvent事件格式定义,参考https://github.com/cloudevents/spec/blob/v1.0.1/spec.md

func (CloudEvents) String

func (o CloudEvents) String() string

type PutEventsReq

type PutEventsReq struct {

	// putevent请求事件
	Events *[]CloudEvents `json:"events,omitempty"`
}

func (PutEventsReq) String

func (o PutEventsReq) String() string

type PutEventsRequest

type PutEventsRequest struct {

	// 指定事件发送到的事件通道ID
	ChannelId string `json:"channel_id"`

	Body *PutEventsReq `json:"body,omitempty"`
}

PutEventsRequest Request Object

func (PutEventsRequest) String

func (o PutEventsRequest) String() string

type PutEventsResponse

type PutEventsResponse struct {
	Body *string `json:"body,omitempty"`

	XRequestId     *string `json:"X-Request-Id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

PutEventsResponse Response Object

func (PutEventsResponse) String

func (o PutEventsResponse) String() string

type PutOfficialEventsRequest added in v0.1.61

type PutOfficialEventsRequest struct {

	// 事件源名称
	SourceName string `json:"source_name"`

	Body *PutEventsReq `json:"body,omitempty"`
}

PutOfficialEventsRequest Request Object

func (PutOfficialEventsRequest) String added in v0.1.61

func (o PutOfficialEventsRequest) String() string

type PutOfficialEventsResponse added in v0.1.61

type PutOfficialEventsResponse struct {
	Body *string `json:"body,omitempty"`

	XRequestId     *string `json:"X-Request-Id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

PutOfficialEventsResponse Response Object

func (PutOfficialEventsResponse) String added in v0.1.61

func (o PutOfficialEventsResponse) String() string

Jump to

Keyboard shortcuts

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