Building Microservices API in Go - Assignment Solution: Enhance GetAllCustomers API

Building Microservices API in Go - Assignment Solution: Enhance GetAllCustomers API

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial covers the enhancement of an existing API to retrieve customers by their status. It begins with an introduction to the assignment and the objective of enhancing the API. The tutorial then explains starting from the domain and enhancing the 'find all' method to handle status as a string for flexibility. The implementation is done in the Customerrepositorydb, where the logic for handling empty and specific status values is detailed. The service side logic is discussed, focusing on transforming status from active/inactive to codes. Finally, the tutorial concludes with testing the code and a brief mention of future refactoring using SQL X.

Read more

7 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What does status 1 represent in the context of the API?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Explain how the retrieval system for customers is built into the repository.

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What happens when an empty string is passed as status to the find method?

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the significance of the SQL where clause in the retrieval process?

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe the logic implemented to handle the status transformation from 'active' and 'inactive' to their respective codes.

Evaluate responses using AI:

OFF

6.

OPEN ENDED QUESTION

3 mins • 1 pt

How does the code ensure that all customers are returned when no parameters are sent?

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the purpose of the third-party library SQL X mentioned in the text?

Evaluate responses using AI:

OFF