mina

command module
Version: v0.0.0-...-9c82ae7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 17 Imported by: 0

README

Mina

Build Status

Mina saves API server responses to disk and serves them with its own HTTP server. Some use cases include:

  • working with the API server when you or the server is offline
  • each request costs money
  • API server forces rate limits
  • etc.

Install

go get -u github.com/sariina/mina

Example

Start a mina server for Github API on port 8080:

mina -addr=:8080 -target=https://api.github.com

In your client/broweser/app, instead of sending a request to

https://api.github.com/users/sariina

send it to

http://localhost:8080/users/sariina

Voila, the same response. The response is saved to your disk. Your app will think that you are using Github API even when you are offline.

Options

mina --help

Usage:
  mina -addr=<addr> -target=<target> [-o=<dir>] [-H=<header>] [-log=<logfile>]...

Options:
-addr    address to listen to
-target  target to route to
-H       [optional] custom header
-o       [optional] cache dir
-log	 [optional] log file

Example:
  mina -addr=:8080 -target=https://www.domain.com:9000

Why mina?

Mina is named after the Myna bird (Persian: مرغ مینا), renowned for their ability to imitate speech.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL