Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/seosoojin/caseencodingapigo

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/seosoojin/caseencodingapigo

  • v0.0.0-20210611231931-4b551e5542a4
  • Source
  • Go
  • Socket score

Version published
Created
Source

EncodedApi

Instructions

go run main.go
  • Description: Starts the server
go test -v ./.../
  • Execute all the tests recursively if you do on the project root
go test
  • Execute the tests files in the folder that you're doing the command

Design Pattern

  • Clean Ach pattern

/upload

  • Description: Upload an image to a temp dir file using multipart/form-data then return the path for this file
  • Curl to test:
    curl    --request POST
            --url http://192.168.0.57:3030/upload   
            -H 'Content-Type: multipart/form-data'   
            -H 'boundary=---011000010111000001101001' 
            --form 'file=@./assets/raw/test.bmp'
    

/write-message-on-image

  • Description: Receives a message and a file path via POST of a JSON then encodes the message in the given file and return the new path
  • Curl to test:
    curl    --request POST 
            --url http://localhost:3030/write-message-on-image 
            --header 'Content-Type: application/json' 
            --data '{
                       "path": "./assets/raw/test.bmp",
                       "phrase": "test"
                    }'
    

/get-image

  • Description: Receives a encoded image name via GET then return the readable buffer for this image (utf-8 encoded)
  • Curl to test:
    curl    --request GET 
            --url http://localhost:3030/get-image/test-encoded.bmp 
            --output ./assets/encoded/test.bmp
    

/decode-message-from-image

  • Description: Receives a path to an encoded image, decode the message in this file and return the message
  • Curl to test:
    curl    --request GET 
            --url http://localhost:3030/decode-message-from-image/test-encoded.bmp
    

FAQs

Package last updated on 11 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc