Skip to content
Go package for creating sherpa API's
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
cmd/sherpaclient
vendor
.gitignore
LICENSE
LICENSE-go
Makefile
README.md
codes.go
collector.go
doc.go
go.mod
go.sum
handler.go
intstr.go
intstr_test.go
isclosed.go
isclosed_plan9.go
sherpajs.go

README.md

Sherpa

Sherpa is a Go library for creating a sherpa API.

This library makes it trivial to export Go functions as a sherpa API with an http.Handler.

Your API will automatically be documented: github.com/mjl-/sherpadoc reads your Go source, and exports function and type comments as API documentation.

See the documentation.

Examples

A public sherpa API: https://www.sherpadoc.org/#https://www.sherpadoc.org/example/

That web application is sherpaweb. It shows documentation for any sherpa API but also includes an API called Example for demo purposes.

Ding is a more elaborate web application built with this library.

About

Written by Mechiel Lukkien, mechiel@ueber.net. Bug fixes, patches, comments are welcome. MIT-licensed, see LICENSE.

todo

  • sherpa: don't lowercase first char in function name by default, make it an option
  • sherpa: add a toggle for enabling calls by GET request. turn off by default, people might be making requests with sensitive information in query strings...
  • sherpa: in the collector, for FunctionCall, replace "serverError" with errorCode
  • handler: write tests
  • client: write tests
You can’t perform that action at this time.