Documentation ¶
Index ¶
- func BearerToken(token string, db *sqlx.DB) (common.Token, bool)
- func GetIP(ctx *fasthttp.RequestCtx) string
- func GetTokenFull(token string, db *sqlx.DB) (common.Token, bool)
- func Method(f func(md common.MethodData) common.CodeMessager, privilegesNeeded ...int) fasthttp.RequestHandler
- func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHandler
- func Start(conf common.Conf, dbO *sqlx.DB) *fhr.Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerToken ¶
BearerToken parses a Token given in the Authorization header, with the Bearer prefix.
func GetIP ¶
func GetIP(ctx *fasthttp.RequestCtx) string
func GetTokenFull ¶
GetTokenFull retrieves an user ID and their token privileges knowing their API token.
func Method ¶
func Method(f func(md common.MethodData) common.CodeMessager, privilegesNeeded ...int) fasthttp.RequestHandler
Method wraps an API method to a HandlerFunc.
func PeppyMethod ¶
func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHandler
PeppyMethod generates a method for the peppyapi
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package internals has methods that suit none of the API packages.
|
Package internals has methods that suit none of the API packages. |
Package peppy implements the osu! API as defined on the osu-api repository wiki (https://github.com/ppy/osu-api/wiki).
|
Package peppy implements the osu! API as defined on the osu-api repository wiki (https://github.com/ppy/osu-api/wiki). |
Package v1 implements the first version of the Ripple API.
|
Package v1 implements the first version of the Ripple API. |
Package websockets implements functionality related to the API websockets.
|
Package websockets implements functionality related to the API websockets. |
Click to show internal directories.
Click to hide internal directories.