all repos — underbbs @ fc4dca167b60553f77a3e539a6cded4614f79083

decentralized social media client

go backend
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT/foVVmI9pK13hPWFohAcXSWbK8wUCZj2fMAAKCRBohAcXSWbK
81yOAQCmvwRzo0wPBkxOH9K9l9mLnRstD02DDiAzMEBAdUWhGQD9GQDT+EkacaEJ
G1LLkniwAVvITvpxHsJDiXuGfLQEuAE=
=cUsK
-----END PGP SIGNATURE-----
commit

fc4dca167b60553f77a3e539a6cded4614f79083

parent

1c1346e7cd9041c1c12c7ab702074cc38f4a4d82

5 files changed, 59 insertions(+), 0 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,3 +1,4 @@

node_modules/ dist/*.js src/ +underbbs
A adapter/adapter.go

@@ -0,0 +1,15 @@

+package adapter + +import ( + . "forge.lightcrystal.systems/lightcrystal/underbbs/models" +) + +type Adapter interface { + Init(map[string]string, chan Message) error + Subscribe(string) error + SendMessage(Message) error + Follow(Author) error + Unfollow(Author) error + GetFollowers() error + UpdateMetadata(interface{}) error +}
A go.mod

@@ -0,0 +1,3 @@

+module forge.lightcrystal.systems/lightcrystal/underbbs + +go 1.22.0
A models/msg.go

@@ -0,0 +1,35 @@

+package models + +import ( + "time" +) + +type MessageFactory interface { + FromNostr(interface{}) Message + FromMasto(interface{}) Message +} + +type Message struct { + Author Author + Protocol string + Content string + Attachments []Attachment + ReplyTo Message + Replies []Message + Mentions []Author + Created time.Time + Aux *interface{} +} + +type Author struct { + Id string + Name string + ProfileData interface{} + Messages []Message +} + +type Attachment struct { + Src string + Data []uint8 + Desc string +}
A underbbs.go

@@ -0,0 +1,5 @@

+package main + +func main() { + return +}