Categorygithub.com/datatogether/api
modulepackage
0.0.0-20190430172217-099c1f4ac8bf
Repository: https://github.com/datatogether/api.git
Documentation: pkg.go.dev

# README

Data Together API

GitHub Slack License

Serves the Data Together JSON API.

This component in isolation doesn't do much, but when connected to the project as a whole it provides a variety of endpoints over https, which can be used to extract information from the Data Together database.

API Documentation: https://api.archivers.co/docs/

License & Copyright

Copyright (C) 2017 Data Together This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.0.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the LICENSE file for details.

Getting Involved

We would love involvement from more people! If you notice any errors or would like to submit changes, please see our Contributing Guidelines.

We use GitHub issues for tracking bugs and feature requests and Pull Requests (PRs) for submitting changes

Installation and Local Deployment

Generating Documentation

The API documentation is OpenAPI/Swagger compliant and is generated by the spectacle node module. You will likely want to explore these docs, so you should generate them!

  1. Install spectacle with npm -g install spectacle-docs
  2. To dynamically generate API docs as you work, run spectacle -d open_api.yaml and edit open_api.yaml to see changes
  3. Generate Static docs with spectacle open_api.yaml
  4. Commit. Rinse. Repeat.

Development

Right now modifying & updating code is a huge pain, but this is at least a start.

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EmptyOkHandler is an empty 200 response, often used for OPTIONS requests that responds with headers set in addCorsHeaders.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HealthCheckHandler is a basic "hey I'm fine" for load balancers & co TODO - add Database connection & proper configuration checks here for more accurate health reporting.
Redirect HTTP to https if port 80 is open.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewServerRoutes returns a Muxer that has all API routes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StartServer interprets info from config to start the server if config.TLS == true it'll spin up an https server using LetsEncrypt that should work just fine on the raw internet (ie not behind a proxy like nginx etc) it'll also redirect http traffic to it's https route counterpart if port 80 is open.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

server modes.
server modes.
server modes.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Proxied User model.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author