Skip to content

Golang Plugin development + testing using the `go-plugin` package from Hashicorp

License

Notifications You must be signed in to change notification settings

ohsu-comp-bio/funnel-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adapted from RPC-based plugins in Go by Eli Bendersky 🚀

Overview ⚙️

Golang Plugin development + testing using the go-plugin package from HashiCorp

Quick Start ⚡

1. Start the Server

First start the server:

git clone https://github.com/ohsu-comp-bio/pluginscd pluginsmake
Building ./authorize...OK./authorize
Listening on http://localhost:8080

2. Send Requests

In another terminal, send the request using of the example users below:

curl -H "Authorization: Bearer Alyssa P. Hacker" http://localhost:8080

User: Alyssa P. Hacker, Token: <Alyssa's Secret> ✅

Here's an example of a user that's not found by the plugin (representing an Unauthorized user):

curl -H "Authorization: Bearer Foobar" http://localhost:8080

Error: User Foobar not found ❌

Example Users ✍️

Example users may be found in example-users.csv:

  • Alyssa P. Hacker, a Lisp hacker
  • Ben Bitdiddle
  • Cy D. Fect, a "reformed C programmer"
  • Eva Lu Ator
  • Lem E. Tweakit
  • Louis Reasoner, a loose reasoner

Additional Resources 📚

About

Golang Plugin development + testing using the `go-plugin` package from Hashicorp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published