types

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelKey

type LabelKey string

LabelKey `Message.Labels' key

func (LabelKey) Equal

func (k LabelKey) Equal(s string) bool

Equal 格式化 labelkey & `s' 之后,判断是否相等

func (LabelKey) HasPrefix

func (k LabelKey) HasPrefix(s string) bool

HasPrefix 格式化 labelkey & `s' 之后,判断是否有 `s' 前缀

func (LabelKey) Normalize

func (k LabelKey) Normalize() string

Normalize 格式化 labelkey

func (LabelKey) NormalizeLabelKey

func (k LabelKey) NormalizeLabelKey() LabelKey

NormalizeLabelKey 格式化 labelkey & 转换类型

type Message

type Message struct {
	Sender  string                   `json:"sender"`
	Content interface{}              `json:"content"`
	Labels  map[LabelKey]interface{} `json:"labels"`
	Time    int64                    `json:"time,omitempty"` // UnixNano
	// contains filtered or unexported fields
}

Message 通用消息结构体

func (*Message) Before

func (m *Message) Before(t int64) bool

Before 是否早于 `t'

func (*Message) OriginContent

func (m *Message) OriginContent() interface{}

OriginContent get `Message.originContent'

func (*Message) SetOriginContent

func (m *Message) SetOriginContent(content interface{})

SetOriginContent set `Message.originContent'

Jump to

Keyboard shortcuts

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