WIP: meta: member and system metadata #1
54
meta/member.go
Normal file
54
meta/member.go
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user