chat

package
Version: v0.0.0-...-f2da7a2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

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

func NewChat

func NewChat(startTime time.Time, userID string) *Chat

func (*Chat) Duration

func (c *Chat) Duration() time.Duration

func (*Chat) EndTime

func (c *Chat) EndTime() time.Time

func (*Chat) MutateLastTime

func (c *Chat) MutateLastTime(incomingLastTime time.Time)

func (*Chat) StartTime

func (c *Chat) StartTime() time.Time

func (*Chat) User

func (c *Chat) User() string

type ChatHistory

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

func NewChatHistory

func NewChatHistory(userID string, lookback time.Duration) *ChatHistory

func (*ChatHistory) AddChat

func (ch *ChatHistory) AddChat(chat ReadonlyChat)

func (*ChatHistory) Empty

func (ch *ChatHistory) Empty() bool

func (*ChatHistory) GetTotalHistoryDuration

func (ch *ChatHistory) GetTotalHistoryDuration() time.Duration

func (*ChatHistory) LastActivityTime

func (ch *ChatHistory) LastActivityTime() time.Time

type ReadonlyChat

type ReadonlyChat interface {
	StartTime() time.Time
	EndTime() time.Time
	Duration() time.Duration
	User() string
}

An interface providing 'getters' but no setters (no mutators)

Jump to

Keyboard shortcuts

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