linkschecker

module
v0.0.0-...-f4b44f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2022 License: GPL-3.0

README

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

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL