Giter VIP home page Giter VIP logo

remitly-home-assignment's Introduction

Home assignment for the Remitly Summer Internship 2024 recruitment process

Created by Mateusz Bis 10 IV 2024

Features

This project impements an verifyPolicyJSON method that:

  • takes in a single argument - an AWS IAM Policy string as []bytes
  • verifies whether the []bytes string is a valid AWS::IAM::Role Policy
  • returns a bool value: true if the Resource policy field contains exactly one asterisk character, otherwise it returns false (inluding when the policy is invalid)

The method can be executed by running main.go - it reads JSON from data.json (which should be located in the root working directory), passes it to verifyPolicyJSON and prints out the function's result.

Requirements

I've tested the project on go1.22.2, I cannot guarantee it will work on older versions.

Link to download Golang version 1.22.2: https://go.dev/dl/

Steps to run the project:

  1. Clone the project
$ git clone https://github.com/Matb85/remitly-home-assignment.git
$ cd ./remitly-home-assignment
  1. Install dependencies
$ go get ./...
# or
$ go mod download
  1. Prepare data and insert it to the data.json file
$ echo YOURDATA >> data.json
  1. Run the project
$ go run ./main.go
  1. Alternatively, build & run the project
$ go build ./main.go
$ ./main

Unit Tests

I have written several unit tests for verifyPolicyJSON and UnmarshalJSON methods in order to ensure that everything works as expected.

To run the test suite, execute the following command:

$ go test ./...

remitly-home-assignment's People

Contributors

matb85 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.