Compare commits
397 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 382885f144 | |||
| 0f7b047b0a | |||
| a074773e6c | |||
| 3d0126be0b | |||
| eda2e2f3f5 | |||
| 111e3f2106 | |||
| c1ec77a42c | |||
| 3339d9d3d7 | |||
| 8d80e9103f | |||
| d55b410800 | |||
| 9fe99ce7fa | |||
| b8df6c31a0 | |||
| abdd5876a1 | |||
| 1b5edfc00a | |||
| 347740dce1 | |||
| ab85d4d678 | |||
| 31ac62f410 | |||
| 97765b93a9 | |||
| f858ad5f26 | |||
| e6524f925f | |||
| c493f8921e | |||
| b2ce98da87 | |||
| 4db138d4b8 | |||
| f12d5131b0 | |||
| 1f5c8ce353 | |||
| 645a817685 | |||
| f4f8342245 | |||
| 543a690bfd | |||
| c4e5dad549 | |||
| fa12c23d79 | |||
| 4fe902a5d2 | |||
| 61af08a721 | |||
| b04550e2f2 | |||
| 5e5cb056c5 | |||
| 48fa64f8ec | |||
| f274394f0e | |||
| 9a4a942cc4 | |||
| 6b3b8e8c9b | |||
| 5a7d6f8997 | |||
| b4ed17fbac | |||
| 57476f4d59 | |||
| 7660910232 | |||
| b054506e3a | |||
| c961c6db7d | |||
| 0f126d4d11 | |||
| b94756bbf0 | |||
| db6ae707ef | |||
| 97feec8ebf | |||
| bce21a9f91 | |||
| 06e256e5ef | |||
| 040938ff6d | |||
| 21da7f77f5 | |||
| c2d2f31438 | |||
| 5b2558bf92 | |||
| ecd59009fb | |||
| 4a943b722d | |||
| 9d1b1e19d4 | |||
| 7a8061fc72 | |||
| bca84bac8b | |||
| 66e0eb1bd6 | |||
| 26d189917e | |||
| ccd3955bf4 | |||
| 8a2cc3a344 | |||
| 647fa025f8 | |||
| 1955350318 | |||
| 04916a57d2 | |||
| 0adac5c6f7 | |||
| 54b5be5e7d | |||
| eae4cb1417 | |||
| 420a3d4d95 | |||
| b48ad6dbfb | |||
| 2be5051b19 | |||
| c544dadd55 | |||
| 1da65d97d8 | |||
| c595c80356 | |||
| 20e5fbcd7a | |||
| ac77154907 | |||
| 97ace53bc9 | |||
| feb962f98a | |||
| 8602089a1e | |||
| 4b0648f3d7 | |||
| 856b96cbf8 | |||
| facf38955c | |||
| cfdb890eae | |||
| 2f8d3a7958 | |||
| 59311deb57 | |||
| d2541a173a | |||
| b618c11b80 | |||
| 8b4675807a | |||
| c0bca973d6 | |||
| 5c97771e61 | |||
| c9cbe8afd5 | |||
| 1d90ce9dd2 | |||
| ccb9eed573 | |||
| 2221fd408d | |||
| ea58bac548 | |||
| 0f85c0511a | |||
| 27749a2877 | |||
| 0991c27f9d | |||
| 00eab03655 | |||
| e55377b204 | |||
| 4ddc4ec002 | |||
| facf17db3f | |||
| 8663c7d031 | |||
| 6eac968083 | |||
| bd573957e0 | |||
| 5ce5c47499 | |||
| 9336891e67 | |||
| aa30c35e7e | |||
| 39368ece9a | |||
| 4f57309380 | |||
| 57e7bd5bc9 | |||
| bf54222be7 | |||
| 552fb3e4cc | |||
| 7d9f174b3f | |||
| bf4d31eebe | |||
| f203326a29 | |||
| 8367413e84 | |||
| 9b6dbd422c | |||
| 531e80f580 | |||
| 890a34e1bd | |||
| 7413e383a8 | |||
| 7496479380 | |||
| 6c78a1d635 | |||
| 6413c9f9f7 | |||
| 352aeb0490 | |||
| 61f52d971a | |||
| fa7508e28d | |||
| c217a31444 | |||
| 84576f2c29 | |||
| da11416b39 | |||
| 6a9a590c7f | |||
| f23e6a3352 | |||
| b568b1d41d | |||
| 9980634e5d | |||
| 4a50ca9122 | |||
| 3be0d14d44 | |||
| ec9fd996b1 | |||
| 1e704468a5 | |||
| e8147f26b9 | |||
| 6648e0af38 | |||
| fde84d55ba | |||
| 1159dd6982 | |||
| 50341759b6 | |||
| d68f2306c6 | |||
| 578743de1f | |||
| 8553188ae4 | |||
| a3e2570df2 | |||
| 87c9ef6b48 | |||
| ce32d181d5 | |||
| b8c6c64e9c | |||
| c51f092bda | |||
| e2d33f680e | |||
| 980c5c63df | |||
| 1441dc7600 | |||
| 6fc4e2f45e | |||
| 8c00dbcf38 | |||
| 803e160c70 | |||
| 4590da2fc3 | |||
| a1879ea37c | |||
| 8fe289ca72 | |||
| eb9ac861ea | |||
| 074393d3bf | |||
| 538e5305d3 | |||
| 917852bbb0 | |||
| c4e0dc3f5e | |||
| 22ed3a3565 | |||
| 80853d48f5 | |||
| d90667777f | |||
| 7990edd345 | |||
| 648804e5dc | |||
| 187e75de4d | |||
| e5df7ab3ad | |||
| 0465f9b188 | |||
| d53ad3b79a | |||
| 698bea4ec8 | |||
| 95039410b5 | |||
| e933fb11e9 | |||
| 0666d98648 | |||
| e314ae6df0 | |||
| bcb0978e9e | |||
| f3f892f448 | |||
| 1af1bc3460 | |||
| d0f99cee1a | |||
| f8b40085cd | |||
| 5de0714256 | |||
| bfa83cbf99 | |||
| 27ec6dbd7d | |||
| a8daee60fb | |||
| fab423cca0 | |||
| 70b69ecd19 | |||
| fe0ef8b579 | |||
| 586a04f812 | |||
| 293034bcde | |||
| ac516a4824 | |||
| 65e2fddfb5 | |||
| 2d167ae9f9 | |||
| 32779f596f | |||
| 273b96bfe0 | |||
| 4ffc073153 | |||
| fc841beedd | |||
| 9f4723f8eb | |||
| b37bb43e09 | |||
| 7a03291442 | |||
| 14f70351c0 | |||
| d195ce6340 | |||
| e9480ba1da | |||
| 1bd5d57884 | |||
| 6544e413b8 | |||
| d7437f125b | |||
| f2849ca00f | |||
| aa3dc574a7 | |||
| ba65556eac | |||
| 2bc5ad53c2 | |||
| bc317cfcd1 | |||
| 00a64710c2 | |||
| ba614af82d | |||
| 2b8342fcd5 | |||
| a75256bed5 | |||
| 0cc369a76e | |||
| 62ef8ed57a | |||
| 62188b49f0 | |||
| 305d5ad7b6 | |||
| d8c82829c4 | |||
| e3eaaea15a | |||
| 500c60b807 | |||
| ef53bf14ae | |||
| 25f9ca2eeb | |||
| d566dea265 | |||
| c81b61462e | |||
| 1fe362ecd0 | |||
| 257e8c4761 | |||
| a1537f4b0d | |||
| eeaab72a9f | |||
| 14e25ab9fe | |||
| 120aabfbce | |||
| 5e6c054345 | |||
| ed35555d74 | |||
| 619584b5f6 | |||
| 4cc99881d8 | |||
| 95ee1c423b | |||
| ff204d67b9 | |||
| 5ac3489ee5 | |||
| 9fd2dfa680 | |||
| 7650c81ad9 | |||
| c60b3f52a5 | |||
| 23d2cfe0f9 | |||
| 5dc44453ba | |||
| 6086899b28 | |||
| 2842017b59 | |||
| cc44d14722 | |||
| 54eb500315 | |||
| 0fe347c87a | |||
| fd69012357 | |||
| 9f62704c67 | |||
| 52cf236699 | |||
| e4285c2cba | |||
| 7b541af253 | |||
| 09e9b0361d | |||
| d0377d5d9d | |||
| fe21f6a8c4 | |||
| 6e85848bd0 | |||
| 2002d60fbe | |||
| 5774323f2e | |||
| 1350f84ea4 | |||
| 6dd090a848 | |||
| fccc25f7a3 | |||
| 67eb574fd4 | |||
| a69b161725 | |||
| 35fe8a23cb | |||
| a96702757e | |||
| f98fc1e03a | |||
| 39d752ca85 | |||
| a7e08054da | |||
| e0e8a99abe | |||
| c0e954f19d | |||
| 54cb8fa028 | |||
| ace2699e79 | |||
| 59c003bdce | |||
| 736d32c392 | |||
| add2f8ac80 | |||
| 22bbeef41a | |||
| 192f48b7f2 | |||
| dfcae03f25 | |||
| 545c68a0fd | |||
| b454d93c25 | |||
| a73d58aad5 | |||
| 2104eb85d7 | |||
| 9990afb722 | |||
| ca6af9684a | |||
| cb228e73ad | |||
| d33db40b39 | |||
| 3d84b07532 | |||
| 3b94217fb7 | |||
| 48f6885f44 | |||
| 32d33104a4 | |||
| 939a91e99d | |||
| fbce915d84 | |||
| ab0c4ec0f5 | |||
| 36f013670e | |||
| 344a237af8 | |||
| 5ce912beea | |||
| 69738bce84 | |||
| a0ae5a6868 | |||
| ff5d391701 | |||
| fa1148915e | |||
| bea9017b48 | |||
| 64c4c6b347 | |||
| 114f9f238d | |||
| 369c988576 | |||
| 691f56fde9 | |||
| b2467fdd50 | |||
| 5e520ca5bf | |||
| e5d9f2f5a0 | |||
| 9f465fd70d | |||
| 28df0b119e | |||
| 13d9d86acd | |||
| fb8737e330 | |||
| 168a870c02 | |||
| c234903255 | |||
| c980dfe434 | |||
| 79c91d71c8 | |||
| 3060946cc1 | |||
| 859b4466ab | |||
| 124b770ff6 | |||
| 6b6e60ee0d | |||
| 10aa20e9cd | |||
| 97c68ce55a | |||
| 061f12fbb0 | |||
| bf4823bdbd | |||
| da0198cc0d | |||
| 31538c57a4 | |||
| 955650d1e3 | |||
| e7ccf0aa1e | |||
| e2fb77bd85 | |||
| de8ceb21ea | |||
| 3bac768cda | |||
| 3aad650622 | |||
| d4fbaaed0c | |||
| 4a4c309da0 | |||
| 5e76c797c2 | |||
| 4fdef7b837 | |||
| 7988241e11 | |||
| 309e6d1084 | |||
| 92bb040640 | |||
| 9b42d0e25e | |||
| f286c3c1c9 | |||
| e16870a638 | |||
| f0eb6b2688 | |||
| 29a06511a9 | |||
| bfb4fc1c36 | |||
| 06c37a132f | |||
| 70b3061946 | |||
| 356d32c6fe | |||
| 6046a74a64 | |||
| 56fbea4bd3 | |||
| ee0dcdf753 | |||
| 5550d662a2 | |||
| 3dc8e5ebaf | |||
| c85b19098d | |||
| c3250257b1 | |||
| fffa74f782 | |||
| fa3de272e8 | |||
| b13c7e328a | |||
| 30d4b8986a | |||
| aadbd5adf3 | |||
| b552c293ca | |||
| a2f15b3c36 | |||
| 736fb7320e | |||
| 765b4c6424 | |||
| df472254d3 | |||
| 98167487aa | |||
| 257ef7e573 | |||
| 30288fec8d | |||
| e234b86af6 | |||
| d00803617e | |||
| af74e39fa7 | |||
| 8646d61182 | |||
| 28775f5e10 | |||
| 095bec072c | |||
| bd0f21e139 | |||
| 69414dcd7c | |||
| 28ee9cad19 | |||
| 7d1609bd93 | |||
| 1aeb1b20da | |||
| 228bb62df4 | |||
| c4e2eaa609 | |||
| 118e18190d | |||
| 31c4172540 | |||
| 93b43d37df | |||
| 3987a2ce8a | |||
| fe039b3c55 | |||
| 7537932154 | |||
| 902f6cb9c0 | |||
| 790ce5be6d | |||
| bcfc7a883c | |||
| 9fdbd180df |
@@ -7,6 +7,10 @@
|
||||
"forwardPorts": [
|
||||
8080
|
||||
],
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
@@ -16,7 +20,11 @@
|
||||
},
|
||||
"extensions": [
|
||||
"ms-azuretools.vscode-docker",
|
||||
"golang.go"
|
||||
"golang.go",
|
||||
"rangav.vscode-thunder-client",
|
||||
"GitHub.codespaces",
|
||||
"GitHub.copilot",
|
||||
"GitHub.copilot-chat"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,9 @@ services:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
ports:
|
||||
- 5432:5432
|
||||
apprise:
|
||||
image: caronc/apprise:latest
|
||||
restart: unless-stopped
|
||||
hostname: apprise
|
||||
volumes:
|
||||
postgres-data: null
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Bug report
|
||||
about: Create a bug report
|
||||
title: ''
|
||||
labels: bug, question / discussion
|
||||
labels: bug, triage needed
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Feed Problems
|
||||
about: Problems with a feed or a website
|
||||
title: ''
|
||||
labels: feed problems
|
||||
labels: feed problems, triage needed
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Improvement
|
||||
about: Do you have an idea to improve an existing feature?
|
||||
title: ''
|
||||
labels: improvements
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
paths-ignore:
|
||||
- ./http/client/testdata
|
||||
@@ -27,6 +27,24 @@ updates:
|
||||
assignees:
|
||||
- "fguillot"
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: "packaging/debian"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
reviewers:
|
||||
- "fguillot"
|
||||
assignees:
|
||||
- "fguillot"
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: "packaging/rpm"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
reviewers:
|
||||
- "fguillot"
|
||||
assignees:
|
||||
- "fguillot"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Build Binaries
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Golang
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Compile binaries
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
run: make build
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binaries
|
||||
path: miniflux-*
|
||||
if-no-files-found: error
|
||||
retention-days: 5
|
||||
@@ -27,16 +27,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql/config.yml
|
||||
uses: github/codeql-action/init@v3
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
name: Debian Packages
|
||||
permissions: read-all
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
test-packages:
|
||||
if: github.event.pull_request
|
||||
name: Test Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
id: buildx
|
||||
with:
|
||||
install: true
|
||||
- name: Available Docker Platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Build Debian Packages
|
||||
run: make debian-packages
|
||||
- name: List generated files
|
||||
run: ls -l *.deb
|
||||
build-packages-manually:
|
||||
if: github.event_name != 'pull_request' && github.event_name != 'push'
|
||||
name: Build Packages Manually
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
id: buildx
|
||||
with:
|
||||
install: true
|
||||
- name: Available Docker Platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Build Debian Packages
|
||||
run: make debian-packages
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
path: "*.deb"
|
||||
if-no-files-found: error
|
||||
retention-days: 3
|
||||
publish-packages:
|
||||
if: github.event.push
|
||||
name: Publish Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
id: buildx
|
||||
with:
|
||||
install: true
|
||||
- name: Available Docker Platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Build Debian Packages
|
||||
run: make debian-packages
|
||||
- name: List generated files
|
||||
run: ls -l *.deb
|
||||
- name: Upload packages to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
||||
@@ -4,15 +4,45 @@ on:
|
||||
- cron: '0 1 * * *'
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
docker-images:
|
||||
test-docker-images:
|
||||
if: github.event.pull_request
|
||||
name: Test Images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Alpine image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./packaging/docker/alpine/Dockerfile
|
||||
push: false
|
||||
tags: ${{ github.repository_owner }}/miniflux:alpine-dev
|
||||
- name: Test Alpine Docker image
|
||||
run: docker run --rm ${{ github.repository_owner }}/miniflux:alpine-dev miniflux -i
|
||||
- name: Build Distroless image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./packaging/docker/distroless/Dockerfile
|
||||
push: false
|
||||
tags: ${{ github.repository_owner }}/miniflux:distroless-dev
|
||||
- name: Test Distroless Docker image
|
||||
run: docker run --rm ${{ github.repository_owner }}/miniflux:distroless-dev miniflux -i
|
||||
|
||||
publish-docker-images:
|
||||
if: ${{ ! github.event.pull_request }}
|
||||
name: Publish Images
|
||||
permissions:
|
||||
packages: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -45,33 +75,33 @@ jobs:
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to Quay Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.QUAY_USERNAME }}
|
||||
password: ${{ secrets.QUAY_TOKEN }}
|
||||
|
||||
- name: Build and Push Alpine images
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./packaging/docker/alpine/Dockerfile
|
||||
@@ -80,7 +110,7 @@ jobs:
|
||||
tags: ${{ steps.docker_alpine_tag.outputs.tags }}
|
||||
|
||||
- name: Build and Push Distroless images
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./packaging/docker/distroless/Dockerfile
|
||||
|
||||
@@ -5,13 +5,14 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
jshint:
|
||||
name: Javascript Linter
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install jshint
|
||||
run: |
|
||||
sudo npm install -g jshint@2.13.3
|
||||
@@ -22,10 +23,15 @@ jobs:
|
||||
name: Golang Linter
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.20"
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
go-version: "1.22"
|
||||
- run: "go vet ./..."
|
||||
- uses: golangci/golangci-lint-action@v4
|
||||
with:
|
||||
args: --skip-dirs tests --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace
|
||||
args: --timeout 10m --skip-dirs tests --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace
|
||||
- uses: dominikh/staticcheck-action@v1.3.0
|
||||
with:
|
||||
version: "2023.1.7"
|
||||
install-go: false
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Debian and RPM Package Builders
|
||||
permissions: read-all
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
jobs:
|
||||
debian-package-builder:
|
||||
name: Build Debian Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
id: buildx
|
||||
with:
|
||||
install: true
|
||||
- name: Available Docker Platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Build Debian Packages
|
||||
run: make debian-packages
|
||||
- name: List generated files
|
||||
run: ls -l *.deb
|
||||
- name: Upload packages to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
||||
rpm-package-builder:
|
||||
name: Build RPM Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
- name: Upload package to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
||||
@@ -0,0 +1,55 @@
|
||||
name: RPM Packages
|
||||
permissions: read-all
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
test-package:
|
||||
if: github.event.pull_request
|
||||
name: Test Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
build-package-manually:
|
||||
if: github.event_name != 'pull_request' && github.event_name != 'push'
|
||||
name: Build Packages Manually
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
path: "*.rpm"
|
||||
if-no-files-found: error
|
||||
retention-days: 3
|
||||
publish-package:
|
||||
if: github.event.push
|
||||
name: Publish Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
- name: Upload package to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
||||
@@ -1,10 +1,11 @@
|
||||
name: CI Workflow
|
||||
name: Tests
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
@@ -14,14 +15,14 @@ jobs:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
go-version: ["1.19", "1.20"]
|
||||
go-version: ["1.22"]
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Run unit tests
|
||||
run: make test
|
||||
|
||||
@@ -40,11 +41,11 @@ jobs:
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.20"
|
||||
go-version: "1.22"
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Postgres client
|
||||
run: sudo apt update && sudo apt install -y postgresql-client
|
||||
- name: Run integration tests
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
miniflux-*
|
||||
miniflux
|
||||
./miniflux
|
||||
*.rpm
|
||||
*.deb
|
||||
.idea
|
||||
.idea
|
||||
.vscode
|
||||
@@ -1,3 +1,385 @@
|
||||
Version 2.1.1 (March 10, 2024)
|
||||
-----------------------------
|
||||
|
||||
* Move search form to a dedicated page
|
||||
* Add Readeck integration
|
||||
* Add feed option to disable HTTP/2 to avoid fingerprinting
|
||||
* Add `Enter` key as a hotkey to open selected item
|
||||
* Proxify `video` element `poster` attribute
|
||||
* Add a couple of new possible locations for feeds
|
||||
* Hugo likes to generate `index.xml`
|
||||
* `feed.atom` and `feed.rss` are used by enterprise-scale/old-school gigantic CMS
|
||||
* Fix categories import from Thunderbird's OPML
|
||||
* Fix logo misalignment when using languages that are more verbose than English
|
||||
* Google Reader: Do not return a 500 error when no items is returned
|
||||
* Handle RDF feeds with duplicated `<title>` elements
|
||||
* Sort integrations alphabetically
|
||||
* Add more URL validation in media proxy
|
||||
* Add unit test to ensure each translation has the correct number of plurals
|
||||
* Add missing plurals for some languages
|
||||
* Makefile: quiet `git describe` and `rev-parse` stderr: When building from a tarball instead of a cloned git repo, there would be two `fatal: not a git repository` errors emitted even though the build succeeds. This is because of how `VERSION` and `COMMIT` are set in the Makefile. This PR suppresses the stderr for these variable assignments.
|
||||
* Makefile: do not force `CGO_ENABLED=0` for `miniflux` target
|
||||
* Add GitHub Action pipeline to build packages on-demand
|
||||
* Remove Golint (deprecated), use `staticcheck` and `golangci-lint` instead
|
||||
* Build amd64/arm64 Debian packages with CGO disabled
|
||||
* Update `go.mod` and add `.exe` suffix to Windows binary
|
||||
* Add a couple of fuzzers
|
||||
* Fix CodeQL workflow
|
||||
* Code and performance improvements:
|
||||
* Use an `io.ReadSeeker` instead of an `io.Reader` to parse feeds
|
||||
* Speed up the sanitizer:
|
||||
- Allow Youtube URLs to start with `www`
|
||||
- Use `strings.Builder` instead of a `bytes.Buffer`
|
||||
- Use a `strings.NewReader` instead of a `bytes.NewBufferString`
|
||||
- Sprinkles a couple of `continue` to make the code-flow more obvious
|
||||
- Inline calls to `inList`, and put their parameters in the right order
|
||||
- Simplify `isPixelTracker`
|
||||
- Simplify `isValidIframeSource`, by extracting the hostname and comparing it directly, instead of using the full url and checking if it starts with multiple variations of the same one (`//`, `http:`, `https://` multiplied by `/www.`)
|
||||
- Add a benchmark
|
||||
- Instead of having to allocate a ~100 keys map containing possibly dynamic values (at least to the go compiler), allocate it once in a global variable. This significantly speeds things up, by reducing the garbage
|
||||
- Use constant time access for maps instead of iterating on them
|
||||
- Build a ~large whitelist map inline instead of constructing it item by item (and remove a duplicate key/value pair)
|
||||
- Use `slices` instead of hand-rolled loops
|
||||
collector/allocator involvements.
|
||||
* Reuse a `Reader` instead of copying to a buffer when parsing an Atom feed
|
||||
* Preallocate memory when exporting to OPML: This should marginally increase performance when exporting a large amount of feeds to OPML
|
||||
* Delay call of `view.New` after logging the user in: There is no need to do extra work like creating a session and its associated view until the user has been properly identified and as many possibly-failing sql request have been successfully run
|
||||
* Use constant-time comparison for anti-csrf tokens: This is probably completely overkill, but since anti-csrf tokens are secrets, they should be compared against untrusted inputs in constant time
|
||||
* Simplify and optimize `genericProxyRewriter`
|
||||
- Reduce the amount of nested loops: it's preferable to search the whole page once and filter on it (even with filters that should always be false), than searching it again for every element we're looking for.
|
||||
- Factorize the proxying conditions into a `shouldProxy` function to reduce the copy-pasta.
|
||||
* Speed up `removeUnlikelyCandidates`: `.Not` returns a brand new `Selection`, copied element by element
|
||||
* Improve `EstimateReadingTime`'s speed by a factor 7
|
||||
- Refactorise the tests and add some
|
||||
- Use 250 signs instead of the whole text
|
||||
- Only check for Korean, Chinese and Japanese script
|
||||
- Add a benchmark
|
||||
- Use a more idiomatic control flow
|
||||
* Don't compute reading-time when unused: If the user doesn't display reading times, there is no need to compute them. This should speed things up a bit, since `whatlanggo.Detect` is abysmally slow.
|
||||
* Simplify `username` generation for the integration tests: No need to generate random numbers 10 times, generate a single big-enough one. A single int64 should be more than enough
|
||||
* Add missing regex anchor detected by CodeQL
|
||||
* Don't mix up slices capacity and length
|
||||
* Use prepared statements for intervals, `ArchiveEntries` and `updateEnclosures`
|
||||
* Use modern for-loops introduced with Go 1.22
|
||||
* Remove a superfluous condition: No need to check if the length of `line` is positive since we're checking afterwards that it contains the `=` sign
|
||||
* Close resources as soon as possible, instead of using `defer()` in a loop
|
||||
* Remove superfluous escaping in a regex
|
||||
* Use `strings.ReplaceAll` instead of `strings.Replace(…, -1)`
|
||||
* Use `strings.EqualFold` instead of `strings.ToLower(…) ==`
|
||||
* Use `.WriteString(` instead of `.Write([]byte(…`
|
||||
* Use `%q` instead of `"%s"`
|
||||
* Make `internal/worker/worker.go` read-only
|
||||
* Use a switch-case construct in `internal/locale/plural.go` instead of an avalanche of `if`
|
||||
* Template functions: simplify `formatFileSize` and `duration` implementation
|
||||
* Inline some templating functions
|
||||
* Make use of `printer.Print` when possible
|
||||
* Add a `printer.Print` to `internal/locale/printer.go`: No need to use variadic functions with string format interpolation to generate static strings
|
||||
* Minor code simplification in `internal/ui/view/view.go`: No need to create the map item by item when we can create it in one go
|
||||
* Build the map inline in `CountAllFeeds()`: No need to build an empty map to then add more fields in it one by one
|
||||
* Miscellaneous improvements to `internal/reader/subscription/finder.go`:
|
||||
- Surface `localizedError` in `FindSubscriptionsFromWellKnownURLs` via `slog`
|
||||
- Use an inline declaration for new subscriptions, like done elsewhere in the
|
||||
file, if only for consistency's sake
|
||||
- Preallocate the `subscriptions` slice when using an RSS-bridge,
|
||||
* Use an update-where for `MarkCategoryAsRead` instead of a subquery
|
||||
* Simplify `CleanOldUserSessions`' query: No need for a subquery, filtering on `created_at` directly is enough
|
||||
* Simplify `cleanupEntries`' query
|
||||
- `NOT (hash=ANY(%4))` can be expressed as `hash NOT IN $4`
|
||||
- There is no need for a subquery operating on the same table, moving the conditions out is equivalent.
|
||||
* Reformat `ArchiveEntries`'s query for consistency's sake and replace the `=ANY` with an `IN`
|
||||
* Reformat the query in `GetEntryIDs` and `GetReadTime`'s query for consistency's sake
|
||||
* Simplify `WeeklyFeedEntryCount`: No need for a `BETWEEN`: we want to filter on entries published in the last week, no need to express is as "entries published between now and last week", "entries published after last week" is enough
|
||||
* Add some tests for `add_image_title`
|
||||
* Remove `github.com/google/uuid` dependencies: Replace it with a hand-rolled implementation. Heck, an UUID isn't even a requirement according to Omnivore API docs
|
||||
* Simplify `internal/reader/icon/finder.go`:
|
||||
- Use a simple regex to parse data uri instead of a hand-rolled parser, and document what fields are considered mandatory.
|
||||
- Use case-insensitive matching to find (fav)icons, instead of doing the same query twice with different letter cases
|
||||
- Add `apple-touch-icon-precomposed.png` as a fallback `favicon`
|
||||
- Reorder the queries to have `icon` first, since it seems to be the most popular one. It used to be last, meaning that pages had to be parsed completely 4 times, instead of one now.
|
||||
- Minor factorisation in `findIconURLsFromHTMLDocument`
|
||||
* Small refactoring of `internal/reader/date/parser.go`:
|
||||
- Split dates formats into those that require local times and those who don't, so that there is no need to have a switch-case in the for loop with around 250 iterations at most.
|
||||
- Be more strict when it comes to timezones, previously invalid ones like -13 were accepted. Also add a test for this.
|
||||
- Bail out early if the date is an empty string.
|
||||
* Make use of Go ≥ 1.21 slices package instead of hand-rolled loops
|
||||
* Reorder the fields of the `Entry` struct to save some memory
|
||||
* Dependencies update:
|
||||
* Bump `golang.org/x/oauth2` from `0.17.0` to `0.18.0`
|
||||
* Bump `github.com/prometheus/client_golang` from `1.18.0` to `1.19.0`
|
||||
* Bump `github.com/tdewolff/minify/v2` from `2.20.16` to `2.20.18`
|
||||
* Bump `github.com/PuerkitoBio/goquery` from `1.8.1` to `1.9.1`
|
||||
* Bump `golang.org/x/crypto` from `0.19.0` to `0.20.0`
|
||||
* Bump `github.com/go-jose/go-jose/v3` from `3.0.1` to `3.0.3`
|
||||
|
||||
Version 2.1.0 (February 17, 2024)
|
||||
---------------------------------
|
||||
|
||||
* Add Linkwarden integration
|
||||
* Add LinkAce integration
|
||||
* Add `FORCE_REFRESH_INTERVAL` config option
|
||||
* Add `item-meta-info-reading-time` CSS class
|
||||
* Add `add_dynamic_iframe` rewrite function
|
||||
* Add attribute `data-original-mos` to `add_dynamic_image` rewrite candidates
|
||||
* Update entry processor to allow blocking/keeping entries by tags and/or authors
|
||||
* Change default `Accept` header when fetching feeds
|
||||
* Rewrite relative RSS Bridge URL to absolute URL
|
||||
* Use numeric user ID in Alpine and distroless container image (avoid `securityContext` error in Kubernetes)
|
||||
* Always try to use HTTP/2 when fetching feeds if available
|
||||
* Add `type` attribute in OPML export as per OPML 2.0 specs
|
||||
* Fix missing translation argument for the key `error.unable_to_parse_feed`
|
||||
* Fix Debian package builder when using Go 1.22 and `armhf` architecture
|
||||
* Fix typo in log message
|
||||
* Fix incorrect label shown when saving an article
|
||||
* Fix incorrect condition in refresh feeds cli
|
||||
* Fix incorrect label `for` attribute
|
||||
* Add missing label ID for custom CSS field
|
||||
* Accessibility improvements:
|
||||
* Add workaround for macOS VoiceOver that didn't announce `details` and `summary` when expanded
|
||||
* Add `alert` role to alert message element
|
||||
* Add a `h2` heading to the article element so that the screen reader users can navigate the article through the heading level
|
||||
* Add an `aria-label` attribute for the article element for screen readers
|
||||
* Remove the icon image `alt` attribute in feeds list to prevent screen reader to announce it before entry title
|
||||
* Add `sr-only` CSS class for screen reader users (provides more context)
|
||||
* Differentiate between buttons and links
|
||||
* Change links that could perform actions to buttons
|
||||
* Improve translation of hidden Aria elements
|
||||
* Remove the redundant article role
|
||||
* Add a search landmark for the search form so that the screen reader users can navigate to it
|
||||
* Add skip to content link
|
||||
* Add `nav` landmark to page header links
|
||||
* Limit feed/category entry pagination to unread entries when coming from unread entry list
|
||||
* Update German translation
|
||||
* Update GitHub Actions to Go 1.22
|
||||
* Bump `golang.org/x/term` from `0.16.0` to `0.17.0`
|
||||
* Bump `github.com/google/uuid` from `1.5.0` to `1.6.0`
|
||||
* Bump `github.com/yuin/goldmark` from `1.6.0` to `1.7.0`
|
||||
* Bump `golang.org/x/oauth2` from `0.15.0` to `0.17.0`
|
||||
* Bump `github.com/tdewolff/minify/v2` from `2.20.10` to `2.20.12`
|
||||
* Bump `golang.org/x/term` from `0.15.0` to `0.16.0`
|
||||
* Bump `github.com/prometheus/client_golang` from `1.17.0` to `1.18.0`
|
||||
* Bump `github.com/tdewolff/minify/v2` from `2.20.9` to `2.20.16`
|
||||
* Bump `golang.org/x/crypto` from `0.16.0` to `0.19.0`
|
||||
* Bump `github.com/go-webauthn/webauthn` from `0.9.4` to` 0.10.1`
|
||||
* Bump `golang.org/x/net` from `0.20.0` to `0.21.0`
|
||||
|
||||
Version 2.0.51 (December 13, 2023)
|
||||
----------------------------------
|
||||
|
||||
* Add Omnivore integration
|
||||
* Fixes for the regressions introduced in version 2.0.50:
|
||||
* Ensure all HTML documents are encoded in UTF-8
|
||||
* Send default User-Agent and HTTP caching headers when making HTTP requests
|
||||
* Allow Youtube links to be opened outside the `iframe` (avoid `ERR_BLOCKED_BY_RESPONSE` error)
|
||||
* Fix inaccessible metrics endpoint when listening on Unix socket
|
||||
* Allow renaming and moving feed at the same time in the Google Reader API
|
||||
* Log `nb_jobs` only when number of jobs is larger than 0 in background scheduler
|
||||
* Deduplicate feed URLs when parsing HTML document during discovery process
|
||||
* Calculate a virtual weekly count based on the average updating frequency (`POLLING_SCHEDULER=entry_frequency`)
|
||||
* Update GitHub Actions workflow to be able to run the linter and tests on-demand
|
||||
* Add `SCHEDULER_ROUND_ROBIN_MIN_INTERVAL` config option
|
||||
* Add links to GitHub for the commit hash and the version in the about page
|
||||
* Use "starred" rather than "bookmarked" in English translation
|
||||
* Update Chinese (CN & TW) translation
|
||||
* Bump `github.com/google/uuid` from `1.4.0` to `1.5.0`
|
||||
* Bump `github.com/coreos/go-oidc/v3` from `3.7.0` to `3.9.0`
|
||||
* Bump `github.com/tdewolff/minify/v2` from `2.20.6` to `2.20.9`
|
||||
* Bump `github.com/go-webauthn/webauthn` from `0.8.6` to `0.9.4`
|
||||
* Bump `golang.org/x/oauth2` from `0.14.0` to `0.15.0`
|
||||
|
||||
Version 2.0.50 (November 12, 2023)
|
||||
----------------------------------
|
||||
|
||||
* Add WebAuthn / Passkey integration
|
||||
* Add RSS-Bridge integration
|
||||
* Take RSS TTL field into consideration to schedule next check date
|
||||
* Show number of visible entries instead of number of read entries in feed list
|
||||
* OpenID Connect: Redirect to configured user home page after successful authentication
|
||||
* Google Reader API fixes:
|
||||
* `user/{userID}/state/com.google/read` is missing in categories section for read entries
|
||||
* Take `ExcludeTargets` into consideration in feed stream handler
|
||||
* Allow iframes pointing to Twitch videos
|
||||
* Filter feed entries based on URL or title
|
||||
* Take into consideration `hide_globally` property defined for categories in `/v1/entries` API endpoint
|
||||
* Add category ID to webhooks request body
|
||||
* Update date parser to parse more invalid date formats
|
||||
* Refactor feed discovery handler, and avoid an extra HTTP request if the URL provided is the feed
|
||||
* Refactor HTTP Client and `LocalizedError` packages
|
||||
* Refactor Batch Builder, and prevent accidental and excessive refreshes from the web UI
|
||||
* Refactor icon finder:
|
||||
- Continue the discovery process when the feed icon is invalid
|
||||
- Search all icons from the HTML document and do not stop on the first one
|
||||
* Add support for SVG icons with data URL without encoding
|
||||
* Expose `next_check_at` in the web ui and API
|
||||
* Add database indexes to improve performance
|
||||
* Change log level to warning for failed feeds refresh in cronjob
|
||||
* Do not log website without icon as warning
|
||||
* Add GitHub workflow to build binaries
|
||||
* Add GitHub extensions to devcontainer
|
||||
* Make sure to pull the latest base image when building the Docker image
|
||||
* Strip version prefix when building Debian package
|
||||
* Add `github-cli` and `docker-outside-of-docker` features to devcontainer
|
||||
* Bump `golang.org/x/*` dependencies
|
||||
* Bump `github.com/gorilla/mux` from `1.8.0` to `1.8.1`
|
||||
* Bump `github.com/tdewolff/minify/v2` from `2.19.9` to `2.20.6`
|
||||
* Bump `github.com/yuin/goldmark` from `1.5.6` to `1.6.0`
|
||||
* Bump `github.com/coreos/go-oidc/v3` from `3.6.0` to `3.7.0`
|
||||
|
||||
Version 2.0.49 (October 15, 2023)
|
||||
---------------------------------
|
||||
|
||||
* Implement structured logging using `log/slog` package. New config options available:
|
||||
* `LOG_FORMAT`: `json` or `text`
|
||||
* `LOG_LEVEL`: `debug`, `info`, `warning`, or `error`
|
||||
* `LOG_FILE`: `sdterr`, `stdout`, or a file path
|
||||
* The `DEBUG` option is now deprecated in favor of `LOG_LEVEL`
|
||||
* API Improvements:
|
||||
* Add endpoint `/v1/version`
|
||||
* Add endpoint `PUT /v1/entries` to update entry title and content
|
||||
* Add endpoint `/v1/icons/{iconID}`
|
||||
* Add endpoint `/v1/flush-history` to flush history
|
||||
* Make the category optional when creating feeds for API clients who don't support categories
|
||||
* Add enclosures to `GET /v1/entries` endpoint
|
||||
* Add `published_after`, `published_before`, `changed_after` and `changed_before` options to `/v1/entries` endpoint
|
||||
* Telegram integration improvements:
|
||||
* Replace feed HTML link with a button to avoid page preview issues
|
||||
* Add the possibility to disable buttons
|
||||
* Add Bruno Miniflux API collection in `contrib` folder (Bruno is an open source alternative to Postman/Insomnia)
|
||||
* Add command line argument to export user feeds as OPML
|
||||
* Add new rewrite rules `add_hn_links_using_hack` and `add_hn_links_using_opener` to open HN comments with iOS apps
|
||||
* Fix timestamp format for `Expires` response header
|
||||
* Fix Javascript error when reading time option is disabled
|
||||
* Fix Apprise logic to handle feed service URLs
|
||||
* Fix missing word in force refresh message
|
||||
* Remove deprecated `PreferServerCipherSuites` TLS option
|
||||
* Replace `github.com/rylans/getlang` with `github.com/abadojack/whatlanggo` because `getlang` doesn't seems to be updated anymore
|
||||
* Bump `github.com/mccutchen/go-httpbin/v2` from `2.11.0` to `2.11.1`
|
||||
* Bump `golang.org/x/*` dependencies
|
||||
|
||||
Version 2.0.48 (September 15, 2023)
|
||||
-----------------------------------
|
||||
|
||||
* Add generic webhook integration
|
||||
* Send webhook events when new entries are detected
|
||||
* Send wehbook events when saving an entry
|
||||
* Sign the outgoing requests with HMAC-SHA256
|
||||
* Improve Telegram integration
|
||||
* Add built-in Telegram client
|
||||
* Remove dependency on `go-telegram-bot-api` library
|
||||
* Add new options:
|
||||
* Optional topic ID
|
||||
* Disable page preview
|
||||
* Disable notifications
|
||||
* Add new button to go to article
|
||||
* Improve Matrix integration
|
||||
* Add built-in Matrix client
|
||||
* Remove dependency on `gomatrix` library
|
||||
* Send HTML formatted messages to Matrix
|
||||
* OpenID Connect authentication improvements:
|
||||
* Add OAuth2 PKCE support
|
||||
* Add `profile` scope to OIDC integration to support accounts without email address
|
||||
* Prevent empty username when using the OIDC integration
|
||||
* Add `factor` for `entry_frequency` scheduler:
|
||||
* Allow the user to increase the frequency of the `entry_frequency`
|
||||
scheduler by a configurable factor in order to shorten the time between
|
||||
updates.
|
||||
* Fix: status bar is unreadable when using PWA in dark mode on Firefox Android
|
||||
* Group form fields into fieldsets to improve page layout
|
||||
* Update Russian translation
|
||||
* Make sure icon URLs are always absolute
|
||||
* Add Apprise service URLs per feed
|
||||
* Trim `username` and `password` form fields
|
||||
* Strip HTML tags from DublinCore Creator tags
|
||||
* Fix scroll up behavior on Firefox Android
|
||||
* Add missing `return` statement in `fetchContent` UI handler
|
||||
* Add `replace_title` rewrite rule to adjust entry titles
|
||||
* Fix Pocket integration redirect URL and Google Reader API HREF
|
||||
* Fix feed `hide_globally` property to use it with third-party clients.
|
||||
|
||||
Version 2.0.47 (August 20, 2023)
|
||||
--------------------------------
|
||||
|
||||
* Update rules for `webtoons.com`
|
||||
* Use HTTP client from the standard library for third-party integrations
|
||||
* Rename internal `url` package to `urllib` to avoid overlap with `net/url`
|
||||
* Add Shaarli integration
|
||||
* Add Shiori integration
|
||||
* Add Apprise integration
|
||||
* Add Readwise Reader integration
|
||||
* Consider base path when generating third-party services API endpoint
|
||||
* Use podcast duration tag as reading time
|
||||
* Move internal packages to an `internal` folder
|
||||
* For reference: <https://go.dev/doc/go1.4#internalpackages>
|
||||
* Rename Miniflux package name to follow Go module naming convention
|
||||
* For reference: <https://go.dev/ref/mod#major-version-suffixes>
|
||||
* Update RockyLinux image from 8 to 9 (used to build RPM package)
|
||||
* Add force refresh in feed edit and feed entries page
|
||||
* Use Odysee video duration as read time
|
||||
* Upgrade to Go 1.21
|
||||
* Use details disclosure element to show the list of third-party services
|
||||
* Use Web Share API for sharing entry
|
||||
* Add a workaround for parsing some invalid date format
|
||||
* Add Thunder Client API collection into contrib folder
|
||||
* Add new API endpoint: `/entries/{entryID}/save`
|
||||
* Trigger Docker and packages workflows only for semantic tags
|
||||
* Go module versioning expect Git tags to start with the letter v.
|
||||
* The goal is to keep the existing naming convention for generated artifacts and
|
||||
have proper versioning for the Go module.
|
||||
* Bump `golang.org/x/*` dependencies
|
||||
* Bump `github.com/yuin/goldmark`
|
||||
* Bump `github.com/tdewolff/minify/v2`
|
||||
* Bump `github.com/mccutchen/go-httpbin/v2`
|
||||
|
||||
Version 2.0.46 (July 21, 2023)
|
||||
------------------------------
|
||||
|
||||
* Add scraper and rewrite rules for Webtoons
|
||||
* Fix regression in integration page and simplify SQL query
|
||||
* Wallabag integration: add more information in log messages
|
||||
* Add support for custom Youtube embed URL
|
||||
* Fix accessibility issues in modal component
|
||||
* Fix modal aria role
|
||||
* Trap focusing with tab / shift+tab inside the modal
|
||||
* Restore keyboard focus when closing modal
|
||||
* Automatically move keyboard focus to first focusable element unless specified otherwise
|
||||
* Keyboard shortcut help modal: move keyboard focus to modal title
|
||||
* Keyboard shortcut help modal: change close control from link to button
|
||||
* Add Notion integration
|
||||
* Update `golang.org/x/*` dependencies and `go-oidc` to v3.6.0
|
||||
* Improve responsive design
|
||||
* Add user setting for marking entry as read on view
|
||||
* Improve Russian translation
|
||||
* Add the possibility to run cleanup tasks from the command line
|
||||
* Add the possibility to run Miniflux as a cronjob
|
||||
* Use `go-httpbin` to run tests locally and avoid remote calls to `httpbin.org`
|
||||
* Display tags when viewing entries
|
||||
* Update categories API endpoint to return `total_unread` and `feed_count`
|
||||
* Improve date parser to handle various broken date formats
|
||||
* Avoid `pq: time zone displacement out of range` errors
|
||||
* Improve entry existance check to make better use of index
|
||||
* Add unique index `enclosures_user_entry_url_idx`
|
||||
* Add mark as unread for Linkding integration
|
||||
* Add sub-folder support for Wallabag integration
|
||||
* Use RockyLinux to build RPM package
|
||||
* Disable CGO when building RPM package
|
||||
* Disable CGO when building Docker images
|
||||
|
||||
Version 2.0.45 (June 21, 2023)
|
||||
------------------------------
|
||||
|
||||
* Add media player to listen to audio and video podcasts with the possiblity to resume to last playback position
|
||||
* Add default tag names for Linkding integration
|
||||
* Mark only globally visible entries when marking all entries from UI
|
||||
* Use image included in feed as feed icon when available
|
||||
* Order history by `changed_at` and `published_at`
|
||||
* Remove title attribute from entry title links
|
||||
* Fix reading time that is not aligned correctly with the latest version of Safari
|
||||
* Use glyphs of the same size on keyboard shortcuts page
|
||||
* Add maskable versions of the PWA icon
|
||||
* Replace copyright header with SPDX identifier
|
||||
* Remove the "í" letter from the Portuguese "lido" word
|
||||
* Increase golangci-lint timeout value
|
||||
* Bump `github.com/tdewolff/minify/v2`, `github.com/prometheus/client_golang`, `golang.org/x/*` dependencies
|
||||
|
||||
Version 2.0.44 (May 6, 2023)
|
||||
----------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
APP := miniflux
|
||||
DOCKER_IMAGE := miniflux/miniflux
|
||||
VERSION := $(shell git describe --tags --abbrev=0)
|
||||
COMMIT := $(shell git rev-parse --short HEAD)
|
||||
VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null)
|
||||
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
BUILD_DATE := `date +%FT%T%z`
|
||||
LD_FLAGS := "-s -w -X 'miniflux.app/version.Version=$(VERSION)' -X 'miniflux.app/version.Commit=$(COMMIT)' -X 'miniflux.app/version.BuildDate=$(BUILD_DATE)'"
|
||||
LD_FLAGS := "-s -w -X 'miniflux.app/v2/internal/version.Version=$(VERSION)' -X 'miniflux.app/v2/internal/version.Commit=$(COMMIT)' -X 'miniflux.app/v2/internal/version.BuildDate=$(BUILD_DATE)'"
|
||||
PKG_LIST := $(shell go list ./... | grep -v /vendor/)
|
||||
DB_URL := postgres://postgres:postgres@localhost/miniflux_test?sslmode=disable
|
||||
DEB_IMG_ARCH := amd64
|
||||
@@ -12,6 +12,7 @@ export PGPASSWORD := postgres
|
||||
|
||||
.PHONY: \
|
||||
miniflux \
|
||||
miniflux-no-pie \
|
||||
linux-amd64 \
|
||||
linux-arm64 \
|
||||
linux-armv7 \
|
||||
@@ -45,6 +46,9 @@ export PGPASSWORD := postgres
|
||||
miniflux:
|
||||
@ go build -buildmode=pie -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
|
||||
miniflux-no-pie:
|
||||
@ go build -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
|
||||
linux-amd64:
|
||||
@ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
|
||||
@@ -73,7 +77,7 @@ openbsd-amd64:
|
||||
@ GOOS=openbsd GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
|
||||
windows-amd64:
|
||||
@ GOOS=windows GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
@ GOOS=windows GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@.exe main.go
|
||||
|
||||
build: linux-amd64 linux-arm64 linux-armv7 linux-armv6 linux-armv5 darwin-amd64 darwin-arm64 freebsd-amd64 openbsd-amd64 windows-amd64
|
||||
|
||||
@@ -94,19 +98,21 @@ openbsd-x86:
|
||||
@ GOOS=openbsd GOARCH=386 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
|
||||
windows-x86:
|
||||
@ GOOS=windows GOARCH=386 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
@ GOOS=windows GOARCH=386 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@.exe main.go
|
||||
|
||||
run:
|
||||
@ LOG_DATE_TIME=1 DEBUG=1 RUN_MIGRATIONS=1 go run main.go
|
||||
@ LOG_DATE_TIME=1 DEBUG=1 RUN_MIGRATIONS=1 CREATE_ADMIN=1 ADMIN_USERNAME=admin ADMIN_PASSWORD=test123 go run main.go
|
||||
|
||||
clean:
|
||||
@ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb
|
||||
@ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe
|
||||
|
||||
test:
|
||||
go test -cover -race -count=1 ./...
|
||||
|
||||
lint:
|
||||
golint -set_exit_status ${PKG_LIST}
|
||||
go vet ./...
|
||||
staticcheck ./...
|
||||
golangci-lint run --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace
|
||||
|
||||
integration-test:
|
||||
psql -U postgres -c 'drop database if exists miniflux_test;'
|
||||
@@ -120,9 +126,9 @@ integration-test:
|
||||
RUN_MIGRATIONS=1 \
|
||||
DEBUG=1 \
|
||||
./miniflux-test >/tmp/miniflux.log 2>&1 & echo "$$!" > "/tmp/miniflux.pid"
|
||||
|
||||
|
||||
while ! nc -z localhost 8080; do sleep 1; done
|
||||
go test -v -tags=integration -count=1 miniflux.app/tests
|
||||
go test -v -tags=integration -count=1 miniflux.app/v2/internal/tests
|
||||
|
||||
clean-integration-test:
|
||||
@ kill -9 `cat /tmp/miniflux.pid`
|
||||
@@ -131,7 +137,7 @@ clean-integration-test:
|
||||
@ psql -U postgres -c 'drop database if exists miniflux_test;'
|
||||
|
||||
docker-image:
|
||||
docker build -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/alpine/Dockerfile .
|
||||
docker build --pull -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/alpine/Dockerfile .
|
||||
|
||||
docker-image-distroless:
|
||||
docker build -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/distroless/Dockerfile .
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package api // import "miniflux.app/api"
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/json"
|
||||
)
|
||||
|
||||
func (h *handler) feedIcon(w http.ResponseWriter, r *http.Request) {
|
||||
feedID := request.RouteInt64Param(r, "feedID")
|
||||
|
||||
if !h.store.HasIcon(feedID) {
|
||||
json.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
icon, err := h.store.IconByFeedID(request.UserID(r), feedID)
|
||||
if err != nil {
|
||||
json.ServerError(w, r, err)
|
||||
return
|
||||
}
|
||||
|
||||
if icon == nil {
|
||||
json.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
json.OK(w, r, &feedIconResponse{
|
||||
ID: icon.ID,
|
||||
MimeType: icon.MimeType,
|
||||
Data: icon.DataURL(),
|
||||
})
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package api // import "miniflux.app/api"
|
||||
|
||||
import (
|
||||
"miniflux.app/model"
|
||||
)
|
||||
|
||||
type feedIconResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
MimeType string `json:"mime_type"`
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
type entriesResponse struct {
|
||||
Total int `json:"total"`
|
||||
Entries model.Entries `json:"entries"`
|
||||
}
|
||||
|
||||
type feedCreationResponse struct {
|
||||
FeedID int64 `json:"feed_id"`
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package api // import "miniflux.app/api"
|
||||
|
||||
import (
|
||||
json_parser "encoding/json"
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/response/json"
|
||||
"miniflux.app/model"
|
||||
"miniflux.app/reader/subscription"
|
||||
"miniflux.app/validator"
|
||||
)
|
||||
|
||||
func (h *handler) discoverSubscriptions(w http.ResponseWriter, r *http.Request) {
|
||||
var subscriptionDiscoveryRequest model.SubscriptionDiscoveryRequest
|
||||
if err := json_parser.NewDecoder(r.Body).Decode(&subscriptionDiscoveryRequest); err != nil {
|
||||
json.BadRequest(w, r, err)
|
||||
return
|
||||
}
|
||||
|
||||
if validationErr := validator.ValidateSubscriptionDiscovery(&subscriptionDiscoveryRequest); validationErr != nil {
|
||||
json.BadRequest(w, r, validationErr.Error())
|
||||
return
|
||||
}
|
||||
|
||||
subscriptions, finderErr := subscription.FindSubscriptions(
|
||||
subscriptionDiscoveryRequest.URL,
|
||||
subscriptionDiscoveryRequest.UserAgent,
|
||||
subscriptionDiscoveryRequest.Cookie,
|
||||
subscriptionDiscoveryRequest.Username,
|
||||
subscriptionDiscoveryRequest.Password,
|
||||
subscriptionDiscoveryRequest.FetchViaProxy,
|
||||
subscriptionDiscoveryRequest.AllowSelfSignedCertificates,
|
||||
)
|
||||
if finderErr != nil {
|
||||
json.ServerError(w, r, finderErr)
|
||||
return
|
||||
}
|
||||
|
||||
if subscriptions == nil {
|
||||
json.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
json.OK(w, r, subscriptions)
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package cli implements command line arguments for Miniflux application.
|
||||
*/
|
||||
package cli // import "miniflux.app/cli"
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cli // import "miniflux.app/cli"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"miniflux.app/storage"
|
||||
)
|
||||
|
||||
func flushSessions(store *storage.Storage) {
|
||||
fmt.Println("Flushing all sessions (disconnect users)")
|
||||
if err := store.FlushAllSessions(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright 2021 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cli // import "miniflux.app/cli"
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/logger"
|
||||
)
|
||||
|
||||
func doHealthCheck(healthCheckEndpoint string) {
|
||||
if healthCheckEndpoint == "auto" {
|
||||
healthCheckEndpoint = "http://" + config.Opts.ListenAddr() + config.Opts.BasePath() + "/healthcheck"
|
||||
}
|
||||
|
||||
logger.Debug(`Executing health check on %s`, healthCheckEndpoint)
|
||||
|
||||
client := &http.Client{Timeout: 3 * time.Second}
|
||||
resp, err := client.Get(healthCheckEndpoint)
|
||||
if err != nil {
|
||||
logger.Fatal(`Health check failure: %v`, err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
logger.Fatal(`Health check failed with status code %d`, resp.StatusCode)
|
||||
}
|
||||
|
||||
logger.Debug(`Health check is OK`)
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
Miniflux API Client
|
||||
===================
|
||||
|
||||
[](https://pkg.go.dev/miniflux.app/client)
|
||||
[](https://pkg.go.dev/miniflux.app/v2/client)
|
||||
|
||||
Client library for Miniflux REST API.
|
||||
|
||||
@@ -9,7 +9,7 @@ Installation
|
||||
------------
|
||||
|
||||
```bash
|
||||
go get -u miniflux.app/client
|
||||
go get -u miniflux.app/v2/client
|
||||
```
|
||||
|
||||
Example
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
miniflux "miniflux.app/client"
|
||||
miniflux "miniflux.app/v2/client"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
+106
-53
@@ -1,8 +1,7 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package client // import "miniflux.app/client"
|
||||
package client // import "miniflux.app/v2/client"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -31,6 +30,22 @@ func New(endpoint string, credentials ...string) *Client {
|
||||
return &Client{request: &request{endpoint: endpoint, apiKey: credentials[0]}}
|
||||
}
|
||||
|
||||
// Version returns the version of the Miniflux instance.
|
||||
func (c *Client) Version() (*VersionResponse, error) {
|
||||
body, err := c.request.Get("/v1/version")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer body.Close()
|
||||
|
||||
var versionResponse *VersionResponse
|
||||
if err := json.NewDecoder(body).Decode(&versionResponse); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: json error (%v)", err)
|
||||
}
|
||||
|
||||
return versionResponse, nil
|
||||
}
|
||||
|
||||
// Me returns the logged user information.
|
||||
func (c *Client) Me() (*User, error) {
|
||||
body, err := c.request.Get("/v1/me")
|
||||
@@ -40,8 +55,7 @@ func (c *Client) Me() (*User, error) {
|
||||
defer body.Close()
|
||||
|
||||
var user *User
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&user); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&user); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: json error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -57,8 +71,7 @@ func (c *Client) Users() (Users, error) {
|
||||
defer body.Close()
|
||||
|
||||
var users Users
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&users); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&users); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -74,8 +87,7 @@ func (c *Client) UserByID(userID int64) (*User, error) {
|
||||
defer body.Close()
|
||||
|
||||
var user User
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&user); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&user); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -91,8 +103,7 @@ func (c *Client) UserByUsername(username string) (*User, error) {
|
||||
defer body.Close()
|
||||
|
||||
var user User
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&user); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&user); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -112,8 +123,7 @@ func (c *Client) CreateUser(username, password string, isAdmin bool) (*User, err
|
||||
defer body.Close()
|
||||
|
||||
var user *User
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&user); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&user); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -129,8 +139,7 @@ func (c *Client) UpdateUser(userID int64, userChanges *UserModificationRequest)
|
||||
defer body.Close()
|
||||
|
||||
var u *User
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&u); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&u); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -157,8 +166,7 @@ func (c *Client) Discover(url string) (Subscriptions, error) {
|
||||
defer body.Close()
|
||||
|
||||
var subscriptions Subscriptions
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&subscriptions); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&subscriptions); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -174,8 +182,7 @@ func (c *Client) Categories() (Categories, error) {
|
||||
defer body.Close()
|
||||
|
||||
var categories Categories
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&categories); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&categories); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -193,8 +200,7 @@ func (c *Client) CreateCategory(title string) (*Category, error) {
|
||||
defer body.Close()
|
||||
|
||||
var category *Category
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&category); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&category); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -212,8 +218,7 @@ func (c *Client) UpdateCategory(categoryID int64, title string) (*Category, erro
|
||||
defer body.Close()
|
||||
|
||||
var category *Category
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&category); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&category); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -235,8 +240,7 @@ func (c *Client) CategoryFeeds(categoryID int64) (Feeds, error) {
|
||||
defer body.Close()
|
||||
|
||||
var feeds Feeds
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&feeds); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&feeds); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -263,8 +267,7 @@ func (c *Client) Feeds() (Feeds, error) {
|
||||
defer body.Close()
|
||||
|
||||
var feeds Feeds
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&feeds); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&feeds); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -302,8 +305,7 @@ func (c *Client) Feed(feedID int64) (*Feed, error) {
|
||||
defer body.Close()
|
||||
|
||||
var feed *Feed
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&feed); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&feed); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -323,8 +325,7 @@ func (c *Client) CreateFeed(feedCreationRequest *FeedCreationRequest) (int64, er
|
||||
}
|
||||
|
||||
var r result
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&r); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&r); err != nil {
|
||||
return 0, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -379,8 +380,7 @@ func (c *Client) FeedIcon(feedID int64) (*FeedIcon, error) {
|
||||
defer body.Close()
|
||||
|
||||
var feedIcon *FeedIcon
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&feedIcon); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&feedIcon); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -396,8 +396,7 @@ func (c *Client) FeedEntry(feedID, entryID int64) (*Entry, error) {
|
||||
defer body.Close()
|
||||
|
||||
var entry *Entry
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&entry); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&entry); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -413,8 +412,7 @@ func (c *Client) CategoryEntry(categoryID, entryID int64) (*Entry, error) {
|
||||
defer body.Close()
|
||||
|
||||
var entry *Entry
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&entry); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&entry); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -430,8 +428,7 @@ func (c *Client) Entry(entryID int64) (*Entry, error) {
|
||||
defer body.Close()
|
||||
|
||||
var entry *Entry
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&entry); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&entry); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -449,8 +446,7 @@ func (c *Client) Entries(filter *Filter) (*EntryResultSet, error) {
|
||||
defer body.Close()
|
||||
|
||||
var result EntryResultSet
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&result); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&result); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -468,8 +464,7 @@ func (c *Client) FeedEntries(feedID int64, filter *Filter) (*EntryResultSet, err
|
||||
defer body.Close()
|
||||
|
||||
var result EntryResultSet
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&result); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&result); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -487,8 +482,7 @@ func (c *Client) CategoryEntries(categoryID int64, filter *Filter) (*EntryResult
|
||||
defer body.Close()
|
||||
|
||||
var result EntryResultSet
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&result); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&result); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
@@ -506,13 +500,35 @@ func (c *Client) UpdateEntries(entryIDs []int64, status string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// UpdateEntry updates an entry.
|
||||
func (c *Client) UpdateEntry(entryID int64, entryChanges *EntryModificationRequest) (*Entry, error) {
|
||||
body, err := c.request.Put(fmt.Sprintf("/v1/entries/%d", entryID), entryChanges)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer body.Close()
|
||||
|
||||
var entry *Entry
|
||||
if err := json.NewDecoder(body).Decode(&entry); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
return entry, nil
|
||||
}
|
||||
|
||||
// ToggleBookmark toggles entry bookmark value.
|
||||
func (c *Client) ToggleBookmark(entryID int64) error {
|
||||
_, err := c.request.Put(fmt.Sprintf("/v1/entries/%d/bookmark", entryID), nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// FetchCounters
|
||||
// SaveEntry sends an entry to a third-party service.
|
||||
func (c *Client) SaveEntry(entryID int64) error {
|
||||
_, err := c.request.Post(fmt.Sprintf("/v1/entries/%d/save", entryID), nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// FetchCounters fetches feed counters.
|
||||
func (c *Client) FetchCounters() (*FeedCounters, error) {
|
||||
body, err := c.request.Get("/v1/feeds/counters")
|
||||
if err != nil {
|
||||
@@ -521,14 +537,35 @@ func (c *Client) FetchCounters() (*FeedCounters, error) {
|
||||
defer body.Close()
|
||||
|
||||
var result FeedCounters
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&result); err != nil {
|
||||
if err := json.NewDecoder(body).Decode(&result); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// FlushHistory changes all entries with the status "read" to "removed".
|
||||
func (c *Client) FlushHistory() error {
|
||||
_, err := c.request.Put("/v1/flush-history", nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// Icon fetches a feed icon.
|
||||
func (c *Client) Icon(iconID int64) (*FeedIcon, error) {
|
||||
body, err := c.request.Get(fmt.Sprintf("/v1/icons/%d", iconID))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer body.Close()
|
||||
|
||||
var feedIcon *FeedIcon
|
||||
if err := json.NewDecoder(body).Decode(&feedIcon); err != nil {
|
||||
return nil, fmt.Errorf("miniflux: response error (%v)", err)
|
||||
}
|
||||
|
||||
return feedIcon, nil
|
||||
}
|
||||
|
||||
func buildFilterQueryString(path string, filter *Filter) string {
|
||||
if filter != nil {
|
||||
values := url.Values{}
|
||||
@@ -557,14 +594,30 @@ func buildFilterQueryString(path string, filter *Filter) string {
|
||||
values.Set("after", strconv.FormatInt(filter.After, 10))
|
||||
}
|
||||
|
||||
if filter.AfterEntryID > 0 {
|
||||
values.Set("after_entry_id", strconv.FormatInt(filter.AfterEntryID, 10))
|
||||
}
|
||||
|
||||
if filter.Before > 0 {
|
||||
values.Set("before", strconv.FormatInt(filter.Before, 10))
|
||||
}
|
||||
|
||||
if filter.PublishedAfter > 0 {
|
||||
values.Set("published_after", strconv.FormatInt(filter.PublishedAfter, 10))
|
||||
}
|
||||
|
||||
if filter.PublishedBefore > 0 {
|
||||
values.Set("published_before", strconv.FormatInt(filter.PublishedBefore, 10))
|
||||
}
|
||||
|
||||
if filter.ChangedAfter > 0 {
|
||||
values.Set("changed_after", strconv.FormatInt(filter.ChangedAfter, 10))
|
||||
}
|
||||
|
||||
if filter.ChangedBefore > 0 {
|
||||
values.Set("changed_before", strconv.FormatInt(filter.ChangedBefore, 10))
|
||||
}
|
||||
|
||||
if filter.AfterEntryID > 0 {
|
||||
values.Set("after_entry_id", strconv.FormatInt(filter.AfterEntryID, 10))
|
||||
}
|
||||
|
||||
if filter.BeforeEntryID > 0 {
|
||||
values.Set("before_entry_id", strconv.FormatInt(filter.BeforeEntryID, 10))
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,6 +1,5 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/*
|
||||
Package client implements a client library for the Miniflux REST API.
|
||||
@@ -10,7 +9,7 @@ Package client implements a client library for the Miniflux REST API.
|
||||
This code snippet fetch the list of users:
|
||||
|
||||
import (
|
||||
miniflux "miniflux.app/client"
|
||||
miniflux "miniflux.app/v2/client"
|
||||
)
|
||||
|
||||
client := miniflux.New("https://api.example.org", "admin", "secret")
|
||||
@@ -30,4 +29,4 @@ This one discover subscriptions on a website:
|
||||
}
|
||||
fmt.Println(subscriptions)
|
||||
*/
|
||||
package client // import "miniflux.app/client"
|
||||
package client // import "miniflux.app/v2/client"
|
||||
|
||||
+54
-29
@@ -1,8 +1,7 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package client // import "miniflux.app/client"
|
||||
package client // import "miniflux.app/v2/client"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -41,6 +40,7 @@ type User struct {
|
||||
CJKReadingSpeed int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage string `json:"default_home_page"`
|
||||
CategoriesSortingOrder string `json:"categories_sorting_order"`
|
||||
MarkReadOnView bool `json:"mark_read_on_view"`
|
||||
}
|
||||
|
||||
func (u User) String() string {
|
||||
@@ -79,6 +79,7 @@ type UserModificationRequest struct {
|
||||
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage *string `json:"default_home_page"`
|
||||
CategoriesSortingOrder *string `json:"categories_sorting_order"`
|
||||
MarkReadOnView *bool `json:"mark_read_on_view"`
|
||||
}
|
||||
|
||||
// Users represents a list of users.
|
||||
@@ -106,7 +107,7 @@ type Subscription struct {
|
||||
}
|
||||
|
||||
func (s Subscription) String() string {
|
||||
return fmt.Sprintf(`Title="%s", URL="%s", Type="%s"`, s.Title, s.URL, s.Type)
|
||||
return fmt.Sprintf(`Title=%q, URL=%q, Type=%q`, s.Title, s.URL, s.Type)
|
||||
}
|
||||
|
||||
// Subscriptions represents a list of subscriptions.
|
||||
@@ -139,6 +140,7 @@ type Feed struct {
|
||||
Password string `json:"password"`
|
||||
Category *Category `json:"category,omitempty"`
|
||||
HideGlobally bool `json:"hide_globally"`
|
||||
DisableHTTP2 bool `json:"disable_http2"`
|
||||
}
|
||||
|
||||
// FeedCreationRequest represents the request to create a feed.
|
||||
@@ -159,6 +161,7 @@ type FeedCreationRequest struct {
|
||||
BlocklistRules string `json:"blocklist_rules"`
|
||||
KeeplistRules string `json:"keeplist_rules"`
|
||||
HideGlobally bool `json:"hide_globally"`
|
||||
DisableHTTP2 bool `json:"disable_http2"`
|
||||
}
|
||||
|
||||
// FeedModificationRequest represents the request to update a feed.
|
||||
@@ -181,6 +184,7 @@ type FeedModificationRequest struct {
|
||||
AllowSelfSignedCertificates *bool `json:"allow_self_signed_certificates"`
|
||||
FetchViaProxy *bool `json:"fetch_via_proxy"`
|
||||
HideGlobally *bool `json:"hide_globally"`
|
||||
DisableHTTP2 *bool `json:"disable_http2"`
|
||||
}
|
||||
|
||||
// FeedIcon represents the feed icon.
|
||||
@@ -201,24 +205,30 @@ type Feeds []*Feed
|
||||
// Entry represents a subscription item in the system.
|
||||
type Entry struct {
|
||||
ID int64 `json:"id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
FeedID int64 `json:"feed_id"`
|
||||
Status string `json:"status"`
|
||||
Date time.Time `json:"published_at"`
|
||||
ChangedAt time.Time `json:"changed_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Feed *Feed `json:"feed,omitempty"`
|
||||
Hash string `json:"hash"`
|
||||
Title string `json:"title"`
|
||||
URL string `json:"url"`
|
||||
CommentsURL string `json:"comments_url"`
|
||||
Date time.Time `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ChangedAt time.Time `json:"changed_at"`
|
||||
Title string `json:"title"`
|
||||
Status string `json:"status"`
|
||||
Content string `json:"content"`
|
||||
Author string `json:"author"`
|
||||
ShareCode string `json:"share_code"`
|
||||
Starred bool `json:"starred"`
|
||||
ReadingTime int `json:"reading_time"`
|
||||
Enclosures Enclosures `json:"enclosures,omitempty"`
|
||||
Feed *Feed `json:"feed,omitempty"`
|
||||
Tags []string `json:"tags"`
|
||||
ReadingTime int `json:"reading_time"`
|
||||
UserID int64 `json:"user_id"`
|
||||
FeedID int64 `json:"feed_id"`
|
||||
Starred bool `json:"starred"`
|
||||
}
|
||||
|
||||
// EntryModificationRequest represents a request to modify an entry.
|
||||
type EntryModificationRequest struct {
|
||||
Title *string `json:"title"`
|
||||
Content *string `json:"content"`
|
||||
}
|
||||
|
||||
// Entries represents a list of entries.
|
||||
@@ -244,20 +254,24 @@ const (
|
||||
|
||||
// Filter is used to filter entries.
|
||||
type Filter struct {
|
||||
Status string
|
||||
Offset int
|
||||
Limit int
|
||||
Order string
|
||||
Direction string
|
||||
Starred string
|
||||
Before int64
|
||||
After int64
|
||||
BeforeEntryID int64
|
||||
AfterEntryID int64
|
||||
Search string
|
||||
CategoryID int64
|
||||
FeedID int64
|
||||
Statuses []string
|
||||
Status string
|
||||
Offset int
|
||||
Limit int
|
||||
Order string
|
||||
Direction string
|
||||
Starred string
|
||||
Before int64
|
||||
After int64
|
||||
PublishedBefore int64
|
||||
PublishedAfter int64
|
||||
ChangedBefore int64
|
||||
ChangedAfter int64
|
||||
BeforeEntryID int64
|
||||
AfterEntryID int64
|
||||
Search string
|
||||
CategoryID int64
|
||||
FeedID int64
|
||||
Statuses []string
|
||||
}
|
||||
|
||||
// EntryResultSet represents the response when fetching entries.
|
||||
@@ -265,3 +279,14 @@ type EntryResultSet struct {
|
||||
Total int `json:"total"`
|
||||
Entries Entries `json:"entries"`
|
||||
}
|
||||
|
||||
// VersionResponse represents the version and the build information of the Miniflux instance.
|
||||
type VersionResponse struct {
|
||||
Version string `json:"version"`
|
||||
Commit string `json:"commit"`
|
||||
BuildDate string `json:"build_date"`
|
||||
GoVersion string `json:"go_version"`
|
||||
Compiler string `json:"compiler"`
|
||||
Arch string `json:"arch"`
|
||||
OS string `json:"os"`
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,8 +1,7 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package client // import "miniflux.app/client"
|
||||
package client // import "miniflux.app/v2/client"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package config // import "miniflux.app/config"
|
||||
|
||||
// Opts holds parsed configuration options.
|
||||
var Opts *Options
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2019 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package config handles configuration management for the application.
|
||||
*/
|
||||
package config // import "miniflux.app/config"
|
||||
@@ -0,0 +1,6 @@
|
||||
This folder contains Miniflux API collection for [Bruno](https://www.usebruno.com).
|
||||
|
||||
Bruno is a lightweight alternative to Postman/Insomnia.
|
||||
|
||||
- https://www.usebruno.com
|
||||
- https://github.com/usebruno/bruno
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Bookmark an entry
|
||||
type: http
|
||||
seq: 37
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/entries/{{entryID}}/bookmark
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
entryID: 1698
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Create a feed
|
||||
type: http
|
||||
seq: 19
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/feeds
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Create a new category
|
||||
type: http
|
||||
seq: 10
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/categories
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
meta {
|
||||
name: Create a new user
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/users
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"username": "foobar",
|
||||
"password": "secret123"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Delete a category
|
||||
type: http
|
||||
seq: 12
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 1
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Delete a feed
|
||||
type: http
|
||||
seq: 26
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 18
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Delete a user
|
||||
type: http
|
||||
seq: 7
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{minifluxBaseURL}}/v1/users/{{userID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"language": "fr_FR"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
userID: 2
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Discover feeds
|
||||
type: http
|
||||
seq: 18
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/discover
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"url": "https://miniflux.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Fetch entry website content
|
||||
type: http
|
||||
seq: 39
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/entries/{{entryID}}/fetch-content
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
entryID: 1698
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Flush history
|
||||
type: http
|
||||
seq: 40
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/flush-history
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"url": "https://miniflux.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get a single entry
|
||||
type: http
|
||||
seq: 36
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/entries/{{entryID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
entryID: 1698
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: Get a single feed entry
|
||||
type: http
|
||||
seq: 33
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}/entries/{{entryID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
entryID: 1698
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get a single feed
|
||||
type: http
|
||||
seq: 24
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 18
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
meta {
|
||||
name: Get a single user by ID
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/users/{{userID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
userID: 1
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
meta {
|
||||
name: Get a single user by username
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/users/{{username}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
username: admin
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Get all categories
|
||||
type: http
|
||||
seq: 9
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/categories
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get all entries
|
||||
type: http
|
||||
seq: 34
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/entries
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get all feeds
|
||||
type: http
|
||||
seq: 20
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Get all users
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/users
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get category entries
|
||||
type: http
|
||||
seq: 16
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}/entries
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 2
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: Get category entry
|
||||
type: http
|
||||
seq: 17
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}/entries/{{entryID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 2
|
||||
entryID: 1
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get category feeds
|
||||
type: http
|
||||
seq: 14
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}/feeds
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 2
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Get current user
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/me
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get feed counters
|
||||
type: http
|
||||
seq: 21
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/counters
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get feed entries
|
||||
type: http
|
||||
seq: 32
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}/entries
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get feed icon by feed ID
|
||||
type: http
|
||||
seq: 27
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}/icon
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Get feed icon by icon ID
|
||||
type: http
|
||||
seq: 28
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/icons/{{iconID}}
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
iconID: 11
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Get version and build information
|
||||
type: http
|
||||
seq: 42
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/version
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Mark all category entries as read
|
||||
type: http
|
||||
seq: 13
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}/mark-all-as-read
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 2
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Mark all user entries as read
|
||||
type: http
|
||||
seq: 8
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/users/{{userID}}/mark-all-as-read
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
userID: 1
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Mark feed as read
|
||||
type: http
|
||||
seq: 29
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}/mark-all-as-read
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: OPML Export
|
||||
type: http
|
||||
seq: 30
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{minifluxBaseURL}}/v1/export
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
meta {
|
||||
name: OPML Import
|
||||
type: http
|
||||
seq: 31
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/import
|
||||
body: xml
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
body:xml {
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<opml version="2.0">
|
||||
<head>
|
||||
<title>Miniflux</title>
|
||||
</head>
|
||||
<body>
|
||||
<outline text="My category">
|
||||
<outline title="Miniflux" text="Miniflux" xmlUrl="https://miniflux.app/feed.xml" htmlUrl="https://miniflux.app"></outline>
|
||||
</outline>
|
||||
</body>
|
||||
</opml>
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 19
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Refresh a single feed
|
||||
type: http
|
||||
seq: 23
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}/refresh
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 18
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Refresh all feeds
|
||||
type: http
|
||||
seq: 22
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/refresh
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Refresh category feeds
|
||||
type: http
|
||||
seq: 15
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}/refresh
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 2
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Save an entry
|
||||
type: http
|
||||
seq: 38
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{minifluxBaseURL}}/v1/entries/{{entryID}}/save
|
||||
body: none
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"feed_url": "https://miniflux.app/feed.xml"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
entryID: 1698
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Update a category
|
||||
type: http
|
||||
seq: 11
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/categories/{{categoryID}}
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Test Update"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
categoryID: 1
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Update a feed
|
||||
type: http
|
||||
seq: 25
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/feeds/{{feedID}}
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"user_agent": "My user agent"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
feedID: 18
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Update a user
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/users/{{userID}}
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"language": "fr_FR"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
userID: 1
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
meta {
|
||||
name: Update entries status
|
||||
type: http
|
||||
seq: 35
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/entries
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"entry_ids": [1698, 1699],
|
||||
"status": "read"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: Update entry
|
||||
type: http
|
||||
seq: 41
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{minifluxBaseURL}}/v1/entries/{{entryID}}
|
||||
body: json
|
||||
auth: basic
|
||||
}
|
||||
|
||||
auth:basic {
|
||||
username: {{minifluxUsername}}
|
||||
password: {{minifluxPassword}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "New title",
|
||||
"content": "Some text"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
entryID: 1789
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "Miniflux",
|
||||
"type": "collection"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
vars {
|
||||
minifluxBaseURL: http://127.0.0.1:8080
|
||||
minifluxUsername: admin
|
||||
}
|
||||
vars:secret [
|
||||
minifluxPassword
|
||||
]
|
||||
@@ -24,6 +24,7 @@ services:
|
||||
environment:
|
||||
- POSTGRES_USER=miniflux
|
||||
- POSTGRES_PASSWORD=secret
|
||||
- POSTGRES_DB=miniflux
|
||||
volumes:
|
||||
- miniflux-db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Miniflux API Collection for Thunder Client VS Code Extension
|
||||
============================================================
|
||||
|
||||
Official website: https://www.thunderclient.com
|
||||
|
||||
This folder contains the API endpoints collection for Miniflux. You can import it locally to interact with the Miniflux API.
|
||||
@@ -0,0 +1,769 @@
|
||||
{
|
||||
"client": "Thunder Client",
|
||||
"collectionName": "Miniflux v2",
|
||||
"dateExported": "2023-07-31T01:53:38.743Z",
|
||||
"version": "1.1",
|
||||
"folders": [],
|
||||
"requests": [
|
||||
{
|
||||
"_id": "d23fb9ba-c0c1-46ff-93f4-c5ed24ecd56e",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Discover Subscriptions",
|
||||
"url": "/v1/discover",
|
||||
"method": "POST",
|
||||
"sortNum": 20000,
|
||||
"created": "2023-07-31T01:20:12.275Z",
|
||||
"modified": "2023-07-31T01:29:39.751Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "\n{\n \"url\": \"https://miniflux.app/\"\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "29cfc679-31d4-4d8c-b843-ab92a74dfa85",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Feeds",
|
||||
"url": "/v1/feeds",
|
||||
"method": "GET",
|
||||
"sortNum": 50000,
|
||||
"created": "2023-07-31T01:20:12.276Z",
|
||||
"modified": "2023-07-31T01:20:12.276Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "52a88df8-41c7-47c2-a635-8c93d7d29f40",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Category Feeds",
|
||||
"url": "/v1/categories/1/feeds",
|
||||
"method": "GET",
|
||||
"sortNum": 60000,
|
||||
"created": "2023-07-31T01:20:12.277Z",
|
||||
"modified": "2023-07-31T01:20:12.277Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "a5c2cb48-a4cf-4edc-a0e0-927d9f711843",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Feed",
|
||||
"url": "/v1/feeds/{feedID}",
|
||||
"method": "GET",
|
||||
"sortNum": 70000,
|
||||
"created": "2023-07-31T01:20:12.279Z",
|
||||
"modified": "2023-07-31T01:31:11.478Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "fb55b058-c2ba-4785-be92-a98f0596e86e",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Feed Icon ",
|
||||
"url": "/v1/feeds/{feedID}/icon",
|
||||
"method": "GET",
|
||||
"sortNum": 80000,
|
||||
"created": "2023-07-31T01:20:12.280Z",
|
||||
"modified": "2023-07-31T01:31:18.174Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "c0ec9a45-263e-4627-a13b-b5df901a6456",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Create Feed ",
|
||||
"url": "/v1/feeds",
|
||||
"method": "POST",
|
||||
"sortNum": 90000,
|
||||
"created": "2023-07-31T01:20:12.281Z",
|
||||
"modified": "2023-07-31T01:31:31.415Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"feed_url\": \"https://miniflux.app/feed.xml\",\n \"category_id\": 1\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "f4c078a2-c031-4753-a7a4-4987439a61d0",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Update Feed",
|
||||
"url": "/v1/feeds/{feedID}",
|
||||
"method": "PUT",
|
||||
"sortNum": 100000,
|
||||
"created": "2023-07-31T01:20:12.282Z",
|
||||
"modified": "2023-07-31T01:31:48.115Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"title\": \"Updated - New Feed Title\",\n \"category_id\": 1\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "1e47aeab-09ce-439b-907f-f9347b98b160",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Refresh Feed",
|
||||
"url": "/v1/feeds/{feedID}/refresh",
|
||||
"method": "PUT",
|
||||
"sortNum": 110000,
|
||||
"created": "2023-07-31T01:20:12.283Z",
|
||||
"modified": "2023-07-31T01:31:58.778Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "4f643fa6-042d-4e95-8194-4cb0af7102bf",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Refresh All Feeds",
|
||||
"url": "/v1/feeds/refresh",
|
||||
"method": "PUT",
|
||||
"sortNum": 115000,
|
||||
"created": "2023-07-31T01:20:12.312Z",
|
||||
"modified": "2023-07-31T01:20:12.312Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "d829f651-e9b9-41f9-aa9e-bd830d5e6389",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Remove Feed",
|
||||
"url": "/v1/feeds/{feedID}",
|
||||
"method": "DELETE",
|
||||
"sortNum": 120000,
|
||||
"created": "2023-07-31T01:20:12.284Z",
|
||||
"modified": "2023-07-31T01:32:16.723Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "deafbf1a-d9e0-420f-a749-1bdde56772cb",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Feed Entries",
|
||||
"url": "/v1/feeds/{feedID}/entries",
|
||||
"method": "GET",
|
||||
"sortNum": 130000,
|
||||
"created": "2023-07-31T01:20:12.285Z",
|
||||
"modified": "2023-07-31T01:32:52.812Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "2",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "0052e903-75fc-48ec-8fd5-6e8784ed401a",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Entry",
|
||||
"url": "/v1/entries/{entryID}",
|
||||
"method": "GET",
|
||||
"sortNum": 140000,
|
||||
"created": "2023-07-31T01:20:12.286Z",
|
||||
"modified": "2023-07-31T01:33:30.417Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "entryID",
|
||||
"value": "19",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "1a055ace-2629-4298-9ea0-1bd17d59a4d6",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Fetch original article",
|
||||
"url": "/v1/entries/{entryID}/fetch-content",
|
||||
"method": "GET",
|
||||
"sortNum": 150000,
|
||||
"created": "2023-07-31T01:20:12.287Z",
|
||||
"modified": "2023-07-31T01:33:41.014Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "entryID",
|
||||
"value": "19",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "f272d1e6-ebbb-4c58-a159-4412ad657136",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Category Entries",
|
||||
"url": "/v1/categories/{categoryID}/entries",
|
||||
"method": "GET",
|
||||
"sortNum": 160000,
|
||||
"created": "2023-07-31T01:20:12.288Z",
|
||||
"modified": "2023-07-31T01:20:12.288Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "856ed091-318a-4a76-b7ce-6475106dd6b5",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Mark All Feed Entries as Read",
|
||||
"url": "/v1/feeds/{feedID}/mark-all-as-read",
|
||||
"method": "PUT",
|
||||
"sortNum": 180000,
|
||||
"created": "2023-07-31T01:20:12.290Z",
|
||||
"modified": "2023-07-31T01:46:57.443Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "feedID",
|
||||
"value": "2",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "67749962-d646-45d5-8b78-a8eeaa7cb971",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Entries",
|
||||
"url": "/v1/entries",
|
||||
"method": "GET",
|
||||
"sortNum": 190000,
|
||||
"created": "2023-07-31T01:20:12.291Z",
|
||||
"modified": "2023-07-31T01:20:12.291Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "b55ae165-2abe-41f0-8b8a-14d826238d20",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Change Entries Status",
|
||||
"url": "/v1/entries",
|
||||
"method": "PUT",
|
||||
"sortNum": 200000,
|
||||
"created": "2023-07-31T01:20:12.292Z",
|
||||
"modified": "2023-07-31T01:46:46.133Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"entry_ids\": [19, 20],\n \"status\": \"read\"\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "710dfc55-fc4e-48ab-989e-3ed78019d6c3",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Toggle Entry Bookmark",
|
||||
"url": "/v1/entries/{entryID}/bookmark",
|
||||
"method": "PUT",
|
||||
"sortNum": 210000,
|
||||
"created": "2023-07-31T01:20:12.293Z",
|
||||
"modified": "2023-07-31T01:45:51.933Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "entryID",
|
||||
"value": "19",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "19edbe55-0a0a-4102-bde0-73ed6d8515f6",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Save Entry to Third-Party Service",
|
||||
"url": "/v1/entries/{entryID}/save",
|
||||
"method": "POST",
|
||||
"sortNum": 215000,
|
||||
"created": "2023-07-31T01:20:12.313Z",
|
||||
"modified": "2023-07-31T01:20:12.313Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "entryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "13d2cf52-aa08-4f7f-a83d-ffcb1e1190cd",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Categories",
|
||||
"url": "/v1/categories",
|
||||
"method": "GET",
|
||||
"sortNum": 220000,
|
||||
"created": "2023-07-31T01:20:12.294Z",
|
||||
"modified": "2023-07-31T01:20:12.294Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "1547dabe-2bcb-4e06-acaa-fb393d1027e2",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Create Category ",
|
||||
"url": "/v1/categories",
|
||||
"method": "POST",
|
||||
"sortNum": 230000,
|
||||
"created": "2023-07-31T01:20:12.295Z",
|
||||
"modified": "2023-07-31T01:20:12.295Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"title\": \"My category\"\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "e8dac503-19dc-434d-832f-eac4364785d8",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Update Category",
|
||||
"url": "/v1/categories/{categoryID}",
|
||||
"method": "PUT",
|
||||
"sortNum": 232500,
|
||||
"created": "2023-07-31T01:20:12.296Z",
|
||||
"modified": "2023-07-31T01:42:55.831Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "3",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "\n{\n \"title\": \"My new title\"\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "86d74247-7f12-4a6e-91b3-fad9e7b6b1fb",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Delete Category",
|
||||
"url": "/v1/categories/{categoryID}",
|
||||
"method": "DELETE",
|
||||
"sortNum": 235000,
|
||||
"created": "2023-07-31T01:20:12.298Z",
|
||||
"modified": "2023-07-31T01:44:21.486Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "3",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "668dde80-ed03-4fa6-ad2a-9cacd0ec31eb",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Mark Category Entries as Read",
|
||||
"url": "/v1/categories/{categoryID}/mark-all-as-read",
|
||||
"method": "PUT",
|
||||
"sortNum": 237500,
|
||||
"created": "2023-07-31T01:20:12.299Z",
|
||||
"modified": "2023-07-31T01:43:50.637Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "39ada469-765e-4584-ab00-9d263bd526a1",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Category Feeds",
|
||||
"url": "/v1/categories/{categoryID}/feeds",
|
||||
"method": "GET",
|
||||
"sortNum": 243750,
|
||||
"created": "2023-07-31T01:50:23.959Z",
|
||||
"modified": "2023-07-31T01:50:51.443Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "ec389c41-185f-4b57-a373-c6ff952b4282",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Refresh Category Feeds",
|
||||
"url": "/v1/categories/{categoryID}/refresh",
|
||||
"method": "PUT",
|
||||
"sortNum": 250000,
|
||||
"created": "2023-07-31T01:20:12.297Z",
|
||||
"modified": "2023-07-31T01:43:23.102Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "bc4a7578-c95e-4436-bbfa-61ccc4a8fc71",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Category Entries",
|
||||
"url": "/v1/categories/{categoryID}/entries",
|
||||
"method": "GET",
|
||||
"sortNum": 257500,
|
||||
"created": "2023-07-31T01:51:15.403Z",
|
||||
"modified": "2023-07-31T01:51:35.106Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "fa935fb3-3ed6-4ee3-b995-6c054766d109",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Category Entry",
|
||||
"url": "/v1/categories/{categoryID}/entries/{entryID}",
|
||||
"method": "GET",
|
||||
"sortNum": 258750,
|
||||
"created": "2023-07-31T01:51:46.699Z",
|
||||
"modified": "2023-07-31T01:52:12.155Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "categoryID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
},
|
||||
{
|
||||
"name": "entryID",
|
||||
"value": "19",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "cb6968e9-8d13-4410-9ad5-85847b73d7eb",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "OPML Export",
|
||||
"url": "/v1/export",
|
||||
"method": "GET",
|
||||
"sortNum": 280000,
|
||||
"created": "2023-07-31T01:20:12.300Z",
|
||||
"modified": "2023-07-31T01:20:12.300Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "169a64e1-08dd-4760-b405-a748a5286b38",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "OPML Import",
|
||||
"url": "/v1/import",
|
||||
"method": "POST",
|
||||
"sortNum": 290000,
|
||||
"created": "2023-07-31T01:20:12.301Z",
|
||||
"modified": "2023-07-31T01:41:31.218Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "xml",
|
||||
"raw": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<opml version=\"2.0\">\n <head>\n <title>Miniflux</title>\n <dateCreated>Sun, 30 Jul 2023 18:41:08 PDT</dateCreated>\n </head>\n <body>\n <outline text=\"All\">\n <outline title=\"Miniflux\" text=\"Miniflux\" xmlUrl=\"https://miniflux.app/feed.xml\" htmlUrl=\"https://miniflux.app\"></outline>\n </outline>\n </body>\n</opml>",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "bfb7264a-7b46-49fe-b451-fb6d9b03f0b2",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Create User",
|
||||
"url": "/v1/users",
|
||||
"method": "POST",
|
||||
"sortNum": 300000,
|
||||
"created": "2023-07-31T01:20:12.302Z",
|
||||
"modified": "2023-07-31T01:20:12.302Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"username\": \"bob\",\n \"password\": \"test123\",\n \"is_admin\": false\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "93c1dcc2-bf09-4e8e-86ba-0c042147a48f",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Update User",
|
||||
"url": "/v1/users/{userID}",
|
||||
"method": "PUT",
|
||||
"sortNum": 310000,
|
||||
"created": "2023-07-31T01:20:12.303Z",
|
||||
"modified": "2023-07-31T01:40:09.576Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "userID",
|
||||
"value": "2",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\n \"username\": \"joe\"\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "19cf34c1-eb0a-4442-a682-2e94c4f5e594",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Current User",
|
||||
"url": "/v1/me",
|
||||
"method": "GET",
|
||||
"sortNum": 320000,
|
||||
"created": "2023-07-31T01:20:12.304Z",
|
||||
"modified": "2023-07-31T01:20:12.304Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "4a700f7c-8762-4cab-aab1-2d8066884d69",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get User by ID",
|
||||
"url": "/v1/users/{userID}",
|
||||
"method": "GET",
|
||||
"sortNum": 330000,
|
||||
"created": "2023-07-31T01:20:12.305Z",
|
||||
"modified": "2023-07-31T01:39:38.472Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "userID",
|
||||
"value": "1",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "66cb0985-5ed4-4b1e-9029-8605b7f5f74e",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get User by username",
|
||||
"url": "/v1/users/{username}",
|
||||
"method": "GET",
|
||||
"sortNum": 335000,
|
||||
"created": "2023-07-31T01:47:53.649Z",
|
||||
"modified": "2023-07-31T01:48:10.655Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "username",
|
||||
"value": "admin",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "3d4b227a-83a2-4d87-a0ed-ce9d5497aea6",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Get Users",
|
||||
"url": "/v1/users",
|
||||
"method": "GET",
|
||||
"sortNum": 340000,
|
||||
"created": "2023-07-31T01:20:12.306Z",
|
||||
"modified": "2023-07-31T01:20:12.306Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "90138dea-799a-4b44-ad68-fce6ec5898a6",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Delete User",
|
||||
"url": "/v1/users/{userID}",
|
||||
"method": "DELETE",
|
||||
"sortNum": 350000,
|
||||
"created": "2023-07-31T01:20:12.307Z",
|
||||
"modified": "2023-07-31T01:40:38.124Z",
|
||||
"headers": [],
|
||||
"params": [
|
||||
{
|
||||
"name": "userID",
|
||||
"value": "2",
|
||||
"isPath": true
|
||||
}
|
||||
],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "4b3bf7ca-bc55-423b-a3ee-6279c10a0d85",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Fetch Read/Unread Counters",
|
||||
"url": "/v1/feeds/counters",
|
||||
"method": "GET",
|
||||
"sortNum": 370000,
|
||||
"created": "2023-07-31T01:20:12.309Z",
|
||||
"modified": "2023-07-31T01:20:12.309Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "7721682f-31e3-4d71-8df9-02e30e4729d7",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Healthcheck",
|
||||
"url": "/healthcheck",
|
||||
"method": "GET",
|
||||
"sortNum": 380000,
|
||||
"created": "2023-07-31T01:20:12.310Z",
|
||||
"modified": "2023-07-31T01:20:12.310Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "64410254-b17a-43e4-984d-10b9b13c5818",
|
||||
"colId": "fc35618a-f39f-40a0-a443-d4ae568baa8e",
|
||||
"containerId": "",
|
||||
"name": "Version",
|
||||
"url": "/version",
|
||||
"method": "GET",
|
||||
"sortNum": 390000,
|
||||
"created": "2023-07-31T01:20:12.311Z",
|
||||
"modified": "2023-07-31T01:20:12.311Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"tests": []
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"auth": {
|
||||
"type": "basic",
|
||||
"basic": {
|
||||
"username": "admin",
|
||||
"password": "test123"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"baseUrl": "http://localhost:8080"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package crypto implements helpers related to cryptography.
|
||||
*/
|
||||
package crypto // import "miniflux.app/crypto"
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Miniflux is a feed reader application.
|
||||
*/
|
||||
package main // import "miniflux.app"
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package errors handles localized errors.
|
||||
*/
|
||||
package errors // import "miniflux.app/errors"
|
||||
@@ -1,32 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package errors // import "miniflux.app/errors"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"miniflux.app/locale"
|
||||
)
|
||||
|
||||
// LocalizedError represents an error than could be translated to another language.
|
||||
type LocalizedError struct {
|
||||
message string
|
||||
args []interface{}
|
||||
}
|
||||
|
||||
// Error returns untranslated error message.
|
||||
func (l LocalizedError) Error() string {
|
||||
return fmt.Sprintf(l.message, l.args...)
|
||||
}
|
||||
|
||||
// Localize returns the translated error message.
|
||||
func (l LocalizedError) Localize(printer *locale.Printer) string {
|
||||
return printer.Printf(l.message, l.args...)
|
||||
}
|
||||
|
||||
// NewLocalizedError returns a new LocalizedError.
|
||||
func NewLocalizedError(message string, args ...interface{}) *LocalizedError {
|
||||
return &LocalizedError{message: message, args: args}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package fever implements Fever API endpoints.
|
||||
*/
|
||||
package fever // import "miniflux.app/fever"
|
||||
@@ -1,59 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package fever // import "miniflux.app/fever"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/json"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/storage"
|
||||
)
|
||||
|
||||
type middleware struct {
|
||||
store *storage.Storage
|
||||
}
|
||||
|
||||
func newMiddleware(s *storage.Storage) *middleware {
|
||||
return &middleware{s}
|
||||
}
|
||||
|
||||
func (m *middleware) serve(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
clientIP := request.ClientIP(r)
|
||||
apiKey := r.FormValue("api_key")
|
||||
if apiKey == "" {
|
||||
logger.Info("[Fever] [ClientIP=%s] No API key provided", clientIP)
|
||||
json.OK(w, r, newAuthFailureResponse())
|
||||
return
|
||||
}
|
||||
|
||||
user, err := m.store.UserByFeverToken(apiKey)
|
||||
if err != nil {
|
||||
logger.Error("[Fever] %v", err)
|
||||
json.OK(w, r, newAuthFailureResponse())
|
||||
return
|
||||
}
|
||||
|
||||
if user == nil {
|
||||
logger.Info("[Fever] [ClientIP=%s] No user found with this API key", clientIP)
|
||||
json.OK(w, r, newAuthFailureResponse())
|
||||
return
|
||||
}
|
||||
|
||||
logger.Info("[Fever] [ClientIP=%s] User #%d is authenticated with user agent %q", clientIP, user.ID, r.UserAgent())
|
||||
m.store.SetLastLogin(user.ID)
|
||||
|
||||
ctx := r.Context()
|
||||
ctx = context.WithValue(ctx, request.UserIDContextKey, user.ID)
|
||||
ctx = context.WithValue(ctx, request.UserTimezoneContextKey, user.Timezone)
|
||||
ctx = context.WithValue(ctx, request.IsAdminUserContextKey, user.IsAdmin)
|
||||
ctx = context.WithValue(ctx, request.IsAuthenticatedContextKey, true)
|
||||
|
||||
next.ServeHTTP(w, r.WithContext(ctx))
|
||||
})
|
||||
}
|
||||
@@ -1,42 +1,48 @@
|
||||
module miniflux.app
|
||||
module miniflux.app/v2
|
||||
|
||||
// +heroku goVersion go1.19
|
||||
// +heroku goVersion go1.22
|
||||
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible
|
||||
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/PuerkitoBio/goquery v1.9.1
|
||||
github.com/abadojack/whatlanggo v1.0.1
|
||||
github.com/coreos/go-oidc/v3 v3.9.0
|
||||
github.com/go-webauthn/webauthn v0.10.1
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/lib/pq v1.10.9
|
||||
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530
|
||||
github.com/prometheus/client_golang v1.15.1
|
||||
github.com/rylans/getlang v0.0.0-20201227074721-9e7f44ff8aa0
|
||||
github.com/tdewolff/minify/v2 v2.12.5
|
||||
github.com/yuin/goldmark v1.5.4
|
||||
golang.org/x/crypto v0.8.0
|
||||
golang.org/x/net v0.9.0
|
||||
golang.org/x/oauth2 v0.7.0
|
||||
golang.org/x/term v0.8.0
|
||||
github.com/prometheus/client_golang v1.19.0
|
||||
github.com/tdewolff/minify/v2 v2.20.18
|
||||
github.com/yuin/goldmark v1.7.0
|
||||
golang.org/x/crypto v0.21.0
|
||||
golang.org/x/net v0.22.0
|
||||
golang.org/x/oauth2 v0.18.0
|
||||
golang.org/x/term v0.18.0
|
||||
mvdan.cc/xurls/v2 v2.5.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/pquerna/cachecontrol v0.1.0 // indirect
|
||||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/tdewolff/parse/v2 v2.6.5 // indirect
|
||||
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
|
||||
github.com/go-webauthn/x v0.1.8 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
|
||||
github.com/google/go-tpm v0.9.0 // indirect
|
||||
)
|
||||
|
||||
go 1.19
|
||||
require (
|
||||
github.com/andybalholm/cascadia v1.3.2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
|
||||
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/prometheus/client_model v0.5.0 // indirect
|
||||
github.com/prometheus/common v0.48.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/tdewolff/parse/v2 v2.7.12 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/protobuf v1.32.0 // indirect
|
||||
)
|
||||
|
||||
go 1.22
|
||||
|
||||
@@ -1,123 +1,134 @@
|
||||
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
|
||||
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
|
||||
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
|
||||
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
|
||||
github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI=
|
||||
github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY=
|
||||
github.com/abadojack/whatlanggo v1.0.1 h1:19N6YogDnf71CTHm3Mp2qhYfkRdyvbgwWdd2EPxJRG4=
|
||||
github.com/abadojack/whatlanggo v1.0.1/go.mod h1:66WiQbSbJBIlOZMsvbKe5m6pzQovxCH9B/K8tQB2uoc=
|
||||
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
|
||||
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-oidc/v3 v3.9.0 h1:0J/ogVOd4y8P0f0xUh8l9t07xRP/d8tccvjHl2dcsSo=
|
||||
github.com/coreos/go-oidc/v3 v3.9.0/go.mod h1:rTKz2PYwftcrtoCzV5g5kvfJoWcm0Mk8AF8y1iAQro4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU=
|
||||
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
|
||||
github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
|
||||
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
|
||||
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
|
||||
github.com/go-webauthn/webauthn v0.10.1 h1:+RFKj4yHPy282teiiy5sqTYPfRilzBpJyedrz9KsNFE=
|
||||
github.com/go-webauthn/webauthn v0.10.1/go.mod h1:a7BwAtrSMkeuJXtIKz433Av99nAv01pdfzB0a9xkDnI=
|
||||
github.com/go-webauthn/x v0.1.8 h1:f1C6k1AyUlDvnIzWSW+G9rN9nbp1hhLXZagUtyxZ8nc=
|
||||
github.com/go-webauthn/x v0.1.8/go.mod h1:i8UNlGVt3oy6oAFcP4SZB1djZLx/4pbekCbWowjTaJg=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk=
|
||||
github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 h1:kHKxCOLcHH8r4Fzarl4+Y3K5hjothkVW5z7T1dUM11U=
|
||||
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
|
||||
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc=
|
||||
github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI=
|
||||
github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI=
|
||||
github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
|
||||
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
|
||||
github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
|
||||
github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
|
||||
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
|
||||
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
|
||||
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
|
||||
github.com/rylans/getlang v0.0.0-20201227074721-9e7f44ff8aa0 h1:qSaU9YAEIxk/ozcmY1hiauktAYTpbwYIrPdQ0L2E8UM=
|
||||
github.com/rylans/getlang v0.0.0-20201227074721-9e7f44ff8aa0/go.mod h1:3vfmZI6aJd5Rb9W2TQ0Nmupl+qem21R05+hmCscI0Bk=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
|
||||
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
|
||||
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
|
||||
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
|
||||
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
||||
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/tdewolff/minify/v2 v2.12.5 h1:s2KDBt/D/3ayE3gcqQF8VIgTmYgkx+btuLvVAeePzZM=
|
||||
github.com/tdewolff/minify/v2 v2.12.5/go.mod h1:i8QXtVyL7Ddwc4I5gqzvgBqKlTMgMNTbiXaPO4Iqg+A=
|
||||
github.com/tdewolff/parse/v2 v2.6.5 h1:lYvWBk55GkqKl0JJenGpmrgu/cPHQQ6/Mm1hBGswoGQ=
|
||||
github.com/tdewolff/parse/v2 v2.6.5/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs=
|
||||
github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM=
|
||||
github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
|
||||
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
|
||||
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/tdewolff/minify/v2 v2.20.18 h1:y+s6OzlZwFqApgNXWNtaMuEMEPbHT72zrCyb9Az35Xo=
|
||||
github.com/tdewolff/minify/v2 v2.20.18/go.mod h1:ulkFoeAVWMLEyjuDz1ZIWOA31g5aWOawCFRp9R/MudM=
|
||||
github.com/tdewolff/parse/v2 v2.7.12 h1:tgavkHc2ZDEQVKy1oWxwIyh5bP4F5fEh/JmBwPP/3LQ=
|
||||
github.com/tdewolff/parse/v2 v2.7.12/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
|
||||
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
|
||||
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
|
||||
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
|
||||
github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
|
||||
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
|
||||
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||
golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
|
||||
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
|
||||
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
|
||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI=
|
||||
gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
|
||||
mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE=
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2022 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package googlereader implements Google Reader API endpoints.
|
||||
*/
|
||||
package googlereader // import "miniflux.app/googlereader"
|
||||
@@ -1,208 +0,0 @@
|
||||
// Copyright 2022 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package googlereader // import "miniflux.app/googlereader"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response"
|
||||
"miniflux.app/http/response/json"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/model"
|
||||
"miniflux.app/storage"
|
||||
)
|
||||
|
||||
type middleware struct {
|
||||
store *storage.Storage
|
||||
}
|
||||
|
||||
func newMiddleware(s *storage.Storage) *middleware {
|
||||
return &middleware{s}
|
||||
}
|
||||
|
||||
func (m *middleware) clientLogin(w http.ResponseWriter, r *http.Request) {
|
||||
clientIP := request.ClientIP(r)
|
||||
var username, password, output string
|
||||
var integration *model.Integration
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
logger.Error("[GoogleReader][Login] [ClientIP=%s] Could not parse form", clientIP)
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
username = r.Form.Get("Email")
|
||||
password = r.Form.Get("Passwd")
|
||||
output = r.Form.Get("output")
|
||||
|
||||
if username == "" || password == "" {
|
||||
logger.Error("[GoogleReader][Login] [ClientIP=%s] Empty username or password", clientIP)
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
if err = m.store.GoogleReaderUserCheckPassword(username, password); err != nil {
|
||||
logger.Error("[GoogleReader][Login] [ClientIP=%s] Invalid username or password: %s", clientIP, username)
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
logger.Info("[GoogleReader][Login] [ClientIP=%s] User authenticated: %s", clientIP, username)
|
||||
|
||||
if integration, err = m.store.GoogleReaderUserGetIntegration(username); err != nil {
|
||||
logger.Error("[GoogleReader][Login] [ClientIP=%s] Could not load integration: %s", clientIP, username)
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
m.store.SetLastLogin(integration.UserID)
|
||||
|
||||
token := getAuthToken(integration.GoogleReaderUsername, integration.GoogleReaderPassword)
|
||||
logger.Info("[GoogleReader][Login] [ClientIP=%s] Created token: %s", clientIP, token)
|
||||
result := login{SID: token, LSID: token, Auth: token}
|
||||
if output == "json" {
|
||||
json.OK(w, r, result)
|
||||
return
|
||||
}
|
||||
builder := response.New(w, r)
|
||||
builder.WithHeader("Content-Type", "text/plain; charset=UTF-8")
|
||||
builder.WithBody(result.String())
|
||||
builder.Write()
|
||||
}
|
||||
|
||||
func (m *middleware) token(w http.ResponseWriter, r *http.Request) {
|
||||
clientIP := request.ClientIP(r)
|
||||
|
||||
if !request.IsAuthenticated(r) {
|
||||
logger.Error("[GoogleReader][Token] [ClientIP=%s] User is not authenticated", clientIP)
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
token := request.GoolgeReaderToken(r)
|
||||
if token == "" {
|
||||
logger.Error("[GoogleReader][Token] [ClientIP=%s] User does not have token: %s", clientIP, request.UserID(r))
|
||||
json.Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
logger.Info("[GoogleReader][Token] [ClientIP=%s] token: %s", clientIP, token)
|
||||
w.Header().Add("Content-Type", "text/plain; charset=UTF-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte(token))
|
||||
}
|
||||
|
||||
func (m *middleware) handleCORS(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
||||
w.Header().Set("Access-Control-Allow-Headers", "Authorization")
|
||||
if r.Method == http.MethodOptions {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
||||
func (m *middleware) apiKeyAuth(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
clientIP := request.ClientIP(r)
|
||||
|
||||
var token string
|
||||
if r.Method == http.MethodPost {
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
logger.Error("[GoogleReader][Login] [ClientIP=%s] Could not parse form", clientIP)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
token = r.Form.Get("T")
|
||||
if token == "" {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Post-Form T field is empty", clientIP)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
authorization := r.Header.Get("Authorization")
|
||||
|
||||
if authorization == "" {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] No token provided", clientIP)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
fields := strings.Fields(authorization)
|
||||
if len(fields) != 2 {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Authorization header does not have the expected structure GoogleLogin auth=xxxxxx - '%s'", clientIP, authorization)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
if fields[0] != "GoogleLogin" {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Authorization header does not begin with GoogleLogin - '%s'", clientIP, authorization)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
auths := strings.Split(fields[1], "=")
|
||||
if len(auths) != 2 {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Authorization header does not have the expected structure GoogleLogin auth=xxxxxx - '%s'", clientIP, authorization)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
if auths[0] != "auth" {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Authorization header does not have the expected structure GoogleLogin auth=xxxxxx - '%s'", clientIP, authorization)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
token = auths[1]
|
||||
}
|
||||
|
||||
parts := strings.Split(token, "/")
|
||||
if len(parts) != 2 {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Auth token does not have the expected structure username/hash - '%s'", clientIP, token)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
var integration *model.Integration
|
||||
var user *model.User
|
||||
var err error
|
||||
if integration, err = m.store.GoogleReaderUserGetIntegration(parts[0]); err != nil {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] token: %s", clientIP, token)
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] No user found with the given google reader username: %s", clientIP, parts[0])
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
expectedToken := getAuthToken(integration.GoogleReaderUsername, integration.GoogleReaderPassword)
|
||||
if expectedToken != token {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] Token does not match: %s", clientIP, token)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
if user, err = m.store.UserByID(integration.UserID); err != nil {
|
||||
logger.Error("[GoogleReader][Auth] [ClientIP=%s] No user found with the userID: %d", clientIP, integration.UserID)
|
||||
Unauthorized(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
m.store.SetLastLogin(integration.UserID)
|
||||
|
||||
ctx := r.Context()
|
||||
ctx = context.WithValue(ctx, request.UserIDContextKey, user.ID)
|
||||
ctx = context.WithValue(ctx, request.UserTimezoneContextKey, user.Timezone)
|
||||
ctx = context.WithValue(ctx, request.IsAdminUserContextKey, user.IsAdmin)
|
||||
ctx = context.WithValue(ctx, request.IsAuthenticatedContextKey, true)
|
||||
ctx = context.WithValue(ctx, request.GoogleReaderToken, token)
|
||||
|
||||
next.ServeHTTP(w, r.WithContext(ctx))
|
||||
})
|
||||
}
|
||||
|
||||
func getAuthToken(username, password string) string {
|
||||
token := hex.EncodeToString(hmac.New(sha1.New, []byte(username+password)).Sum(nil))
|
||||
token = username + "/" + token
|
||||
return token
|
||||
}
|
||||
@@ -1,343 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package client // import "miniflux.app/http/client"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/errors"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/timer"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultHTTPClientTimeout = 20
|
||||
defaultHTTPClientMaxBodySize = 15 * 1024 * 1024
|
||||
)
|
||||
|
||||
var (
|
||||
errInvalidCertificate = "Invalid SSL certificate (original error: %q)"
|
||||
errNetworkOperation = "This website is unreachable (original error: %q)"
|
||||
errRequestTimeout = "Website unreachable, the request timed out after %d seconds"
|
||||
)
|
||||
|
||||
// Client builds and executes HTTP requests.
|
||||
type Client struct {
|
||||
inputURL string
|
||||
|
||||
requestEtagHeader string
|
||||
requestLastModifiedHeader string
|
||||
requestAuthorizationHeader string
|
||||
requestUsername string
|
||||
requestPassword string
|
||||
requestUserAgent string
|
||||
requestCookie string
|
||||
|
||||
useProxy bool
|
||||
doNotFollowRedirects bool
|
||||
|
||||
ClientTimeout int
|
||||
ClientMaxBodySize int64
|
||||
ClientProxyURL string
|
||||
AllowSelfSignedCertificates bool
|
||||
}
|
||||
|
||||
// New initializes a new HTTP client.
|
||||
func New(url string) *Client {
|
||||
return &Client{
|
||||
inputURL: url,
|
||||
ClientTimeout: defaultHTTPClientTimeout,
|
||||
ClientMaxBodySize: defaultHTTPClientMaxBodySize,
|
||||
}
|
||||
}
|
||||
|
||||
// NewClientWithConfig initializes a new HTTP client with application config options.
|
||||
func NewClientWithConfig(url string, opts *config.Options) *Client {
|
||||
return &Client{
|
||||
inputURL: url,
|
||||
requestUserAgent: opts.HTTPClientUserAgent(),
|
||||
ClientTimeout: opts.HTTPClientTimeout(),
|
||||
ClientMaxBodySize: opts.HTTPClientMaxBodySize(),
|
||||
ClientProxyURL: opts.HTTPClientProxy(),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) String() string {
|
||||
etagHeader := c.requestEtagHeader
|
||||
if c.requestEtagHeader == "" {
|
||||
etagHeader = "None"
|
||||
}
|
||||
|
||||
lastModifiedHeader := c.requestLastModifiedHeader
|
||||
if c.requestLastModifiedHeader == "" {
|
||||
lastModifiedHeader = "None"
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
`InputURL=%q ETag=%s LastMod=%s Auth=%v UserAgent=%q Verify=%v`,
|
||||
c.inputURL,
|
||||
etagHeader,
|
||||
lastModifiedHeader,
|
||||
c.requestAuthorizationHeader != "" || (c.requestUsername != "" && c.requestPassword != ""),
|
||||
c.requestUserAgent,
|
||||
!c.AllowSelfSignedCertificates,
|
||||
)
|
||||
}
|
||||
|
||||
// WithCredentials defines the username/password for HTTP Basic authentication.
|
||||
func (c *Client) WithCredentials(username, password string) *Client {
|
||||
if username != "" && password != "" {
|
||||
c.requestUsername = username
|
||||
c.requestPassword = password
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
// WithAuthorization defines the authorization HTTP header value.
|
||||
func (c *Client) WithAuthorization(authorization string) *Client {
|
||||
c.requestAuthorizationHeader = authorization
|
||||
return c
|
||||
}
|
||||
|
||||
// WithCacheHeaders defines caching headers.
|
||||
func (c *Client) WithCacheHeaders(etagHeader, lastModifiedHeader string) *Client {
|
||||
c.requestEtagHeader = etagHeader
|
||||
c.requestLastModifiedHeader = lastModifiedHeader
|
||||
return c
|
||||
}
|
||||
|
||||
// WithProxy enables proxy for the current HTTP request.
|
||||
func (c *Client) WithProxy() *Client {
|
||||
c.useProxy = true
|
||||
return c
|
||||
}
|
||||
|
||||
// WithoutRedirects disables HTTP redirects.
|
||||
func (c *Client) WithoutRedirects() *Client {
|
||||
c.doNotFollowRedirects = true
|
||||
return c
|
||||
}
|
||||
|
||||
// WithUserAgent defines the User-Agent header to use for HTTP requests.
|
||||
func (c *Client) WithUserAgent(userAgent string) *Client {
|
||||
if userAgent != "" {
|
||||
c.requestUserAgent = userAgent
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
// WithCookie defines the Cookies to use for HTTP requests.
|
||||
func (c *Client) WithCookie(cookie string) *Client {
|
||||
if cookie != "" {
|
||||
c.requestCookie = cookie
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
// Get performs a GET HTTP request.
|
||||
func (c *Client) Get() (*Response, error) {
|
||||
request, err := c.buildRequest(http.MethodGet, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return c.executeRequest(request)
|
||||
}
|
||||
|
||||
// PostForm performs a POST HTTP request with form encoded values.
|
||||
func (c *Client) PostForm(values url.Values) (*Response, error) {
|
||||
request, err := c.buildRequest(http.MethodPost, strings.NewReader(values.Encode()))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
return c.executeRequest(request)
|
||||
}
|
||||
|
||||
// PostJSON performs a POST HTTP request with a JSON payload.
|
||||
func (c *Client) PostJSON(data interface{}) (*Response, error) {
|
||||
b, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request, err := c.buildRequest(http.MethodPost, bytes.NewReader(b))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
return c.executeRequest(request)
|
||||
}
|
||||
|
||||
func (c *Client) executeRequest(request *http.Request) (*Response, error) {
|
||||
defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[HttpClient] inputURL=%s", c.inputURL))
|
||||
|
||||
logger.Debug("[HttpClient:Before] Method=%s %s",
|
||||
request.Method,
|
||||
c.String(),
|
||||
)
|
||||
|
||||
client := c.buildClient()
|
||||
resp, err := client.Do(request)
|
||||
if resp != nil {
|
||||
defer resp.Body.Close()
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if uerr, ok := err.(*url.Error); ok {
|
||||
switch uerr.Err.(type) {
|
||||
case x509.CertificateInvalidError, x509.HostnameError:
|
||||
err = errors.NewLocalizedError(errInvalidCertificate, uerr.Err)
|
||||
case *net.OpError:
|
||||
err = errors.NewLocalizedError(errNetworkOperation, uerr.Err)
|
||||
case net.Error:
|
||||
nerr := uerr.Err.(net.Error)
|
||||
if nerr.Timeout() {
|
||||
err = errors.NewLocalizedError(errRequestTimeout, c.ClientTimeout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.ContentLength > c.ClientMaxBodySize {
|
||||
return nil, fmt.Errorf("client: response too large (%d bytes)", resp.ContentLength)
|
||||
}
|
||||
|
||||
buf, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("client: error while reading body %v", err)
|
||||
}
|
||||
|
||||
response := &Response{
|
||||
Body: bytes.NewReader(buf),
|
||||
StatusCode: resp.StatusCode,
|
||||
EffectiveURL: resp.Request.URL.String(),
|
||||
LastModified: resp.Header.Get("Last-Modified"),
|
||||
ETag: resp.Header.Get("ETag"),
|
||||
Expires: resp.Header.Get("Expires"),
|
||||
ContentType: resp.Header.Get("Content-Type"),
|
||||
ContentLength: resp.ContentLength,
|
||||
}
|
||||
|
||||
logger.Debug("[HttpClient:After] Method=%s %s; Response => %s",
|
||||
request.Method,
|
||||
c.String(),
|
||||
response,
|
||||
)
|
||||
|
||||
// Ignore caching headers for feeds that do not want any cache.
|
||||
if resp.Header.Get("Expires") == "0" {
|
||||
logger.Debug("[HttpClient] Ignore caching headers for %q", response.EffectiveURL)
|
||||
response.ETag = ""
|
||||
response.LastModified = ""
|
||||
}
|
||||
|
||||
return response, err
|
||||
}
|
||||
|
||||
func (c *Client) buildRequest(method string, body io.Reader) (*http.Request, error) {
|
||||
request, err := http.NewRequest(method, c.inputURL, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request.Header = c.buildHeaders()
|
||||
|
||||
if c.requestUsername != "" && c.requestPassword != "" {
|
||||
request.SetBasicAuth(c.requestUsername, c.requestPassword)
|
||||
}
|
||||
|
||||
return request, nil
|
||||
}
|
||||
|
||||
func (c *Client) buildClient() http.Client {
|
||||
client := http.Client{
|
||||
Timeout: time.Duration(c.ClientTimeout) * time.Second,
|
||||
}
|
||||
|
||||
transport := &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: (&net.Dialer{
|
||||
// Default is 30s.
|
||||
Timeout: 10 * time.Second,
|
||||
|
||||
// Default is 30s.
|
||||
KeepAlive: 15 * time.Second,
|
||||
}).DialContext,
|
||||
|
||||
// Default is 100.
|
||||
MaxIdleConns: 50,
|
||||
|
||||
// Default is 90s.
|
||||
IdleConnTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
if c.AllowSelfSignedCertificates {
|
||||
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
}
|
||||
|
||||
if c.doNotFollowRedirects {
|
||||
client.CheckRedirect = func(req *http.Request, via []*http.Request) error {
|
||||
return http.ErrUseLastResponse
|
||||
}
|
||||
}
|
||||
|
||||
if c.useProxy && c.ClientProxyURL != "" {
|
||||
proxyURL, err := url.Parse(c.ClientProxyURL)
|
||||
if err != nil {
|
||||
logger.Error("[HttpClient] Proxy URL error: %v", err)
|
||||
} else {
|
||||
logger.Debug("[HttpClient] Use proxy: %s", proxyURL)
|
||||
transport.Proxy = http.ProxyURL(proxyURL)
|
||||
}
|
||||
}
|
||||
|
||||
client.Transport = transport
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
func (c *Client) buildHeaders() http.Header {
|
||||
headers := make(http.Header)
|
||||
headers.Add("Accept", "*/*")
|
||||
|
||||
if c.requestUserAgent != "" {
|
||||
headers.Add("User-Agent", c.requestUserAgent)
|
||||
}
|
||||
|
||||
if c.requestEtagHeader != "" {
|
||||
headers.Add("If-None-Match", c.requestEtagHeader)
|
||||
}
|
||||
|
||||
if c.requestLastModifiedHeader != "" {
|
||||
headers.Add("If-Modified-Since", c.requestLastModifiedHeader)
|
||||
}
|
||||
|
||||
if c.requestAuthorizationHeader != "" {
|
||||
headers.Add("Authorization", c.requestAuthorizationHeader)
|
||||
}
|
||||
|
||||
if c.requestCookie != "" {
|
||||
headers.Add("Cookie", c.requestCookie)
|
||||
}
|
||||
|
||||
headers.Add("Connection", "close")
|
||||
return headers
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
// Copyright 2020 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package client // import "miniflux.app/http/client"
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestClientWithDelay(t *testing.T) {
|
||||
clt := New("http://httpbin.org/delay/5")
|
||||
clt.ClientTimeout = 1
|
||||
_, err := clt.Get()
|
||||
if err == nil {
|
||||
t.Fatal(`The client should stops after 1 second`)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientWithError(t *testing.T) {
|
||||
clt := New("http://httpbin.org/status/502")
|
||||
clt.ClientTimeout = 5
|
||||
response, err := clt.Get()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if response.StatusCode != 502 {
|
||||
t.Fatalf(`Unexpected response status code: %d`, response.StatusCode)
|
||||
}
|
||||
|
||||
if !response.HasServerFailure() {
|
||||
t.Fatal(`A 502 error is considered as server failure`)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientWithResponseTooLarge(t *testing.T) {
|
||||
clt := New("http://httpbin.org/bytes/100")
|
||||
clt.ClientMaxBodySize = 10
|
||||
_, err := clt.Get()
|
||||
if err == nil {
|
||||
t.Fatal(`The client should fails when reading a response too large`)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientWithBasicAuth(t *testing.T) {
|
||||
clt := New("http://httpbin.org/basic-auth/testuser/testpassword")
|
||||
clt.WithCredentials("testuser", "testpassword")
|
||||
_, err := clt.Get()
|
||||
if err != nil {
|
||||
t.Fatalf(`The client should be authenticated successfully: %v`, err)
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package client provides an HTTP client builder.
|
||||
*/
|
||||
package client // import "miniflux.app/http/client"
|
||||
@@ -1,120 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package client // import "miniflux.app/http/client"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/net/html/charset"
|
||||
)
|
||||
|
||||
var xmlEncodingRegex = regexp.MustCompile(`<\?xml(.*)encoding=["'](.+)["'](.*)\?>`)
|
||||
|
||||
// Response wraps a server response.
|
||||
type Response struct {
|
||||
Body io.Reader
|
||||
StatusCode int
|
||||
EffectiveURL string
|
||||
LastModified string
|
||||
ETag string
|
||||
Expires string
|
||||
ContentType string
|
||||
ContentLength int64
|
||||
}
|
||||
|
||||
func (r *Response) String() string {
|
||||
return fmt.Sprintf(
|
||||
`StatusCode=%d EffectiveURL=%q LastModified=%q ETag=%s Expires=%s ContentType=%q ContentLength=%d`,
|
||||
r.StatusCode,
|
||||
r.EffectiveURL,
|
||||
r.LastModified,
|
||||
r.ETag,
|
||||
r.Expires,
|
||||
r.ContentType,
|
||||
r.ContentLength,
|
||||
)
|
||||
}
|
||||
|
||||
// IsNotFound returns true if the resource doesn't exist anymore.
|
||||
func (r *Response) IsNotFound() bool {
|
||||
return r.StatusCode == 404 || r.StatusCode == 410
|
||||
}
|
||||
|
||||
// IsNotAuthorized returns true if the resource require authentication.
|
||||
func (r *Response) IsNotAuthorized() bool {
|
||||
return r.StatusCode == 401
|
||||
}
|
||||
|
||||
// HasServerFailure returns true if the status code represents a failure.
|
||||
func (r *Response) HasServerFailure() bool {
|
||||
return r.StatusCode >= 400
|
||||
}
|
||||
|
||||
// IsModified returns true if the resource has been modified.
|
||||
func (r *Response) IsModified(etag, lastModified string) bool {
|
||||
if r.StatusCode == 304 {
|
||||
return false
|
||||
}
|
||||
|
||||
if r.ETag != "" && r.ETag == etag {
|
||||
return false
|
||||
}
|
||||
|
||||
if r.LastModified != "" && r.LastModified == lastModified {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// EnsureUnicodeBody makes sure the body is encoded in UTF-8.
|
||||
//
|
||||
// If a charset other than UTF-8 is detected, we convert the document to UTF-8.
|
||||
// This is used by the scraper and feed readers.
|
||||
//
|
||||
// Do not forget edge cases:
|
||||
//
|
||||
// - Feeds with encoding specified only in Content-Type header and not in XML document
|
||||
// - Feeds with encoding specified in both places
|
||||
// - Feeds with encoding specified only in XML document and not in HTTP header
|
||||
// - Feeds with wrong encoding defined and already in UTF-8
|
||||
func (r *Response) EnsureUnicodeBody() (err error) {
|
||||
buffer, err := io.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r.Body = bytes.NewReader(buffer)
|
||||
if utf8.Valid(buffer) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if strings.Contains(r.ContentType, "xml") {
|
||||
// We ignore documents with encoding specified in XML prolog.
|
||||
// This is going to be handled by the XML parser.
|
||||
length := 1024
|
||||
if len(buffer) < 1024 {
|
||||
length = len(buffer)
|
||||
}
|
||||
|
||||
if xmlEncodingRegex.Match(buffer[0:length]) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
r.Body, err = charset.NewReader(r.Body, r.ContentType)
|
||||
return err
|
||||
}
|
||||
|
||||
// BodyAsString returns the response body as string.
|
||||
func (r *Response) BodyAsString() string {
|
||||
bytes, _ := io.ReadAll(r.Body)
|
||||
return string(bytes)
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package client // import "miniflux.app/http/client"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
func TestIsNotFound(t *testing.T) {
|
||||
scenarios := map[int]bool{
|
||||
200: false,
|
||||
404: true,
|
||||
410: true,
|
||||
}
|
||||
|
||||
for input, expected := range scenarios {
|
||||
r := &Response{StatusCode: input}
|
||||
actual := r.IsNotFound()
|
||||
|
||||
if actual != expected {
|
||||
t.Errorf(`Unexpected result, got %v instead of %v for status code %d`, actual, expected, input)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsNotAuthorized(t *testing.T) {
|
||||
scenarios := map[int]bool{
|
||||
200: false,
|
||||
401: true,
|
||||
403: false,
|
||||
}
|
||||
|
||||
for input, expected := range scenarios {
|
||||
r := &Response{StatusCode: input}
|
||||
actual := r.IsNotAuthorized()
|
||||
|
||||
if actual != expected {
|
||||
t.Errorf(`Unexpected result, got %v instead of %v for status code %d`, actual, expected, input)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestHasServerFailure(t *testing.T) {
|
||||
scenarios := map[int]bool{
|
||||
200: false,
|
||||
404: true,
|
||||
500: true,
|
||||
}
|
||||
|
||||
for input, expected := range scenarios {
|
||||
r := &Response{StatusCode: input}
|
||||
actual := r.HasServerFailure()
|
||||
|
||||
if actual != expected {
|
||||
t.Errorf(`Unexpected result, got %v instead of %v for status code %d`, actual, expected, input)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsModifiedWith304Status(t *testing.T) {
|
||||
r := &Response{StatusCode: 304}
|
||||
if r.IsModified("etag", "lastModified") {
|
||||
t.Error("The resource should not be considered modified")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsModifiedWithIdenticalEtag(t *testing.T) {
|
||||
r := &Response{StatusCode: 200, ETag: "etag"}
|
||||
if r.IsModified("etag", "lastModified") {
|
||||
t.Error("The resource should not be considered modified")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsModifiedWithIdenticalLastModified(t *testing.T) {
|
||||
r := &Response{StatusCode: 200, LastModified: "lastModified"}
|
||||
if r.IsModified("etag", "lastModified") {
|
||||
t.Error("The resource should not be considered modified")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsModifiedWithDifferentHeaders(t *testing.T) {
|
||||
r := &Response{StatusCode: 200, ETag: "some etag", LastModified: "some date"}
|
||||
if !r.IsModified("etag", "lastModified") {
|
||||
t.Error("The resource should be considered modified")
|
||||
}
|
||||
}
|
||||
|
||||
func TestToString(t *testing.T) {
|
||||
input := `test`
|
||||
r := &Response{Body: strings.NewReader(input)}
|
||||
|
||||
if r.BodyAsString() != input {
|
||||
t.Error(`Unexpected output`)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnsureUnicodeWithHTMLDocuments(t *testing.T) {
|
||||
var unicodeTestCases = []struct {
|
||||
filename, contentType string
|
||||
convertedToUnicode bool
|
||||
}{
|
||||
{"HTTP-charset.html", "text/html; charset=iso-8859-15", true},
|
||||
{"UTF-16LE-BOM.html", "", true},
|
||||
{"UTF-16BE-BOM.html", "", true},
|
||||
{"meta-content-attribute.html", "text/html", true},
|
||||
{"meta-charset-attribute.html", "text/html", true},
|
||||
{"No-encoding-declaration.html", "text/html", true},
|
||||
{"HTTP-vs-UTF-8-BOM.html", "text/html; charset=iso-8859-15", true},
|
||||
{"HTTP-vs-meta-content.html", "text/html; charset=iso-8859-15", true},
|
||||
{"HTTP-vs-meta-charset.html", "text/html; charset=iso-8859-15", true},
|
||||
{"UTF-8-BOM-vs-meta-content.html", "text/html", true},
|
||||
{"UTF-8-BOM-vs-meta-charset.html", "text/html", true},
|
||||
{"windows_1251.html", "text/html; charset=windows-1251", true},
|
||||
{"gb2312.html", "text/html", true},
|
||||
{"urdu.xml", "text/xml; charset=utf-8", true},
|
||||
{"content-type-only-win-8859-1.xml", "application/xml; charset=ISO-8859-1", true},
|
||||
{"rdf_utf8.xml", "application/rss+xml; charset=utf-8", true},
|
||||
{"rdf_utf8.xml", "application/rss+xml; charset: utf-8", true}, // Invalid Content-Type
|
||||
{"charset-content-type-xml-iso88591.xml", "application/rss+xml; charset=ISO-8859-1", false},
|
||||
{"windows_1251.xml", "text/xml", false},
|
||||
{"smallfile.xml", "text/xml; charset=utf-8", true},
|
||||
{"single_quote_xml_encoding.xml", "text/xml; charset=utf-8", true},
|
||||
}
|
||||
|
||||
for _, tc := range unicodeTestCases {
|
||||
content, err := os.ReadFile("testdata/" + tc.filename)
|
||||
if err != nil {
|
||||
t.Fatalf(`Unable to read file %q: %v`, tc.filename, err)
|
||||
}
|
||||
|
||||
r := &Response{Body: bytes.NewReader(content), ContentType: tc.contentType}
|
||||
parseErr := r.EnsureUnicodeBody()
|
||||
if parseErr != nil {
|
||||
t.Fatalf(`Unicode conversion error for %q - %q: %v`, tc.filename, tc.contentType, parseErr)
|
||||
}
|
||||
|
||||
isUnicode := utf8.ValidString(r.BodyAsString())
|
||||
if isUnicode != tc.convertedToUnicode {
|
||||
t.Errorf(`Unicode conversion %q - %q, got: %v, expected: %v`,
|
||||
tc.filename, tc.contentType, isUnicode, tc.convertedToUnicode)
|
||||
}
|
||||
}
|
||||
}
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<title>HTTP charset</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
|
||||
<link rel="stylesheet" type="text/css" href="./generatedtests.css">
|
||||
<script src="http://w3c-test.org/resources/testharness.js"></script>
|
||||
<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
|
||||
<meta name='flags' content='http'>
|
||||
<meta name="assert" content="The character encoding of a page can be set using the HTTP header charset declaration.">
|
||||
<style type='text/css'>
|
||||
.test div { width: 50px; }</style>
|
||||
<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
|
||||
</head>
|
||||
<body>
|
||||
<p class='title'>HTTP charset</p>
|
||||
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
|
||||
<div class='test'><div id='box' class='ýäè'> </div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='description'>
|
||||
<p class="assertion" title="Assertion">The character encoding of a page can be set using the HTTP header charset declaration.</p>
|
||||
<div class="notes"><p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.ÜÀÚ</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p><p>The only character encoding declaration for this HTML file is in the HTTP header, which sets the encoding to ISO 8859-15.</p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-003">Next test</a></div><div class="doctype">HTML5</div>
|
||||
<p class="jump">the-input-byte-stream-001<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary & related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-001" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
|
||||
<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
|
||||
<li>The test is read from a server that supports HTTP.</li></ul></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('box').offsetWidth, 100);
|
||||
}, " ");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<title>HTTP vs UTF-8 BOM</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
|
||||
<link rel="stylesheet" type="text/css" href="./generatedtests.css">
|
||||
<script src="http://w3c-test.org/resources/testharness.js"></script>
|
||||
<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
|
||||
<meta name='flags' content='http'>
|
||||
<meta name="assert" content="A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.">
|
||||
<style type='text/css'>
|
||||
.test div { width: 50px; }</style>
|
||||
<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
|
||||
</head>
|
||||
<body>
|
||||
<p class='title'>HTTP vs UTF-8 BOM</p>
|
||||
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
|
||||
<div class='test'><div id='box' class='ýäè'> </div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='description'>
|
||||
<p class="assertion" title="Assertion">A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.</p>
|
||||
<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a UTF-8 signature.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.ýäè</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p><p>If the test is unsuccessful, the characters  should appear at the top of the page. These represent the bytes that make up the UTF-8 signature when encountered in the ISO 8859-15 encoding.</p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-022">Next test</a></div><div class="doctype">HTML5</div>
|
||||
<p class="jump">the-input-byte-stream-034<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary & related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-034" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
|
||||
<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
|
||||
<li>The test is read from a server that supports HTTP.</li></ul></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('box').offsetWidth, 100);
|
||||
}, " ");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="iso-8859-1" > <title>HTTP vs meta charset</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
|
||||
<link rel="stylesheet" type="text/css" href="./generatedtests.css">
|
||||
<script src="http://w3c-test.org/resources/testharness.js"></script>
|
||||
<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
|
||||
<meta name='flags' content='http'>
|
||||
<meta name="assert" content="The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.">
|
||||
<style type='text/css'>
|
||||
.test div { width: 50px; }.test div { width: 90px; }
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
|
||||
</head>
|
||||
<body>
|
||||
<p class='title'>HTTP vs meta charset</p>
|
||||
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
|
||||
<div class='test'><div id='box' class='ýäè'> </div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='description'>
|
||||
<p class="assertion" title="Assertion">The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.</p>
|
||||
<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-1.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.ÜÀÚ</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-037">Next test</a></div><div class="doctype">HTML5</div>
|
||||
<p class="jump">the-input-byte-stream-018<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary & related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-018" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
|
||||
<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
|
||||
<li>The test is read from a server that supports HTTP.</li></ul></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('box').offsetWidth, 100);
|
||||
}, " ");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" > <title>HTTP vs meta content</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
|
||||
<link rel="stylesheet" type="text/css" href="./generatedtests.css">
|
||||
<script src="http://w3c-test.org/resources/testharness.js"></script>
|
||||
<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
|
||||
<meta name='flags' content='http'>
|
||||
<meta name="assert" content="The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.">
|
||||
<style type='text/css'>
|
||||
.test div { width: 50px; }.test div { width: 90px; }
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
|
||||
</head>
|
||||
<body>
|
||||
<p class='title'>HTTP vs meta content</p>
|
||||
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
|
||||
<div class='test'><div id='box' class='ýäè'> </div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='description'>
|
||||
<p class="assertion" title="Assertion">The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.</p>
|
||||
<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-1.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.ÜÀÚ</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-018">Next test</a></div><div class="doctype">HTML5</div>
|
||||
<p class="jump">the-input-byte-stream-016<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary & related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-016" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
|
||||
<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
|
||||
<li>The test is read from a server that supports HTTP.</li></ul></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('box').offsetWidth, 100);
|
||||
}, " ");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<title>No encoding declaration</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
|
||||
<link rel="stylesheet" type="text/css" href="./generatedtests.css">
|
||||
<script src="http://w3c-test.org/resources/testharness.js"></script>
|
||||
<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
|
||||
<meta name='flags' content='http'>
|
||||
<meta name="assert" content="A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.">
|
||||
<style type='text/css'>
|
||||
.test div { width: 50px; }</style>
|
||||
<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
|
||||
</head>
|
||||
<body>
|
||||
<p class='title'>No encoding declaration</p>
|
||||
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
|
||||
<div class='test'><div id='box' class='ýäè'> </div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='description'>
|
||||
<p class="assertion" title="Assertion">A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.</p>
|
||||
<div class="notes"><p><p>The test on this page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.ýäè</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-034">Next test</a></div><div class="doctype">HTML5</div>
|
||||
<p class="jump">the-input-byte-stream-015<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary & related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-015" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
|
||||
<div class='prereq'>Assumptions: <ul><li>The test is read from a server that supports HTTP.</li></ul></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('box').offsetWidth, 100);
|
||||
}, " ");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
These test cases come from
|
||||
http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics
|
||||
|
||||
Distributed under both the W3C Test Suite License
|
||||
(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license)
|
||||
and the W3C 3-clause BSD License
|
||||
(http://www.w3.org/Consortium/Legal/2008/03-bsd-license).
|
||||
To contribute to a W3C Test Suite, see the policies and contribution
|
||||
forms (http://www.w3.org/2004/10/27-testcases).
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user