Documentation ¶
Index ¶
- func ConnectToInstance(w http.ResponseWriter, r *http.Request)
- func CreateAdvert(w http.ResponseWriter, r *http.Request)
- func DeleteAdvert(w http.ResponseWriter, r *http.Request)
- func ExtractValue(w http.ResponseWriter, r *http.Request) string
- func GetAdvert(w http.ResponseWriter, r *http.Request)
- func HandleError(err error, w http.ResponseWriter, isCustom bool) bool
- func SetupEndpoints() *mux.Router
- func TestFunc(w http.ResponseWriter, r *http.Request)
- func UpdateAdvert(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToInstance ¶
func ConnectToInstance(w http.ResponseWriter, r *http.Request)
will be deleted and handled by connections.go
func CreateAdvert ¶
func CreateAdvert(w http.ResponseWriter, r *http.Request)
We check for the recaptcha response and proceed Covert the response body into appropriate models Create a new user using our dynamodb adapter A event message it sent to the queues which are consumed by the relevant services
func DeleteAdvert ¶
func DeleteAdvert(w http.ResponseWriter, r *http.Request)
func ExtractValue ¶
func ExtractValue(w http.ResponseWriter, r *http.Request) string
to avoid duplication, this method is re-used Gets the unique identifier from the response body This unique identifier is set under the API configs For this context, it would be id TODO: move to dynamodb library?
func HandleError ¶
func HandleError(err error, w http.ResponseWriter, isCustom bool) bool
Custom made error
func SetupEndpoints ¶
func UpdateAdvert ¶
func UpdateAdvert(w http.ResponseWriter, r *http.Request)
Creating a new user with same ID replaces the record Temporary solution
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.