Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
A simple implementation of stupid.App using mongodb.
func NewDefaultApp ¶
func (*App) Crashes ¶
func (a *App) Crashes() db.CrashTable
func (*App) CurrentVersions ¶
func (*App) IgnoreOldVersionCrashes ¶
type AuthorizedDataApp ¶
type AuthorizedDataApp struct {
*App
}
A simple implementation of stupid.App using mongodb. Pulls from the collection "data" and data must be in the form:
{ "_id": "data id", "owner": "user uuid", "data": "data", }
The data is sent raw without any processing. Requests:
GET: /data/{data id}?key={API key}&token={JWT Token} DELETE: /data/{data id}?key={API key}&token={JWT Token} POST: /data/{data id}?key={API key}&token={JWT Token}
Request body will be the data
GET: /data/list?key={API key}?token={JWT Token}
Body will be a list of id strings in JSON format
func NewAuthorizedDataApp ¶
func NewAuthorizedDataApp(db *mongo.Database) *AuthorizedDataApp
func (*AuthorizedDataApp) Extension ¶
func (a *AuthorizedDataApp) Extension(req *stupid.Request) bool
type UnauthorizedDataApp ¶
type UnauthorizedDataApp struct {
}A simple implementation of stupid.App using mongodb. Can make requests to GET: /data/{data id}?key={API key} without any authorization checks other then the API Key. Pulls from the collection "data" and data must be in the form:
{ "_id": "data id", "data": "data", }
The data is sent raw without any processing.
func NewUnauthorizedDataApp ¶
func NewUnauthorizedDataApp(db *mongo.Database) *UnauthorizedDataApp
func (*UnauthorizedDataApp) Extension ¶
func (u *UnauthorizedDataApp) Extension(req *stupid.Request) bool