This is my first Go project
- Dirty code at
doRequest
. Maybe use a struct to pass arguments to it is more Go idiomatic? It doesn't handle redirects for simplicity sake. There is also a lot of responsability in it D:
- I removed the pointers of the fields with limited values because of the Should Do "be simple and concise" plus the Should Not Do "client-side validation". There is A LOT of boilerplate in Go to define something like a Enum. When I finished there were more code for Enums than attributes in the Account model :l I truly hope to get to know a better way of doing this in Go
- I would love to do the testing with Go's testing package, but as the test requires, the test must run against the fake API and, as far I read, Go's tests can't and shouldn't have a order for running. Yes, I could have done unit testing but it seems redundant and like extra work that I believe will harm the test more than benefit it.
Engineers at Form3 build highly available distributed systems in a microservices environment. Our take home test is designed to evaluate real world activities that are involved with this role. We recognise that this may not be as mentally challenging and may take longer to implement than some algorithmic tests that are often seen in interview exercises. Our approach however helps ensure that you will be working with a team of engineers with the necessary practical skills for the role (as well as a diverse range of technical wizardry).
The goal of this exercise is to write a client library in Go to access our fake account API, which is provided as a Docker
container in the file docker-compose.yaml
of this repository. Please refer to the
Form3 documentation for information on how to interact with the API. Please note that the fake account API does not require any authorisation or authentication.
A mapping of account attributes can be found in models.go. Can be used as a starting point, usage of the file is not required.
If you encounter any problems running the fake account API we would encourage you to do some debugging first, before reaching out for help.
The finished solution should:
- Be written in Go.
- Use the
docker-compose.yaml
of this repository. - Be a client library suitable for use in another software project.
- Implement the
Create
,Fetch
, andDelete
operations on theaccounts
resource. - Be well tested to the level you would expect in a commercial environment. Note that tests are expected to run against the provided fake account API.
- Be simple and concise.
- Have tests that run from
docker-compose up
- our reviewers will rundocker-compose up
to assess if your tests pass.
The finished solution should not:
- Use a code generator to write the client library.
- Use (copy or otherwise) code from any third party without attribution to complete the exercise, as this will result in the test being rejected.
- Use a library for your client (e.g: go-resty). Libraries to support testing or types like UUID are fine.
- Implement client-side validation.
- Implement an authentication scheme.
- Implement support for the fields
data.attributes.private_identification
,data.attributes.organisation_identification
anddata.relationships
, as they are omitted in the provided fake account API implementation. - Have advanced features, however discussion of anything extra you'd expect a production client to contain would be useful in the documentation.
- Be a command line client or other type of program - the requirement is to write a client library.
- Implement the
List
operation.
We give no credit for including any of the above in a submitted test, so please only focus on the "Shoulds" above.
- Include your name in the README. If you are new to Go, please also mention this in the README so that we can consider this when reviewing your exercise
- Create a private GitHub repository, by copying all files you deem necessary for your submission
- Invite @form3tech-interviewer-1 to your private repo
- Let us know you've completed the exercise using the link provided at the bottom of the email from our recruitment team
Copyright 2019-2021 Form3 Financial Cloud
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.