This API allows for person-related operations, namely:
- CRUD operations
- retrieving the name of syllables for fornavn, etternavn, and fornavn + etternavn
- checking if fornavn, etternavn, or fornavn + etternavn are a palindrome
To run the application, you will need Docker and Docker-compose. From the root folder of the project, run:
$ sudo docker-compose build
$ sudo docker-compose up
N.B.: You may not use sudo
if you have configured your user to be part of the docker
group.
The API will be available at localhost:8080
To run unit tests (assuming you are in the project root folder):
$ cd server && go test
Send brukerid
, receive person
{
brukerid: int
fornavn: string
etternavn: string
}
Send person and receive brukerid
(int)
{
fornavn: string
etternavn: string
}
Send new person (fornavn
and etternavn
may be different from original), receive 1
{
brukerid: int
fornavn: string
etternavn: string
}
Send brukerid
, receive 1
Send brukerid
, receive whether full name is palindrome (bool)
Spaces and apostrophes are dismissed. "Mo M" and "M'am" count as palindromes.
Send brukerid
, receive whether fornavn
is palindrome (bool)
Send brukerid
, receive whether etternavn
is palindrome (bool)
Send brukerid
, receive number of syllables in full name (int)
Send brukerid
, receive number of syllables in fornavn
(int)
Send brukerid
, receive number of syllables in etternavn
(int)