Categorygithub.com/SD-Paranoia/ufo
modulepackage
0.0.0-20200430210644-d998b06d213a
Repository: https://github.com/sd-paranoia/ufo.git
Documentation: pkg.go.dev

# README

UFO

The server component of the PARANOIA project

Building

$ cd cmd/ufo && go install

Running

Running the binary exposes the api on port 8080

# Packages

No description provided by the author

# Functions

ChallengeHandler is the endpoint for challenge requestsit accepts a json marshalled ChallengeIn struct andreturns a marshalled ChallengeOut on success.
EncodePublicRSA key takes a PublicKey struct andencodes it to a PKIX PEM encoded string.
ListHandler is the endpoint for users to query whatgroups they are a part of.
LogHandler is the debug page for viewing errors.
MakeConvoHandler is the endpoint for creation ofconversations, it accepts a json marshalled GroupInstruct and returns a marshalled GroupOut struct on success.
ParsePublicRSA parses a PKIX PEM encoded RSA key.
ReadHandler is the endpoint for requesting messages fromthe server.
RegisterInHandler is the endpoint for registration requestsit accepts a marshalled RegisterIn struct and returnsa 200 status code on success.
UFO is a http.HandlerFunc that routes all ofufo's HTTP endpoints.
WriteHandler is the endpoint for writing messagesto a group.

# Variables

ErrAuthDenied is returned when a user has faileda verification challenge.
ErrBadUUID is returned when a usersends a malfromed UUID to the server.
ErrGroupExists is returned when a user tries tocreate a group with an existing UUID.
ErrKeyExists is returned on registration whena someone has already registered with that key.
ErrKeyNotExist is returned when a user tries toverify with a key that is not registered.
No description provided by the author

# Structs

ChallengeIn is the JSON objectfor users to request a challenge.
ChallengeOut is the JSON objectfor challenge reuqest responses.
Event is a log event.
Group represents a group chat, identified by UUID.
GroupIn is the JSON objectfor conversation createrequests.
GroupOut is the JSON objectresponse for conversationcreate requests.
ListIn is the JSON objectfor users to list what groupsthey are in.
ListOut is the JSON objectresponse for list requests.
Msg is a single message from or to a client.
ReadIn is the JSON objectfor users to request their messages.
ReadOut is the JSON objectresponse for read requests.
Reciept is a mark in to the messagearray for a conversation such that weonly send new "unread" messages.
RegisterIn is the JSON objectfor user registration.
SignedFingerPrint is used to verifythe authenticity of a user.
WriteIn is the JSON objectfor write requests.

# Type aliases

No description provided by the author
No description provided by the author