Files
cof-spec/meta/member.go
Yonah f44d93cb3b meta: member and system metadata
This is still a work-in-progress requiring further discussion.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2026-04-20 22:00:45 +09:00

55 lines
1.2 KiB
Go

package meta
import (
"image/color"
"time"
)
// Common holds profile fields common between [System] and [Member].
type Common struct {
// Display name.
Name string `json:"name"`
// Optional description text, uninterpreted.
Description string `json:"description,omitempty"`
// Optional preferred pronouns, uninterpreted.
Pronouns string `json:"pronouns,omitempty"`
// Profile picture. The zero value implies the system profile picture.
Picture *URL `json:"picture,omitempty"`
// Optional preferred accent color.
Color *color.CMYK `json:"color,omitempty"`
// TODO(ophestra): pluralkit fields represented separately:
// id
// uuid
// created
// TODO(ophestra): unimplemented pluralkit fields:
// banner
// privacy
}
// Member describes a system member.
type Member struct {
Common
// Mutable short name, unique to the [System].
Handle string `json:"handle"`
// Optional preferred birthday.
Birthday time.Time `json:"birthday,omitempty"`
// TODO(ophestra): unimplemented pluralkit fields:
// keep_proxy
// tts
// autoproxy_enabled
// message_count
// last_message_timestamp
// proxy_tags
}
// System describes a system and its members.
type System struct {
Common
// TODO(ophestra): unimplemented pluralkit fields:
// tag
}