Skip to content

ythosa/linkschecker

Repository files navigation

LinksChecker

Go

Description

LinkChecker is service for checking links. It can be used in large systems as a microservice that can be upped as a regular Docker container.

Installation

  • Clone from Git:
    $ git clone https://github.com/Ythosa/linkschecker
  • Transfer environment variables:
    • PORT;
    • LOG_LEVEL;
  • Start service:
    • As Docker container:
      $ docker-compose up --build
    • Using Makefile:
      $ make run
    • Using Go CLI:
      $ go run ./src/cmd/apiserver/main.go
  • It's all :)

API Methods

Method Description Request Response
/get_broken_links Returns all broken links from site `{ "base_url": "some_url" }` `{ "broken_links": { "url": "error | null" } }`
/validate_link Validates link and returns `ok` and `error` `{ "link": "some_url" }` `{ "ok": "true|false", "error": "..." }`
/validate_links Validates list of links and returns list of { `url` and `error` } for each link `{ "links": ["some_url1", "some_url2", ...] }` `[ {"url": "...", "error": "..."}, {"url": "...", "error": "..."}, ... ]`

FAQ

Q: How can I help to develop this project?
A: You can put a ⭐ :3


Copyright 2020 Ythosa