livenote

package
v1.63.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiveNote

type LiveNote struct {
	// MessageID is the unique identifier of the message
	// for slack, it's the timestamp of the message
	MessageID string `json:"messageId"`

	ChannelID string `json:"channelId"`

	Pin bool `json:"pin"`

	TimeToLive time.Duration `json:"timeToLive"`

	Object Object
	// contains filtered or unexported fields
}

func NewLiveNote

func NewLiveNote(object Object) *LiveNote

func (*LiveNote) IsExpired

func (n *LiveNote) IsExpired(now time.Time) bool

func (*LiveNote) ObjectID

func (n *LiveNote) ObjectID() string

func (*LiveNote) SetChannelID

func (n *LiveNote) SetChannelID(channelID string)

func (*LiveNote) SetMessageID

func (n *LiveNote) SetMessageID(messageID string)

func (*LiveNote) SetObject

func (n *LiveNote) SetObject(object Object)

func (*LiveNote) SetPin

func (n *LiveNote) SetPin(enabled bool)

func (*LiveNote) SetPostedTime

func (n *LiveNote) SetPostedTime(tt time.Time)

func (*LiveNote) SetTimeToLive

func (n *LiveNote) SetTimeToLive(du time.Duration)

type Object

type Object interface {
	ObjectID() string
}

type Option

type Option interface{}

type OptionChannel

type OptionChannel struct {
	Channel string
}

func Channel

func Channel(channel string) *OptionChannel

type OptionComment

type OptionComment struct {
	Text  string
	Users []string
}

func Comment

func Comment(text string, users ...string) *OptionComment

type OptionCompare

type OptionCompare struct {
	Value bool
}

func CompareObject

func CompareObject(value bool) *OptionCompare

type OptionOneTimeMention

type OptionOneTimeMention struct {
	Users []string
}

func OneTimeMention

func OneTimeMention(users ...string) *OptionOneTimeMention

type OptionPin

type OptionPin struct {
	Value bool
}

func Pin

func Pin(value bool) *OptionPin

type OptionTimeToLive

type OptionTimeToLive struct {
	Duration time.Duration
}

func TimeToLive

func TimeToLive(du time.Duration) *OptionTimeToLive

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool(size int64) *Pool

func (*Pool) Add

func (p *Pool) Add(note *LiveNote)

func (*Pool) Get

func (p *Pool) Get(obj Object) *LiveNote

func (*Pool) Update

func (p *Pool) Update(obj Object) *LiveNote

Jump to

Keyboard shortcuts

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