package
0.0.0-20210120155728-0120b7959b6f
Repository: https://github.com/akshit8/go-cassandra.git
Documentation: pkg.go.dev
# Functions
Enrich -- turns an array of user UUIDs into a map of {uuid: "firstname lastname"} params: uuids - array of user UUIDs to fetch returns: a map[string]string of {uuid: "firstname lastname"}.
FormToUser -- fills a User struct with submitted form data params: r - request reader to fetch form data or url params (unused here) returns: User struct if successful array of strings of errors if any occur during processing.
Get -- handles GET request to /users/ to fetch all users params: w - response writer for building JSON payload response r - request reader to fetch form data or url params (unused here).
GetOne -- handles GET request to /users/{user_uuid} to fetch one user params: w - response writer for building JSON payload response r - request reader to fetch form data or url params.
Post -- handles POST request to /users/new to create new user params: w - response writer for building JSON payload response r - request reader to fetch form data or url params.
# Structs
AllUsersResponse to form payload of an array of User structs.
ErrorResponse returns an array of error strings if appropriate.
GetUserResponse to form payload returning a single User struct.
NewUserResponse builds a payload of new user resource ID.
User struct to hold profile data for our user.