diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..d4f5c0d --- /dev/null +++ b/Containerfile @@ -0,0 +1 @@ +# TODO: Implement me diff --git a/frontend-noscript/index.html b/frontend-noscript/index.html new file mode 100644 index 0000000..6c25dc5 --- /dev/null +++ b/frontend-noscript/index.html @@ -0,0 +1,11 @@ + + + + + + diff --git a/frontend-noscript/index.html.gotmpl b/frontend-noscript/index.html.gotmpl deleted file mode 100644 index 9eed572..0000000 --- a/frontend-noscript/index.html.gotmpl +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/future-useful-libs.md b/future-useful-libs.md index 2869049..f96b7fc 100644 --- a/future-useful-libs.md +++ b/future-useful-libs.md @@ -4,3 +4,5 @@ - Generating html - mime - working with mime types +- https://github.com/tursodatabase/go-libsql + - sqlite but probably better (and should also be able to compile to a static binary) diff --git a/main.go b/main.go index 94564fe..0181f58 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,4 @@ +// TODO: Add EUPL banner everywhere package main import ( @@ -48,6 +49,10 @@ func main() { log.Fatal().Err(err).Msg("Failed to setup storage") } _ = store + // TODO: Set up media server + // TODO: Set up http server + // TODO: Set up plugins + // TODO: Start everything } func setLogLevel() { diff --git a/outgoingEventQueue/queue.go b/outgoingEventQueue/queue.go index 12e524f..835e230 100644 --- a/outgoingEventQueue/queue.go +++ b/outgoingEventQueue/queue.go @@ -1 +1,10 @@ package outgoingeventqueue + +// TODO: Implement me + +/* +Queue for controlled distribution of outgoing events, such as note creations, deletions or updates +Also has to manage the case where an instance can't be reached or where Linstrom has to shut down +In case of a shutdown, it has to store all remaining tasks in the db to try again later after the next boot +Should preferably also be able to tell when a server is just gone and stop bothering about it +*/ diff --git a/remoteStorage/remoteServer.go b/server/remoteServer/remoteServer.go similarity index 100% rename from remoteStorage/remoteServer.go rename to server/remoteServer/remoteServer.go diff --git a/storage/cache/coderPools.go b/storage/cache/coderPools.go index 70244e1..7003939 100644 --- a/storage/cache/coderPools.go +++ b/storage/cache/coderPools.go @@ -42,7 +42,9 @@ func (p *EncoderPool) Encode(raw any) ([]byte, error) { defer encoder.Unlock() // Clear the buffer to avoid funky output from previous operations encoder.Buffer.Reset() - encoder.Encoder.Encode(raw) + if err := encoder.Encoder.Encode(raw); err != nil { + return nil, err + } data, err := io.ReadAll(encoder.Buffer) if err != nil { return nil, err diff --git a/storage/mediaProvider/mediaProvider.go b/storage/mediaProvider/mediaProvider.go index a2026c8..62157aa 100644 --- a/storage/mediaProvider/mediaProvider.go +++ b/storage/mediaProvider/mediaProvider.go @@ -1 +1,3 @@ package mediaprovider + +// TODO: Implement me diff --git a/storage/remoteUser.go b/storage/remoteUser.go index 2157ae9..c2bad26 100644 --- a/storage/remoteUser.go +++ b/storage/remoteUser.go @@ -1,5 +1,7 @@ package storage +// TODO: More helper stuff + func (s *Storage) NewRemoteUser(fullHandle string) (*Account, error) { return nil, nil } diff --git a/storage/roles.go b/storage/roles.go index 55d8c31..ace6e23 100644 --- a/storage/roles.go +++ b/storage/roles.go @@ -5,4 +5,7 @@ type Role struct { Name string // If set, counts as all permissions being set and all restrictions being disabled FullAdmin bool + // TODO: More control options + // Extend upon whatever Masto, Akkoma and Misskey have + // Lots of details please } diff --git a/storage/userInfoFields.go b/storage/userInfoFields.go index fa2915f..59d95b3 100644 --- a/storage/userInfoFields.go +++ b/storage/userInfoFields.go @@ -13,3 +13,5 @@ type UserInfoField struct { Value string LastUrlCheckDate *time.Time // Used if the value is an url to somewhere. Empty if value is not an url } + +// TODO: Add functions to store, load, update and delete these