-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#67 create endpoint for check exist phone number
- Loading branch information
1 parent
218fbad
commit 6fce682
Showing
10 changed files
with
163 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package testcases | ||
|
||
import "errors" | ||
|
||
// ReponseIsExistPhone ... | ||
type ReponseIsExistPhone struct { | ||
Result bool | ||
Error error | ||
} | ||
|
||
// IsExistPhoneNumber ... | ||
type IsExistPhoneNumber struct { | ||
Description string | ||
UsecaseParams string | ||
RepositoryParams string | ||
UsecaseResponse ReponseIsExistPhone | ||
RepositoryResponse ReponseIsExistPhone | ||
} | ||
|
||
// IsExistPhoneNumberData ... | ||
var IsExistPhoneNumberData = []IsExistPhoneNumber{ | ||
{ | ||
Description: "success_get_check_phone_number", | ||
UsecaseParams: "022-1234", | ||
RepositoryParams: "022-1234", | ||
UsecaseResponse: ReponseIsExistPhone{ | ||
Result: true, | ||
Error: nil, | ||
}, | ||
RepositoryResponse: ReponseIsExistPhone{ | ||
Result: true, | ||
Error: nil, | ||
}, | ||
}, { | ||
Description: "failed_check_phone_number", | ||
UsecaseParams: "sample", | ||
RepositoryParams: "sample", | ||
UsecaseResponse: ReponseIsExistPhone{ | ||
Result: false, | ||
Error: errors.New("failed_check"), | ||
}, | ||
RepositoryResponse: ReponseIsExistPhone{ | ||
Result: false, | ||
Error: errors.New("failed_check"), | ||
}, | ||
}, | ||
} | ||
|
||
// IsExistDescription ... | ||
func IsExistDescription() []string { | ||
var arr = []string{} | ||
for _, data := range IsExistPhoneNumberData { | ||
arr = append(arr, data.Description) | ||
} | ||
return arr | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters