Code Monkey home page Code Monkey logo

candyserver's Introduction

CandyServer

This project implements a candy vending machine server and a client, following a given Swagger specification for communication between the vending machine and the server. The project is implemented in Go and includes mutual TLS authentication and integration of C code.

This project was developed as a part of School 21 curriculum.

Description

  • Candy Purchase API: The server handles candy purchase requests, validates input, calculates change, and returns responses in JSON format.

  • Mutual TLS Authentication: Both the server and the client use self-signed certificates for secure communication.

  • C Function Integration: The ask_cow C function is used to generate ASCII art responses.

Prerequisites

  • Golang v 1.21

  • Taskfile v3.37

  • OpenSSL 1.1

Usage

  • Navigate to src and build server and client executables

    task build

  • Generate certificates

    task certs

  • Run server

    task run-server

  • In separate terminal, run client

    ./candy-client -k AA -c 2 -m 50 -f

    • -k: candy type
    • -c: candy count
    • -m: money amount
    • -f: enable cowsay response

candyserver's People

Contributors

queeju 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.