Documentation ¶
Overview ¶
Package gen implements data generators for the chat kitchen.
Index ¶
- func GenMessage(user *model.User, content string, serial int, at time.Time, ...) model.Message
- func GenRooms(min, max int, fetchImage func(image.Point) image.Image) *model.Rooms
- func GenUsers(min, max int, fetchImage func(image.Point) image.Image) *model.Users
- func ToNRGBA(c colorful.Color) color.NRGBA
- type Generator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenMessage ¶
func GenMessage( user *model.User, content string, serial int, at time.Time, fetchImage func(image.Point) image.Image, ) model.Message
GenMessage generates a message with sensible defaults.
Types ¶
type Generator ¶
type Generator struct { // FetchImage callback fetches an image of the given size. FetchImage func(image.Point) image.Image // contains filtered or unexported fields }
func (*Generator) GenHistoricMessage ¶
GenHistoryMessage generates an old message that theoretically exists at some point in history.
func (*Generator) GenNewMessage ¶
GenNewMessage generates a new message ready to be sent to the data model.
Click to show internal directories.
Click to hide internal directories.