This commit is contained in:
parent
9990a205d8
commit
671d18d2ba
4 changed files with 51 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
// Package webdebug provides a http server for local debugging.
|
||||
// The server is explicitly for localhost only as it offers
|
||||
// a lot more control and access than the public one.
|
||||
// Additionally, there is no guarantee for functional authentication
|
||||
// and authorisation of requests.
|
||||
// Using it can be considered a security risk.
|
||||
//
|
||||
// There is no guarantee for API stability. It might change drastically
|
||||
// across versions or even commits and doesn't need announcements
|
||||
package webdebug
|
||||
|
||||
import (
|
||||
|
@ -16,6 +25,8 @@ func New() *Server {
|
|||
handler.HandleFunc("GET /non-deleted", getNonDeletedUsers)
|
||||
handler.HandleFunc("POST /local-user", createLocalUser)
|
||||
handler.HandleFunc("GET /delete", deleteUser)
|
||||
handler.HandleFunc("POST /post-as", postAs)
|
||||
handler.HandleFunc("GET /notes-for", notesFrom)
|
||||
web := http.Server{
|
||||
Addr: DebugAddr,
|
||||
Handler: handler,
|
||||
|
|
|
@ -1,3 +1,29 @@
|
|||
// Package webpublic contains the public webserver
|
||||
// which provides the primary and only intended access point
|
||||
// for interacting with the system.
|
||||
//
|
||||
// # Sections
|
||||
//
|
||||
// - Frontend: Serves the various web frontend versions
|
||||
// - Main: The original Linstrom specific frontend
|
||||
// - NoJs: An entirely serverside rendered frontend, no JS included
|
||||
// - Custom: Custom frontend files will be served here
|
||||
//
|
||||
// - API: Endpoints for the actual interactions
|
||||
// - Frontend: The API used by the main frontend
|
||||
// - Masto: Mastodon compatible adapter for internal structures
|
||||
// - ActivityPub: For integration with the Fediverse via ActivityPub
|
||||
// - Linstrom-RPC: For Linstrom to Linstrom server communication
|
||||
//
|
||||
// # Guarantees
|
||||
//
|
||||
// - The Masto and ActivityPub API will remain stable
|
||||
// - Frontend API might change, but the intended consumer (Main frontend)
|
||||
// will always be up to date with the changes
|
||||
// - Linstrom-RPC API is versioned and will keep
|
||||
// a few versions of backwards compatibility
|
||||
//
|
||||
// TODO: Decide how long the Linstrom-RPC API will remain backwards compatible
|
||||
package webpublic
|
||||
|
||||
import "net/http"
|
||||
|
|
|
@ -39,7 +39,7 @@ type User struct {
|
|||
}
|
||||
|
||||
// Compiler assertations for interface implementations
|
||||
var _ shared.Santisable = &User{}
|
||||
var _ shared.Sanitisable = &User{}
|
||||
var _ shared.Clonable = &User{}
|
||||
|
||||
func (u *User) Sanitize() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue