livenote

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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