Categorygithub.com/webkom/readme-as-a-function
modulepackage
1.0.0
Repository: https://github.com/webkom/readme-as-a-function.git
Documentation: pkg.go.dev

# README

readme-as-a-function

Go Report Card

Graphql api as a function, runs in openfaas.

Allows you to fetch the n last readmes from https://readme.abakus.no. Also possible to filter based on year and issue number.

Running on https://readme-as-a-function.abakus.no

To run locally

$ dep ensure
$ # Simple usage
$ go run main.go <<<  '{"query":"{latestReadme{ title }}"}' | jq
$ # As webserver at http://localhost:8000
$ go run pkg/webserver/main.go

API schema

schema {
  query: Query
}
type Query {
  # Get a list of readmes
  readmeUtgaver(
    # Filter by year
    year: Int
    # filter by issue number, 1 to 6
    utgave: Int
    # Get the first _n_ issues/utgaver
    first: Int
  ): [ReadmeUtgave!]!
  # Get the latest readme
  latestReadme: ReadmeUtgave
}
type ReadmeUtgave {
  title: String!
  image: String!
  pdf: String!
  year: Int!
  utgave: Int!
}

Testing

$ go test

# Packages

No description provided by the author