Initial Commit
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/distrohop
|
||||
/dist/
|
70
.goreleaser.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
version: 2
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
builds:
|
||||
- id: distrohop
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
binary: distrohop
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- '386'
|
||||
- arm64
|
||||
- arm
|
||||
- riscv64
|
||||
archives:
|
||||
- files:
|
||||
- distrohop.service
|
||||
nfpms:
|
||||
- id: distrohop
|
||||
description: "A utility for correlating and identifying equivalent software packages across different Linux distributions"
|
||||
homepage: 'https://gitea.elara.ws/Elara6331/distrohop'
|
||||
maintainer: 'Elara Ivy <elara@elara.ws>'
|
||||
license: AGPLv3
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
- archlinux
|
||||
provides:
|
||||
- distrohop
|
||||
conflicts:
|
||||
- distrohop
|
||||
contents:
|
||||
- src: distrohop.service
|
||||
dst: /etc/systemd/system/distrohop.service
|
||||
aurs:
|
||||
- name: distrohop-bin
|
||||
homepage: 'https://gitea.elara.ws/Elara6331/distrohop'
|
||||
description: "A utility for correlating and identifying equivalent software packages across different Linux distributions"
|
||||
maintainers:
|
||||
- 'Elara Ivy <elara@elara.ws>'
|
||||
license: AGPLv3
|
||||
private_key: '{{ .Env.AUR_KEY }}'
|
||||
git_url: 'ssh://aur@aur.archlinux.org/distrohop-bin.git'
|
||||
provides:
|
||||
- distrohop
|
||||
conflicts:
|
||||
- distrohop
|
||||
package: |-
|
||||
# binaries
|
||||
install -Dm755 ./distrohop "${pkgdir}/usr/bin/distrohop"
|
||||
|
||||
# services
|
||||
install -Dm644 ./distrohop.service "${pkgdir}/etc/systemd/system/distrohop.service"
|
||||
release:
|
||||
gitea:
|
||||
owner: Elara6331
|
||||
name: distrohop
|
||||
gitea_urls:
|
||||
api: 'https://gitea.elara.ws/api/v1/'
|
||||
download: 'https://gitea.elara.ws'
|
||||
skip_tls_verify: false
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ incpatch .Version }}-next"
|
||||
changelog:
|
||||
sort: asc
|
30
.woodpecker.yml
Normal file
@ -0,0 +1,30 @@
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: gitea.elara.ws/elara6331/builder
|
||||
commands:
|
||||
- registry-login
|
||||
- ko build -B --platform=linux/amd64,linux/arm64,linux/riscv64 -t latest,${CI_COMMIT_TAG} --sbom=none
|
||||
environment:
|
||||
REGISTRY: gitea.elara.ws
|
||||
REGISTRY_USERNAME: Elara6331
|
||||
KO_DOCKER_REPO: gitea.elara.ws/elara6331
|
||||
KO_DEFAULTBASEIMAGE: gitea.elara.ws/elara6331/static-root
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: registry_password
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: release
|
||||
image: goreleaser/goreleaser
|
||||
commands:
|
||||
- goreleaser release
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: gitea_token
|
||||
AUR_KEY:
|
||||
from_secret: aur_key
|
||||
when:
|
||||
event: tag
|
661
LICENSE
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
438
LICENSE-logo
Normal file
@ -0,0 +1,438 @@
|
||||
Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
("Public License"). To the extent this Public License may be
|
||||
interpreted as a contract, You are granted the Licensed Rights in
|
||||
consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the
|
||||
Licensor receives from making the Licensed Material available under
|
||||
these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-NC-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
l. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
m. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
n. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material for
|
||||
NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-NC-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
67
README.md
Normal file
@ -0,0 +1,67 @@
|
||||
<p align="center">
|
||||
<img width="250" src="assets/logo/distrohop-text-bottom.svg">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
**DistroHop** is a tool that helps you compare Linux packages across different distributions. It lets you search for a package from one distro in another's repositories or look for a specific item you need.
|
||||
|
||||
## How does it work?
|
||||
|
||||
Distrohop works by downloading and decoding a file index from each supported repo. It analyzes the information contained in the index to form a generalized list of tags describing the contents of each package, and then stores that list in a database.
|
||||
|
||||
When you search for a package from another distro, it resolves the package name to its list of tags, and then searches for any packages that match at least one tag in the other distro's repos. It calculates a confidence score based on how many of the tags match, and then sorts the results by confidence.
|
||||
|
||||
## Why are some searches so slow?
|
||||
|
||||
Each repo can have tens of millions of tags that Distrohop has to churn through. It uses LSM trees and bloom filters to speed the search up as much as possible, and most searches can be measured in milliseconds, but for some searches that contain lots of tags, there may not be any shortcut and DistroHop may have to scan through all or most of the tags stored in the database, which can take a long time.
|
||||
|
||||
## Installation
|
||||
|
||||
You can either install one of the distro packages in the [latest Gitea release](https://gitea.elara.ws/Elara6331/distrohop/releases/latest) or the [Docker container](https://gitea.elara.ws/elara6331/-/packages/container/distrohop/latest). This repo contains an [example compose file](docker-compose.yml).
|
||||
|
||||
The distro packages look for your config file in `$XDG_CONFIG_HOME` and store data in `$XDG_DATA_HOME`, or your OS's equivalent.
|
||||
|
||||
The container looks for your config file at `/distrohop.toml` and stores data in `/data`, so make sure to create volumes for those. You can choose to use environment variables instead of a config file if you'd like. You can see an example docker-compose file [here](docker-compose.yml).
|
||||
|
||||
## Configuration
|
||||
|
||||
DistroHop's config file consists of a list of distro repositories. Here's an excerpt from the [example config](distrohop.toml) provided in this repo:
|
||||
|
||||
```toml
|
||||
[[repo]]
|
||||
refresh_schedule = "0 0 * * *" # Every day at 12:00 AM
|
||||
name = "debian-bookworm"
|
||||
type = "apt"
|
||||
base_url = "http://ftp.us.debian.org/debian"
|
||||
version = "bookworm"
|
||||
repos = ["main", "non-free", "contrib"]
|
||||
arch = ["amd64", "all"]
|
||||
```
|
||||
|
||||
- `refresh_schedule` is a crontab string that represents the schedule by which the repo will be updated. All repos will also always be updated on startup. The default for this setting is `0 0 * * *`, which means every day at 12:00 AM.
|
||||
- `name` is the name that you'd like DistroHop to reference the repo by.
|
||||
- `type` is one of `apt`, `dnf`, or `pacman`.
|
||||
- `base_url` is the base URL of the repo. For Arch, it accepts variables such as `$repo` and `$arch` which will be replaced with the repo/arch value currently being pulled.
|
||||
- `version` is the distro-specific repo version string. For Debian, this is the release codename (`buster`, `bullseye`, `bookworm`, `trixie`, etc.). Arch doesn't use this variable, so it can be omitted in Arch repos.
|
||||
- `repos` is a list of distro-specific repo names. All Ubuntu versions and Debian versions before Wheezy don't use this, and it should be omitted in those repos to avoid duplicate downloads.
|
||||
- `arch` is a list of distro-specific binary architectures for which indices should be pulled.
|
||||
|
||||
There's also a top-level setting outside of any repos called `search_threads`, which is an integer specifying how many threads should be spawned for database searches. The default is `4`.
|
||||
|
||||
All the config settings can also be set through environment variables, like this:
|
||||
|
||||
```bash
|
||||
DISTROHOP_SEARCH_THREADS=4
|
||||
DISTROHOP_REPO_0_REFRESH_SCHEDULE="0 0 * * *"
|
||||
DISTROHOP_REPO_0_NAME="debian-bookworm"
|
||||
DISTROHOP_REPO_0_TYPE="apt"
|
||||
DISTROHOP_REPO_0_BASE_URL="http://ftp.us.debian.org/debian"
|
||||
DISTROHOP_REPO_0_VERSION="bookworm"
|
||||
DISTROHOP_REPO_0_REPOS="main,non-free,contrib"
|
||||
DISTROHOP_REPO_0_ARCH="amd64,all"
|
||||
```
|
||||
|
||||
## Attribution
|
||||
|
||||
All the icons stored under `assets/icons` are downloaded from various icon packs on https://iconify.design.
|
13
add-icon.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
iconset="${1%%:*}"
|
||||
icon="${1#*:}"
|
||||
|
||||
BASE_DIR="./cmd/distrohop/assets/icons"
|
||||
|
||||
mkdir -p "$BASE_DIR/$iconset"
|
||||
wget -4 -O "$BASE_DIR/$iconset/$icon.svg" "https://api.iconify.design/$iconset/$icon.svg"
|
||||
sed -i -E \
|
||||
-e 's/<svg/<svg id="icon"/' \
|
||||
-e 's/width="[^"]+"/width="100%"/g' \
|
||||
-e 's/height="[^"]+"/height="100%"/g' \
|
||||
"$BASE_DIR/$iconset/$icon.svg"
|
19
assets/css/style.css
Normal file
@ -0,0 +1,19 @@
|
||||
.icon.is-aligned {
|
||||
height:1em;
|
||||
width:1em;
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon.is-aligned svg {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
top: .125em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pkg-tags:not(.is-active) > .tags:nth-child(10) ~ .tags {
|
||||
display: none !important
|
||||
}
|
||||
|
||||
[x-cloak] { display: none !important; }
|
1
assets/icons/fe/question.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-4h2v2h-2zm0-1.992s2-.008 2 0C13 13.006 16 12 16 10c0-2.21-1.773-4-3.991-4A4 4 0 0 0 8 10h2c0-1.1.9-2 2-2s2 .9 2 2c0 .9-3 2.367-3 4.008"/></svg>
|
After Width: | Height: | Size: 400 B |
1
assets/icons/gridicons/external.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6v2H5v12h12v-6zM13 3v2h4.586l-7.793 7.793l1.414 1.414L19 6.414V11h2V3z"/></svg>
|
After Width: | Height: | Size: 260 B |
1
assets/icons/icons8/plus.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="currentColor" d="M16 3C8.832 3 3 8.832 3 16s5.832 13 13 13s13-5.832 13-13S23.168 3 16 3m0 2c6.087 0 11 4.913 11 11s-4.913 11-11 11S5 22.087 5 16S9.913 5 16 5m-1 5v5h-5v2h5v5h2v-5h5v-2h-5v-5z"/></svg>
|
After Width: | Height: | Size: 308 B |
1
assets/icons/map/search.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 50 50"><path fill="currentColor" d="M35.66 29.539a18.04 18.04 0 0 0 2.632-9.385c0-10.029-8.115-18.15-18.146-18.154C10.124 2.003 2 10.125 2 20.152c0 10.018 8.125 18.139 18.152 18.139c3.44 0 6.645-.972 9.384-2.633L41.879 48L48 41.876zM20.15 31.38c-6.202-.015-11.216-5.027-11.227-11.216A11.245 11.245 0 0 1 20.15 8.935c6.199.016 11.215 5.028 11.228 11.229c-.013 6.182-5.031 11.201-11.228 11.216"/></svg>
|
After Width: | Height: | Size: 490 B |
1
assets/icons/material-symbols/search.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" d="m19.6 21l-6.3-6.3q-.75.6-1.725.95T9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l6.3 6.3zM9.5 14q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"/></svg>
|
After Width: | Height: | Size: 364 B |
1
assets/icons/ri/arrow-left-line.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364l-1.414 1.414L4 12l7.778-7.778l1.414 1.414z"/></svg>
|
After Width: | Height: | Size: 210 B |
1
assets/icons/ri/arrow-right-line.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" d="m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2z"/></svg>
|
After Width: | Height: | Size: 218 B |
1
assets/icons/weui/error-outlined.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-1.2a8.8 8.8 0 1 0 0-17.6a8.8 8.8 0 0 0 0 17.6m-.66-14.369h1.32l-.089 7.06H11.43l-.088-7.06zM12 17.073a.825.825 0 0 1-.835-.835a.82.82 0 0 1 .835-.835c.476 0 .835.36.835.835a.82.82 0 0 1-.835.835"/></svg>
|
After Width: | Height: | Size: 425 B |
85
assets/logo/distrohop-no-text.svg
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="39.675972mm"
|
||||
height="44.827702mm"
|
||||
viewBox="0 0 39.675972 44.827702"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
sodipodi:docname="distrohop-no-text.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="2.2263763"
|
||||
inkscape:cx="123.06994"
|
||||
inkscape:cy="133.17605"
|
||||
inkscape:window-width="2000"
|
||||
inkscape:window-height="1240"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#27b3e4;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#4e3dd1;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient2"
|
||||
x1="14.370845"
|
||||
y1="97.476159"
|
||||
x2="69.117202"
|
||||
y2="97.476159"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-115.35833,-95.249999)">
|
||||
<g
|
||||
id="g96"
|
||||
style="fill:url(#linearGradient2);stroke:none;fill-opacity:1"
|
||||
transform="matrix(0.72472351,0,0,0.72472351,104.94344,47.020586)">
|
||||
<path
|
||||
style="fill:url(#linearGradient2);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 14.370845,113.54003 40.063381,128.40361 40.089371,98.620142 14.373443,83.743108 Z"
|
||||
id="path95"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient2);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 41.688502,66.548708 15.982938,81.389745 41.776189,96.281485 67.505093,81.426898 Z"
|
||||
id="path95-2"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient2);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 69.093798,113.5397 43.388301,128.38085 V 98.597387 L 69.117202,83.7428 Z"
|
||||
id="path95-9" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
124
assets/logo/distrohop-text-bottom.svg
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="51.529545mm"
|
||||
height="54.578197mm"
|
||||
viewBox="0 0 51.529545 54.578198"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
sodipodi:docname="distrohop-text-bottom.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="2.2263763"
|
||||
inkscape:cx="123.29452"
|
||||
inkscape:cy="133.62521"
|
||||
inkscape:window-width="2000"
|
||||
inkscape:window-height="1240"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#27b3e4;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#4e3dd1;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient2"
|
||||
x1="14.370845"
|
||||
y1="97.476158"
|
||||
x2="69.117203"
|
||||
y2="97.476158"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient3"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="14.370845"
|
||||
y1="97.476158"
|
||||
x2="69.117203"
|
||||
y2="97.476158" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient4"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="14.370845"
|
||||
y1="97.476158"
|
||||
x2="69.117203"
|
||||
y2="97.476158" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="14.370845"
|
||||
y1="97.476158"
|
||||
x2="69.117203"
|
||||
y2="97.476158" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-109.43154,-95.249999)">
|
||||
<g
|
||||
id="g96"
|
||||
style="fill:url(#linearGradient2);fill-opacity:1;stroke:none"
|
||||
transform="matrix(0.72472351,0,0,0.72472351,104.94344,47.020586)">
|
||||
<path
|
||||
style="fill:url(#linearGradient3);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 14.370845,113.54003 40.063381,128.40361 40.089371,98.620142 14.373443,83.743108 Z"
|
||||
id="path95"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient4);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 41.688502,66.548708 15.982938,81.389745 41.776189,96.281485 67.505093,81.426898 Z"
|
||||
id="path95-2"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient5);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 69.093798,113.5397 43.388301,128.38085 V 98.597387 L 69.117202,83.7428 Z"
|
||||
id="path95-9" />
|
||||
</g>
|
||||
<g
|
||||
id="text1"
|
||||
style="font-weight:600;font-size:9.17222px;line-height:500;font-family:Poppins;-inkscape-font-specification:'Poppins Semi-Bold';letter-spacing:0px;fill:#3687dd;stroke-width:0.705556;stroke-linecap:square"
|
||||
aria-label="DISTROHOP">
|
||||
<path
|
||||
d="m 111.66957,143.36178 h -2.23803 v 6.40221 h 2.23803 c 2.0454,0 3.37537,-1.25659 3.37537,-3.19193 0,-1.94451 -1.32997,-3.21028 -3.37537,-3.21028 z m -0.0459,5.31072 h -0.90805 v -4.2284 h 0.90805 c 1.34832,0 2.10961,0.79799 2.10961,2.12796 0,1.32997 -0.76129,2.10044 -2.10961,2.10044 z m 4.38433,-5.31072 v 6.40221 h 1.28412 v -6.40221 z m 4.76039,6.46642 c 1.45838,0 2.26553,-0.90805 2.26553,-1.917 0,-2.25636 -3.28365,-1.54093 -3.28365,-2.82504 0,-0.52282 0.37606,-0.77047 0.88053,-0.75212 0.55034,0.009 0.88971,0.33937 0.91722,0.76129 h 1.41253 c -0.0825,-1.1557 -0.98143,-1.82527 -2.29306,-1.82527 -1.3208,0 -2.25636,0.69709 -2.25636,1.85279 -0.009,2.32057 3.29282,1.4859 3.29282,2.8709 0,0.45861 -0.35771,0.77964 -0.96308,0.77964 -0.59619,0 -0.93557,-0.33937 -0.97226,-0.85301 h -1.37583 c 0.0183,1.21073 1.04563,1.90782 2.37561,1.90782 z m 3.03599,-6.46642 v 1.03646 h 1.70604 v 5.36575 h 1.28411 v -5.36575 h 1.70603 v -1.03646 z m 9.02547,1.99037 c 0,0.57785 -0.32103,0.95392 -1.03647,0.95392 h -1.07315 v -1.88031 h 1.07315 c 0.71544,0 1.03647,0.35772 1.03647,0.92639 z m -0.9906,-1.99037 h -2.40313 v 6.40221 h 1.28411 v -2.49484 h 0.60537 l 1.41252,2.49484 h 1.4859 l -1.53176,-2.59574 c 1.02729,-0.27516 1.45838,-1.06397 1.45838,-1.84361 0,-1.07315 -0.77046,-1.96286 -2.31139,-1.96286 z m 6.44807,6.46642 c 1.8161,0 3.27449,-1.35749 3.27449,-3.28366 0,-1.91699 -1.44922,-3.27448 -3.27449,-3.27448 -1.80692,0 -3.28365,1.35749 -3.28365,3.27448 0,1.92617 1.47673,3.28366 3.28365,3.28366 z m 0,-1.14653 c -1.16487,0 -1.96285,-0.83467 -1.96285,-2.13713 0,-1.30245 0.79798,-2.11878 1.96285,-2.11878 1.1557,0 1.95369,0.81633 1.95369,2.11878 0,1.30246 -0.79799,2.13713 -1.95369,2.13713 z"
|
||||
id="path2" />
|
||||
<path
|
||||
style="font-weight:normal;-inkscape-font-specification:Poppins"
|
||||
d="m 146.67993,143.37095 v 2.8067 h -3.25613 v -2.8067 h -0.83468 v 6.39304 h 0.83468 v -2.89842 h 3.25613 v 2.89842 h 0.83468 v -6.39304 z m 5.15479,6.45725 c 1.80692,0 3.21027,-1.34832 3.21027,-3.26531 0,-1.917 -1.40335,-3.26531 -3.21027,-3.26531 -1.79776,0 -3.21028,1.34831 -3.21028,3.26531 0,1.91699 1.41252,3.26531 3.21028,3.26531 z m 0,-0.72461 c -1.34832,0 -2.35726,-0.98143 -2.35726,-2.5407 0,-1.56845 1.00894,-2.54071 2.35726,-2.54071 1.34831,0 2.35726,0.97226 2.35726,2.54071 0,1.55927 -1.00895,2.5407 -2.35726,2.5407 z m 6.37468,-2.69663 h -1.22907 v -2.34809 h 1.22907 c 0.95391,0 1.35749,0.44027 1.35749,1.18322 0,0.71543 -0.40358,1.16487 -1.35749,1.16487 z m 2.21051,-1.16487 c 0,-1.04564 -0.70626,-1.87114 -2.21051,-1.87114 h -2.06375 v 6.39304 h 0.83468 v -2.66911 h 1.22907 c 1.5868,0 2.21051,-0.88054 2.21051,-1.85279 z"
|
||||
id="path3" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.5 KiB |
124
assets/logo/distrohop.svg
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="221.53868mm"
|
||||
height="44.827702mm"
|
||||
viewBox="0 0 221.53868 44.827701"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||
sodipodi:docname="distrohop.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.9137198"
|
||||
inkscape:cx="80.987629"
|
||||
inkscape:cy="133.52014"
|
||||
inkscape:window-width="1046"
|
||||
inkscape:window-height="1240"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#27b3e4;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#4e3dd1;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="-187.68247 : 48.608149 : 1"
|
||||
inkscape:vp_y="0 : 999.99999 : 0"
|
||||
inkscape:vp_z="125.63163 : 31.772318 : 1"
|
||||
inkscape:persp3d-origin="41.276617 : -130.85665 : 1"
|
||||
id="perspective7" />
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect4"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,1.3229167,0,1 @ F,0,0,1,0,1.3229167,0,1 @ F,0,0,1,0,1.3229167,0,1 @ F,0,0,1,0,1.3229167,0,1 @ F,0,0,1,0,1.3229167,0,1"
|
||||
radius="5"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient4"
|
||||
x1="14.370845"
|
||||
y1="97.476159"
|
||||
x2="69.117202"
|
||||
y2="97.476159"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-19.863509,-44.216578)">
|
||||
<g
|
||||
id="text4"
|
||||
style="font-size:20.9169px;line-height:1;font-family:'Shadows Into Light';-inkscape-font-specification:'Shadows Into Light, ';letter-spacing:0px;fill:#ffffff;stroke-width:2.09169;stroke-linecap:round"
|
||||
aria-label="DISTROHOP"
|
||||
transform="matrix(1.4821303,0,0,1.4821303,-29.376608,-31.996985)">
|
||||
<path
|
||||
style="font-weight:600;font-family:Poppins;-inkscape-font-specification:'Poppins Semi-Bold';fill:#ffffff"
|
||||
d="M 71.522377,59.097223 H 66.418654 V 73.69722 h 5.103723 c 4.664469,0 7.69742,-2.865616 7.69742,-7.279082 0,-4.434383 -3.032951,-7.320915 -7.69742,-7.320915 z M 71.417793,71.208109 H 69.34702 v -9.642692 h 2.070773 c 3.074784,0 4.810887,1.819771 4.810887,4.852721 0,3.032951 -1.736103,4.789971 -4.810887,4.789971 z M 81.416091,59.097223 V 73.69722 h 2.928366 V 59.097223 Z m 10.855868,14.746415 c 3.325787,0 5.166474,-2.070773 5.166474,-4.371632 0,-5.145558 -7.48825,-3.514039 -7.48825,-6.442405 0,-1.192264 0.857593,-1.75702 2.008022,-1.715186 1.255014,0.02092 2.02894,0.773925 2.09169,1.736102 h 3.221203 c -0.188252,-2.635529 -2.238108,-4.162463 -5.229225,-4.162463 -3.012034,0 -5.145558,1.589685 -5.145558,4.225214 -0.02092,5.291976 7.509168,3.388538 7.509168,6.54699 0,1.045845 -0.815759,1.777937 -2.196275,1.777937 -1.359598,0 -2.133524,-0.773926 -2.217191,-1.945272 h -3.137535 c 0.04183,2.761031 2.384526,4.350715 5.417477,4.350715 z m 6.923478,-14.746415 v 2.36361 h 3.890543 V 73.69722 h 2.92837 V 61.460833 h 3.89054 v -2.36361 z m 20.582223,4.538968 c 0,1.317764 -0.73209,2.175357 -2.36361,2.175357 h -2.44728 v -4.287964 h 2.44728 c 1.63152,0 2.36361,0.815759 2.36361,2.112607 z m -2.25902,-4.538968 h -5.48023 V 73.69722 h 2.92836 v -5.689397 h 1.38052 l 3.2212,5.689397 h 3.38854 l -3.49312,-5.919483 c 2.34269,-0.627507 3.32579,-2.426361 3.32579,-4.204297 0,-2.447277 -1.75702,-4.476217 -5.27106,-4.476217 z m 14.70459,14.746415 c 4.14155,0 7.46734,-3.095701 7.46734,-7.48825 0,-4.371633 -3.30487,-7.467334 -7.46734,-7.467334 -4.12063,0 -7.48825,3.095701 -7.48825,7.467334 0,4.392549 3.36762,7.48825 7.48825,7.48825 z m 0,-2.614612 c -2.65644,0 -4.47621,-1.903438 -4.47621,-4.873638 0,-2.9702 1.81977,-4.831804 4.47621,-4.831804 2.63553,0 4.4553,1.861604 4.4553,4.831804 0,2.9702 -1.81977,4.873638 -4.4553,4.873638 z"
|
||||
id="path1" />
|
||||
<path
|
||||
style="font-family:Poppins;-inkscape-font-specification:Poppins;fill:#ffffff"
|
||||
d="m 151.36219,59.11814 v 6.400572 h -7.4255 V 59.11814 h -1.90344 v 14.57908 h 1.90344 v -6.609741 h 7.4255 v 6.609741 h 1.90344 V 59.11814 Z m 11.75529,14.725498 c 4.12063,0 7.32092,-3.074784 7.32092,-7.446416 0,-4.371633 -3.20029,-7.446417 -7.32092,-7.446417 -4.09971,0 -7.32091,3.074784 -7.32091,7.446417 0,4.371632 3.2212,7.446416 7.32091,7.446416 z m 0,-1.652435 c -3.07478,0 -5.37564,-2.238108 -5.37564,-5.793981 0,-3.57679 2.30086,-5.793982 5.37564,-5.793982 3.07479,0 5.37565,2.217192 5.37565,5.793982 0,3.555873 -2.30086,5.793981 -5.37565,5.793981 z m 14.53723,-6.149569 h -2.80286 v -5.354726 h 2.80286 c 2.17536,0 3.0957,1.004011 3.0957,2.69828 0,1.631518 -0.92034,2.656446 -3.0957,2.656446 z m 5.04097,-2.656446 c 0,-2.384527 -1.6106,-4.267048 -5.04097,-4.267048 h -4.7063 v 14.57908 h 1.90344 v -6.086818 h 2.80286 c 3.61862,0 5.04097,-2.008023 5.04097,-4.225214 z"
|
||||
id="path2" />
|
||||
</g>
|
||||
<g
|
||||
id="g96"
|
||||
style="fill:url(#linearGradient4);stroke:none;fill-opacity:1"
|
||||
transform="matrix(0.72472351,0,0,0.72472351,9.4486195,-4.0128354)">
|
||||
<path
|
||||
style="fill:url(#linearGradient4);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 14.370845,113.54003 40.063381,128.40361 40.089371,98.620142 14.373443,83.743108 Z"
|
||||
id="path95"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient4);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 41.688502,66.548708 15.982938,81.389745 41.776189,96.281485 67.505093,81.426898 Z"
|
||||
id="path95-2"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient4);fill-opacity:1;stroke:none;stroke-width:0.705556;stroke-linecap:square"
|
||||
d="M 69.093798,113.5397 43.388301,128.38085 V 98.597387 L 69.117202,83.7428 Z"
|
||||
id="path95-9" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.0 KiB |
11
distrohop.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=distrohop
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=distrohop
|
||||
Restart=always
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
43
distrohop.toml
Normal file
@ -0,0 +1,43 @@
|
||||
search_threads = 4
|
||||
|
||||
[[repo]]
|
||||
refresh_schedule = "0 0 * * *" # Every day at 12:00 AM
|
||||
name = "debian-bookworm"
|
||||
type = "apt"
|
||||
base_url = "http://ftp.us.debian.org/debian"
|
||||
version = "bookworm"
|
||||
repos = ["main", "non-free", "contrib"]
|
||||
arch = ["amd64", "all"]
|
||||
|
||||
[[repo]]
|
||||
refresh_schedule = "15 0 * * *" # Every day at 12:15 AM
|
||||
name = "ubuntu-24.04"
|
||||
type = "apt"
|
||||
base_url = "http://mirror.math.ucdavis.edu/ubuntu"
|
||||
version = "noble"
|
||||
arch = ["amd64"]
|
||||
|
||||
[[repo]]
|
||||
refresh_schedule = "30 0 * * *" # Every day at 12:30 AM
|
||||
name = "fedora-40"
|
||||
type = "dnf"
|
||||
base_url = "https://dl.fedoraproject.org"
|
||||
version = "40"
|
||||
repos = ["Everything"]
|
||||
arch = ["x86_64"]
|
||||
|
||||
[[repo]]
|
||||
refresh_schedule = "45 0 * * *" # Every day at 12:45 AM
|
||||
name = "archlinux"
|
||||
type = "pacman"
|
||||
base_url = "https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch"
|
||||
repos = ["extra", "core", "multilib"]
|
||||
arch = ["x86_64"]
|
||||
|
||||
[[repo]]
|
||||
refresh_schedule = "0 1 * * *" # Every day at 1:00 AM
|
||||
name = "chaotic-aur"
|
||||
type = "pacman"
|
||||
base_url = "https://mirror.theash.xyz/chaotic-aur/$repo/$arch"
|
||||
repos = ["chaotic-aur"]
|
||||
arch = ["x86_64"]
|
27
docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
services:
|
||||
distrohop:
|
||||
image: gitea.elara.ws/elara6331/distrohop
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- ./data:/data
|
||||
# Uncomment this if you'd like to use a config file instead of environment variables
|
||||
# - ./distrohop.toml:/distrohop.toml
|
||||
environment:
|
||||
DISTROHOP_SEARCH_THREADS: 4
|
||||
# Debian Bookworm
|
||||
DISTROHOP_REPO_0_NAME: debian-bookworm
|
||||
DISTROHOP_REPO_0_REFRESH_SCHEDULE: 0 0 * * *
|
||||
DISTROHOP_REPO_0_TYPE: apt
|
||||
DISTROHOP_REPO_0_BASE_URL: http://ftp.us.debian.org/debian
|
||||
DISTROHOP_REPO_0_VERSION: bookworm
|
||||
DISTROHOP_REPO_0_REPOS: main,non-free,contrib
|
||||
DISTROHOP_REPO_0_ARCH: amd64,all
|
||||
# Fedora 40
|
||||
DISTROHOP_REPO_1_NAME: fedora-40
|
||||
DISTROHOP_REPO_1_REFRESH_SCHEDULE: 15 0 * * *
|
||||
DISTROHOP_REPO_1_TYPE: dnf
|
||||
DISTROHOP_REPO_1_BASE_URL: https://dl.fedoraproject.org
|
||||
DISTROHOP_REPO_1_VERSION: 40
|
||||
DISTROHOP_REPO_1_REPOS: Everything
|
||||
DISTROHOP_REPO_1_ARCH: x86_64
|
68
errors.go
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"go.elara.ws/salix"
|
||||
)
|
||||
|
||||
type httpError struct {
|
||||
error
|
||||
StatusCode int
|
||||
}
|
||||
|
||||
func handleErrJSON(fn func(w http.ResponseWriter, r *http.Request) error) http.HandlerFunc {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
err := fn(w, r)
|
||||
if err != nil {
|
||||
if he, ok := err.(httpError); ok {
|
||||
w.WriteHeader(he.StatusCode)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
}
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"error": err.Error(),
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func handleErrGUI(ns *salix.Namespace, fn func(w http.ResponseWriter, r *http.Request) error) http.HandlerFunc {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
err := fn(w, r)
|
||||
if err != nil {
|
||||
if he, ok := err.(httpError); ok {
|
||||
w.WriteHeader(he.StatusCode)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
}
|
||||
ns.ExecuteTemplate(w, "error.html", map[string]any{
|
||||
"page": "Error",
|
||||
"err": err.Error(),
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
67
go.mod
Normal file
@ -0,0 +1,67 @@
|
||||
module go.elara.ws/distrohop
|
||||
|
||||
go 1.23.3
|
||||
|
||||
require (
|
||||
github.com/caarlos0/env/v11 v11.2.2
|
||||
github.com/cespare/xxhash/v2 v2.3.0
|
||||
github.com/cockroachdb/pebble v1.1.2
|
||||
github.com/go-chi/chi/v5 v5.2.0
|
||||
github.com/go-chi/httprate v0.14.1
|
||||
github.com/go-co-op/gocron/v2 v2.15.0
|
||||
github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/pelletier/go-toml/v2 v2.0.5
|
||||
github.com/zeebo/sbloom v0.0.0-20151106181526-405c65bd9be0
|
||||
go.elara.ws/loggers v0.0.0-20240720233522-c61add53e1a3
|
||||
go.elara.ws/salix v0.0.0-20240607021720-944663c2b17e
|
||||
golang.org/x/sync v0.9.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/DataDog/zstd v1.4.5 // indirect
|
||||
github.com/STARRY-S/zip v0.2.1 // indirect
|
||||
github.com/andybalholm/brotli v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bodgit/plumbing v1.3.0 // indirect
|
||||
github.com/bodgit/sevenzip v1.6.0 // indirect
|
||||
github.com/bodgit/windows v1.0.1 // indirect
|
||||
github.com/cockroachdb/errors v1.11.3 // indirect
|
||||
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
|
||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect
|
||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/jonboulle/clockwork v0.4.0 // indirect
|
||||
github.com/klauspost/compress v1.17.11 // indirect
|
||||
github.com/klauspost/pgzip v1.2.6 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.21 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_golang v1.12.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/sorairolake/lzip-go v0.3.5 // indirect
|
||||
github.com/therootcompany/xz v1.0.1 // indirect
|
||||
github.com/ulikunitz/xz v0.5.12 // indirect
|
||||
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
|
||||
golang.org/x/sys v0.22.0 // indirect
|
||||
golang.org/x/term v0.22.0 // indirect
|
||||
golang.org/x/text v0.20.0 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
)
|
617
go.sum
Normal file
@ -0,0 +1,617 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
|
||||
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
|
||||
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
|
||||
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
|
||||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
|
||||
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
|
||||
github.com/STARRY-S/zip v0.2.1 h1:pWBd4tuSGm3wtpoqRZZ2EAwOmcHK6XFf7bU9qcJXyFg=
|
||||
github.com/STARRY-S/zip v0.2.1/go.mod h1:xNvshLODWtC4EJ702g7cTYn13G53o1+X9BWnPFpcWV4=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
|
||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
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/bodgit/plumbing v1.3.0 h1:pf9Itz1JOQgn7vEOE7v7nlEfBykYqvUYioC61TwWCFU=
|
||||
github.com/bodgit/plumbing v1.3.0/go.mod h1:JOTb4XiRu5xfnmdnDJo6GmSbSbtSyufrsyZFByMtKEs=
|
||||
github.com/bodgit/sevenzip v1.6.0 h1:a4R0Wu6/P1o1pP/3VV++aEOcyeBxeO/xE2Y9NSTrr6A=
|
||||
github.com/bodgit/sevenzip v1.6.0/go.mod h1:zOBh9nJUof7tcrlqJFv1koWRrhz3LbDbUNngkuZxLMc=
|
||||
github.com/bodgit/windows v1.0.1 h1:tF7K6KOluPYygXa3Z2594zxlkbKPAOvqr97etrGNIz4=
|
||||
github.com/bodgit/windows v1.0.1/go.mod h1:a6JLwrB4KrTR5hBpp8FI9/9W9jJfeQ2h4XDXU74ZCdM=
|
||||
github.com/caarlos0/env/v11 v11.2.2 h1:95fApNrUyueipoZN/EhA8mMxiNxrBwDa+oAZrMWl3Kg=
|
||||
github.com/caarlos0/env/v11 v11.2.2/go.mod h1:JBfcdeQiBoI3Zh1QRAWfe+tpiNTmDtcCj/hHHHMx0vc=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4=
|
||||
github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
|
||||
github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I=
|
||||
github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8=
|
||||
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4=
|
||||
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M=
|
||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
|
||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
|
||||
github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA=
|
||||
github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU=
|
||||
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
|
||||
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4=
|
||||
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
|
||||
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
|
||||
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
|
||||
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=
|
||||
github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-chi/httprate v0.14.1 h1:EKZHYEZ58Cg6hWcYzoZILsv7ppb46Wt4uQ738IRtpZs=
|
||||
github.com/go-chi/httprate v0.14.1/go.mod h1:TUepLXaz/pCjmCtf/obgOQJ2Sz6rC8fSf5cAt5cnTt0=
|
||||
github.com/go-co-op/gocron/v2 v2.15.0 h1:Kpvo71VSihE+RImmpA+3ta5CcMhoRzMGw4dJawrj4zo=
|
||||
github.com/go-co-op/gocron/v2 v2.15.0/go.mod h1:ZF70ZwEqz0OO4RBXE1sNxnANy/zvwLcattWEFsqpKig=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
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.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
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/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
|
||||
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
|
||||
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d h1:Vw3f39TqFSQLA+OyW+8SouppHTYzX8/fDv6Ao8uj3Ho=
|
||||
github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d/go.mod h1:j/Ire/jm42GN7h90F5kzj6hf6ZFzEH66de+hmjEKu+I=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78 h1:MYzLheyVx1tJVDqfu3YnN4jtnyALNzLvwl+f58TcvQY=
|
||||
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
|
||||
github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
|
||||
github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
||||
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
||||
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_golang v1.12.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg=
|
||||
github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y=
|
||||
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
|
||||
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
|
||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sorairolake/lzip-go v0.3.5 h1:ms5Xri9o1JBIWvOFAorYtUNik6HI3HgBTkISiqu0Cwg=
|
||||
github.com/sorairolake/lzip-go v0.3.5/go.mod h1:N0KYq5iWrMXI0ZEXKXaS9hCyOjZUQdBDEIbXfoUwbdk=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw=
|
||||
github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY=
|
||||
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
|
||||
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
|
||||
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/zeebo/sbloom v0.0.0-20151106181526-405c65bd9be0 h1:EAluI/s9FYrMnDGmyXB6eKkjSNyn7lmSdvX975YHZnY=
|
||||
github.com/zeebo/sbloom v0.0.0-20151106181526-405c65bd9be0/go.mod h1:J0OA/x7vNUsWZ88/oJ0BPtebbGfjvSW1lA07GinZNLM=
|
||||
go.elara.ws/loggers v0.0.0-20240720233522-c61add53e1a3 h1:z69Dh0KTwZF6JPbMhwwzN2ifiMPLGQtD8NjriFUv0k0=
|
||||
go.elara.ws/loggers v0.0.0-20240720233522-c61add53e1a3/go.mod h1:sRtfSVC2elu+igeuceKY8b0cIb4NcWo9OUa5+WyLcxk=
|
||||
go.elara.ws/salix v0.0.0-20240607021720-944663c2b17e h1:/VtE+j9BGSNmJ9yRsBlgVv2gqSRQlRTzOmgfjNiDtIk=
|
||||
go.elara.ws/salix v0.0.0-20240607021720-944663c2b17e/go.mod h1:niWia13iw7qDrS1C1mlqv5hxO1sunt8CcOQAB5yVlNU=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc=
|
||||
go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY=
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/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.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
|
||||
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
|
||||
golang.org/x/sys v0.22.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.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
|
||||
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
|
||||
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
|
||||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
94
internal/config/config.go
Normal file
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/caarlos0/env/v11"
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
SearchThreads int `toml:"searchThreads" env:"SEARCH_THREADS"`
|
||||
Repos []Repo `toml:"repo" envPrefix:"REPO"`
|
||||
}
|
||||
|
||||
type Repo struct {
|
||||
Name string `toml:"name" env:"NAME"`
|
||||
Type string `toml:"type" env:"TYPE"`
|
||||
BaseURL string `toml:"base_url" env:"BASE_URL"`
|
||||
Version string `toml:"version" env:"VERSION"`
|
||||
Repos []string `toml:"repos" env:"REPOS"`
|
||||
Architectures []string `toml:"arch" env:"ARCHES"`
|
||||
RefreshSchedule string `toml:"refresh_schedule" env:"REFRESH_SCHEDULE"`
|
||||
}
|
||||
|
||||
func Load() (cfg *Config, err error) {
|
||||
cfg = &Config{
|
||||
SearchThreads: 4,
|
||||
}
|
||||
|
||||
if fl, err := os.Open("/etc/distrohop.toml"); err == nil {
|
||||
err = toml.NewDecoder(fl).Decode(cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
cfgDir := "/distrohop.toml"
|
||||
if os.Getenv("RUNNING_IN_DOCKER") != "true" {
|
||||
cfgDir, err = os.UserConfigDir()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if fl, err := os.Open(filepath.Join(cfgDir, "distrohop.toml")); err == nil {
|
||||
err = toml.NewDecoder(fl).Decode(cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = env.ParseWithOptions(cfg, env.Options{Prefix: "DISTROHOP_"})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for i, repo := range cfg.Repos {
|
||||
if len(repo.Architectures) == 0 {
|
||||
repo.Architectures = []string{""}
|
||||
}
|
||||
if len(repo.Repos) == 0 {
|
||||
repo.Repos = []string{""}
|
||||
}
|
||||
if repo.RefreshSchedule == "" {
|
||||
repo.RefreshSchedule = "0 0 * * *"
|
||||
}
|
||||
cfg.Repos[i] = repo
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
114
internal/index/apt.go
Normal file
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package index
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/mholt/archives"
|
||||
"go.elara.ws/distrohop/internal/tags"
|
||||
)
|
||||
|
||||
type APT struct{}
|
||||
|
||||
func (APT) Name() string {
|
||||
return "apt"
|
||||
}
|
||||
|
||||
func (APT) IndexURL(baseURL, version, repo, arch string) ([]string, error) {
|
||||
indexURL, err := url.JoinPath(baseURL, "dists", version, repo, "Contents-"+arch+".gz")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Before Debian Wheezy, the path to Contents indices didn't include $COMP/repo, so we need to try
|
||||
// both the new and old URL formats. Ubuntu also still uses the pre-Debian-Wheezy convention.
|
||||
deprecatedURL, err := url.JoinPath(baseURL, "dists", version, "Contents-"+arch+".gz")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []string{indexURL, deprecatedURL}, nil
|
||||
}
|
||||
|
||||
func (APT) ReadPkgData(r io.Reader, out chan Record) {
|
||||
ctx := context.Background()
|
||||
format, r, err := archives.Identify(ctx, "", r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
decomp, ok := format.(archives.Decompressor)
|
||||
if !ok {
|
||||
out <- Record{Error: errors.New("downloaded index is not a valid compressed file")}
|
||||
return
|
||||
}
|
||||
|
||||
dr, err := decomp.OpenReader(r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
defer dr.Close()
|
||||
|
||||
br := bufio.NewReader(dr)
|
||||
for {
|
||||
line, err := br.ReadString('\n')
|
||||
if errors.Is(err, io.EOF) {
|
||||
close(out)
|
||||
break
|
||||
} else if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
lastSpaceIdx := strings.LastIndexByte(line, ' ')
|
||||
if lastSpaceIdx == -1 {
|
||||
continue
|
||||
}
|
||||
|
||||
fpath := "/" + strings.TrimSpace(line[:lastSpaceIdx])
|
||||
names := strings.Split(strings.TrimSpace(line[lastSpaceIdx+1:]), ",")
|
||||
for _, name := range names {
|
||||
slashIdx := strings.LastIndexByte(name, '/')
|
||||
if slashIdx != -1 {
|
||||
name = name[slashIdx+1:]
|
||||
}
|
||||
|
||||
if strings.Contains(fpath, "changelog.Debian") ||
|
||||
strings.Contains(fpath, "README.Debian") ||
|
||||
strings.Contains(fpath, "NEWS.Debian.gz") {
|
||||
continue
|
||||
}
|
||||
|
||||
out <- Record{
|
||||
Name: name,
|
||||
Tags: tags.Generate(fpath),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
154
internal/index/dnf.go
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package index
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/mholt/archives"
|
||||
"go.elara.ws/distrohop/internal/tags"
|
||||
)
|
||||
|
||||
type repomd struct {
|
||||
Locations []location `xml:"data>location"`
|
||||
}
|
||||
|
||||
type location struct {
|
||||
Href string `xml:"href,attr"`
|
||||
}
|
||||
|
||||
func (r repomd) getGzipFile() string {
|
||||
for _, loc := range r.Locations {
|
||||
if strings.HasSuffix(loc.Href, "filelists.xml.gz") {
|
||||
return loc.Href
|
||||
}
|
||||
}
|
||||
return "<unknown>"
|
||||
}
|
||||
|
||||
type DNF struct{}
|
||||
|
||||
func (DNF) Name() string {
|
||||
return "dnf"
|
||||
}
|
||||
|
||||
func (DNF) IndexURL(baseURL, version, repo, arch string) ([]string, error) {
|
||||
u, err := url.ParseRequestURI(baseURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
repomdPath := fmt.Sprintf("/pub/fedora/linux/releases/%s/%s/%s/os/repodata/repomd.xml", version, repo, arch)
|
||||
u.Path = repomdPath
|
||||
|
||||
res, err := http.Get(u.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
var data repomd
|
||||
err = xml.NewDecoder(res.Body).Decode(&data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gzipFile := data.getGzipFile()
|
||||
if gzipFile == "" {
|
||||
return nil, errors.New("no gzip file found in repomd.xml")
|
||||
}
|
||||
|
||||
u.Path = fmt.Sprintf("/pub/fedora/linux/releases/%s/%s/%s/os/%s", version, repo, arch, gzipFile)
|
||||
return []string{u.String()}, nil
|
||||
}
|
||||
|
||||
func (DNF) ReadPkgData(r io.Reader, out chan Record) {
|
||||
ctx := context.Background()
|
||||
format, r, err := archives.Identify(ctx, "", r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
decomp, ok := format.(archives.Decompressor)
|
||||
if !ok {
|
||||
out <- Record{Error: errors.New("downloaded index is not a valid compressed file")}
|
||||
return
|
||||
}
|
||||
|
||||
dr, err := decomp.OpenReader(r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
defer dr.Close()
|
||||
|
||||
br := bufio.NewReader(dr)
|
||||
var currentPkg string
|
||||
|
||||
for {
|
||||
line, err := br.ReadString('\n')
|
||||
if errors.Is(err, io.EOF) {
|
||||
close(out)
|
||||
break
|
||||
} else if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
line = strings.TrimSpace(line)
|
||||
|
||||
switch {
|
||||
case strings.HasPrefix(line, "<file"):
|
||||
// Skip directories and symlinks
|
||||
if strings.HasPrefix(line[5:], `type="dir"`) || line[5] == 'l' {
|
||||
continue
|
||||
}
|
||||
|
||||
start := strings.IndexByte(line, '>') + 1
|
||||
end := strings.LastIndexByte(line, '<')
|
||||
fpath := line[start:end]
|
||||
|
||||
if strings.Contains(fpath, ".build-id") {
|
||||
continue
|
||||
}
|
||||
|
||||
out <- Record{
|
||||
Name: currentPkg,
|
||||
Tags: tags.Generate(fpath),
|
||||
}
|
||||
case strings.HasPrefix(line, "<package"):
|
||||
start := strings.LastIndex(line, `name="`) + 6
|
||||
end := start + strings.IndexByte(line[start:], '"')
|
||||
currentPkg = line[start:end]
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
60
internal/index/index.go
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package index
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
// Record represents a data record for a single package
|
||||
type Record struct {
|
||||
Name string
|
||||
Tags []string
|
||||
Error error
|
||||
}
|
||||
|
||||
type Importer interface {
|
||||
// Name returns the name of the importer
|
||||
Name() string
|
||||
// IndexURL generates a list of possible index URLs to try
|
||||
IndexURL(baseURL, version, repo, arch string) ([]string, error)
|
||||
// ReadPkgData reads data from an index file and sends it on out
|
||||
ReadPkgData(r io.Reader, out chan Record)
|
||||
}
|
||||
|
||||
var importers = []Importer{
|
||||
APT{},
|
||||
DNF{},
|
||||
Pacman{},
|
||||
}
|
||||
|
||||
// GetImporter gets an importer by its name
|
||||
func GetImporter(name string) (Importer, error) {
|
||||
for _, importer := range importers {
|
||||
if importer.Name() == name {
|
||||
return importer, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("no such importer: %q", name)
|
||||
}
|
145
internal/index/pacman.go
Normal file
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package index
|
||||
|
||||
import (
|
||||
"archive/tar"
|
||||
"bufio"
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/mholt/archives"
|
||||
"go.elara.ws/distrohop/internal/tags"
|
||||
)
|
||||
|
||||
type Pacman struct{}
|
||||
|
||||
func (Pacman) Name() string {
|
||||
return "pacman"
|
||||
}
|
||||
|
||||
func (Pacman) IndexURL(baseURL, version, repo, arch string) ([]string, error) {
|
||||
baseURL = os.Expand(baseURL, func(s string) string {
|
||||
switch s {
|
||||
case "repo":
|
||||
return repo
|
||||
case "arch":
|
||||
return arch
|
||||
}
|
||||
return "$" + s
|
||||
})
|
||||
|
||||
u, err := url.ParseRequestURI(baseURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
filePath, err := url.JoinPath(u.Path, repo+".files")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
u.Path = filePath
|
||||
return []string{u.String()}, nil
|
||||
}
|
||||
|
||||
func (Pacman) ReadPkgData(r io.Reader, out chan Record) {
|
||||
ctx := context.Background()
|
||||
format, r, err := archives.Identify(ctx, "", r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
decomp, ok := format.(archives.Decompressor)
|
||||
if !ok {
|
||||
out <- Record{Error: errors.New("downloaded index is not a valid compressed file")}
|
||||
return
|
||||
}
|
||||
|
||||
dr, err := decomp.OpenReader(r)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
defer dr.Close()
|
||||
|
||||
tr := tar.NewReader(dr)
|
||||
var currentPkg string
|
||||
|
||||
for {
|
||||
hdr, err := tr.Next()
|
||||
if errors.Is(err, io.EOF) {
|
||||
close(out)
|
||||
break
|
||||
} else if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
switch path.Base(hdr.Name) {
|
||||
case "desc":
|
||||
data, err := io.ReadAll(tr)
|
||||
if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
labelIdx := bytes.Index(data, []byte("%NAME%\n"))
|
||||
if labelIdx == -1 {
|
||||
continue
|
||||
}
|
||||
|
||||
start := labelIdx + 7
|
||||
end := start + bytes.IndexByte(data[start:], '\n')
|
||||
currentPkg = string(data[start:end])
|
||||
case "files":
|
||||
br := bufio.NewReader(tr)
|
||||
for {
|
||||
fpath, err := br.ReadString('\n')
|
||||
if errors.Is(err, io.EOF) {
|
||||
break
|
||||
} else if err != nil {
|
||||
out <- Record{Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
fpath = strings.TrimSpace(fpath)
|
||||
if fpath == "%FILES%" || strings.HasSuffix(fpath, "/") {
|
||||
continue
|
||||
}
|
||||
|
||||
fpath = "/" + fpath
|
||||
|
||||
out <- Record{
|
||||
Name: currentPkg,
|
||||
Tags: tags.Generate(fpath),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
208
internal/pull/pull.go
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package pull
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/zeebo/sbloom"
|
||||
"go.elara.ws/distrohop/internal/index"
|
||||
"go.elara.ws/distrohop/internal/store"
|
||||
)
|
||||
|
||||
const batchSize = 5000
|
||||
|
||||
// ErrUpToDate is returned when a repository index is already
|
||||
// up to date and doesn't require a pull.
|
||||
var ErrUpToDate = errors.New("repository is already up to date")
|
||||
|
||||
// Options represents settings for pull operations
|
||||
type Options struct {
|
||||
BaseURL string
|
||||
Version string
|
||||
Repo string
|
||||
Architecture string
|
||||
ProgressFunc func(title string, received, total int64)
|
||||
}
|
||||
|
||||
// progressReader keeps track of download progress and calls
|
||||
// progressFn with the current progress data.
|
||||
type progressReader struct {
|
||||
r io.Reader
|
||||
title string
|
||||
received int64
|
||||
total int64
|
||||
progressFn func(title string, received, total int64)
|
||||
}
|
||||
|
||||
func (pr *progressReader) Read(b []byte) (int, error) {
|
||||
n, err := pr.r.Read(b)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
pr.received += int64(n)
|
||||
pr.progressFn(pr.title, pr.received, pr.total)
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// Pull synchronizes a repository index from a remote repository and atomically updates the store.
|
||||
// If the index is already up to date, it returns [ErrUpToDate]. If opts.ProgressFunc is set,
|
||||
// Pull will call it continuously with the current progress of the pull operation. The original store
|
||||
// remains usable and unmodified until the pull operation completes successfully. It will only be
|
||||
// blocked for the duration of the atomic replacement operation.
|
||||
func Pull(opts Options, s *store.Store, importer index.Importer) error {
|
||||
indexURLs, err := importer.IndexURL(opts.BaseURL, opts.Version, opts.Repo, opts.Architecture)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var (
|
||||
res *http.Response
|
||||
errs []error
|
||||
)
|
||||
for _, indexURL := range indexURLs {
|
||||
ires, err := http.Get(indexURL)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if ires.StatusCode != 200 {
|
||||
errs = append(errs, fmt.Errorf("http: %s", ires.Status))
|
||||
continue
|
||||
} else {
|
||||
res = ires
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if res == nil {
|
||||
return errors.Join(errs...)
|
||||
} else {
|
||||
defer res.Body.Close()
|
||||
}
|
||||
|
||||
repoKey := strings.Trim(opts.Version+"/"+opts.Repo+"/"+opts.Architecture, "/")
|
||||
|
||||
if meta, err := s.GetMeta(); err == nil {
|
||||
// If the ETag stored in the database is the same as the one we got from the
|
||||
// HTTP response, the repo is up to date.
|
||||
if etag := res.Header.Get("ETag"); etag != "" && etag == meta.ETag {
|
||||
return ErrUpToDate
|
||||
}
|
||||
|
||||
if lastModStr := res.Header.Get("Last-Modified"); lastModStr != "" && !meta.LastModified.IsZero() {
|
||||
lastMod, err := time.Parse(time.RFC1123, lastModStr)
|
||||
// If the last modified time from the HTTP response is before
|
||||
// or equal to the time in the database, the repo is up to date.
|
||||
if err == nil && meta.LastModified.Compare(lastMod) >= 0 {
|
||||
return ErrUpToDate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dir, err := os.MkdirTemp(filepath.Dir(s.Path), "distrohop-pull.*")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s2, err := store.Open(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var r io.Reader = res.Body
|
||||
if opts.ProgressFunc != nil {
|
||||
r = &progressReader{
|
||||
r: res.Body,
|
||||
title: repoKey,
|
||||
total: res.ContentLength,
|
||||
progressFn: opts.ProgressFunc,
|
||||
}
|
||||
}
|
||||
|
||||
out := make(chan index.Record)
|
||||
go importer.ReadPkgData(r, out)
|
||||
|
||||
filters := map[byte]*sbloom.Filter{}
|
||||
|
||||
i := 0
|
||||
collected := make(map[string]index.Record, batchSize)
|
||||
for rec := range out {
|
||||
if rec.Error != nil {
|
||||
return rec.Error
|
||||
}
|
||||
|
||||
curRec, ok := collected[rec.Name]
|
||||
if !ok {
|
||||
collected[rec.Name] = rec
|
||||
} else {
|
||||
curRec.Tags = append(curRec.Tags, rec.Tags...)
|
||||
collected[rec.Name] = curRec
|
||||
}
|
||||
|
||||
if i >= batchSize {
|
||||
err = s2.WriteBatch(collected, filters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
clear(collected)
|
||||
i = 0
|
||||
}
|
||||
|
||||
i++
|
||||
}
|
||||
|
||||
if len(collected) != 0 {
|
||||
err = s2.WriteBatch(collected, filters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = s2.WriteFilters(filters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
meta := store.RepoMeta{ETag: res.Header.Get("ETag")}
|
||||
|
||||
if lastMod := res.Header.Get("Last-Modified"); lastMod != "" {
|
||||
meta.LastModified, err = time.Parse(time.RFC1123, lastMod)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := s2.WriteMeta(meta); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return s.Replace(s2)
|
||||
}
|
72
internal/store/cached/cached.go
Normal file
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package cached
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/patrickmn/go-cache"
|
||||
"go.elara.ws/distrohop/internal/store"
|
||||
)
|
||||
|
||||
var _ store.ReadOnly = (*Store)(nil)
|
||||
|
||||
// cacheRecord represents a single item stored in the cache
|
||||
type cacheRecord struct {
|
||||
results []store.TagResult
|
||||
latency time.Duration
|
||||
}
|
||||
|
||||
// Store represents a cached store that caches search results from [go.elara.ws/distrohop/internal/store.ReadOnly] instances.
|
||||
// It implements [go.elara.ws/distrohop/internal/store.ReadOnly].
|
||||
type Store struct {
|
||||
store.ReadOnly
|
||||
cache *cache.Cache
|
||||
}
|
||||
|
||||
// New creates a new cached store with the provided cache settings and underlying store.
|
||||
func New(s store.ReadOnly, exp, cleanup time.Duration) Store {
|
||||
return Store{
|
||||
ReadOnly: s,
|
||||
cache: cache.New(exp, cleanup),
|
||||
}
|
||||
}
|
||||
|
||||
// Search retrieves cached search results for the given tags. If the search doesn't exist
|
||||
// in the cache, it queries the underlying store and adds the results to the cache.
|
||||
func (cs Store) Search(tags []string) ([]store.TagResult, time.Duration, error) {
|
||||
cacheKey := strings.Join(tags, "\x1F")
|
||||
if results, ok := cs.cache.Get(cacheKey); ok {
|
||||
record := results.(cacheRecord)
|
||||
return record.results, record.latency, nil
|
||||
}
|
||||
res, latency, err := cs.ReadOnly.Search(tags)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
if len(res) != 0 {
|
||||
cs.cache.Set(cacheKey, cacheRecord{res, latency}, cache.DefaultExpiration)
|
||||
}
|
||||
return res, latency, nil
|
||||
}
|
134
internal/store/combined/combined.go
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package combined
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/pebble"
|
||||
"go.elara.ws/distrohop/internal/store"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
var _ store.ReadOnly = (*Store)(nil)
|
||||
|
||||
var ErrNotFound = errors.New("no such package")
|
||||
|
||||
// Store represents a combined store that aggregates multiple individual [go.elara.ws/distrohop/internal/store.Store] instances.
|
||||
// It implements [go.elara.ws/distrohop/internal/store.ReadOnly].
|
||||
type Store struct {
|
||||
Stores []store.ReadOnly
|
||||
}
|
||||
|
||||
// New creates a new combined store with the provided individual stores.
|
||||
func New(stores ...store.ReadOnly) *Store {
|
||||
return &Store{stores}
|
||||
}
|
||||
|
||||
// Add adds a new store to the combined store.
|
||||
func (cs *Store) Add(s store.ReadOnly) {
|
||||
cs.Stores = append(cs.Stores, s)
|
||||
}
|
||||
|
||||
// GetPkg retrieves a package by name from any of the stores in the combined store.
|
||||
// If the package is not found in any store, it returns [github.com/cockroachdb/pebble.ErrNotFound].
|
||||
func (cs *Store) GetPkg(name string) (out store.Package, err error) {
|
||||
mtx := &sync.Mutex{}
|
||||
wg := &errgroup.Group{}
|
||||
for _, s := range cs.Stores {
|
||||
wg.Go(func() error {
|
||||
if pkg, err := s.GetPkg(name); err == nil {
|
||||
mtx.Lock()
|
||||
out = pkg
|
||||
mtx.Unlock()
|
||||
} else if !errors.Is(err, pebble.ErrNotFound) {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
if err := wg.Wait(); err != nil {
|
||||
return out, err
|
||||
} else if out.Name == "" {
|
||||
return out, fmt.Errorf("%w: %q", ErrNotFound, name)
|
||||
} else {
|
||||
return out, nil
|
||||
}
|
||||
}
|
||||
|
||||
// GetPkgNamesByPrefix retrieves package names that match the given prefix from all stores.
|
||||
// It returns a slice of package names limited to the specified number n.
|
||||
func (cs *Store) GetPkgNamesByPrefix(prefix string, n int) (out []string, err error) {
|
||||
mtx := &sync.Mutex{}
|
||||
wg := &errgroup.Group{}
|
||||
for _, s := range cs.Stores {
|
||||
wg.Go(func() error {
|
||||
names, err := s.GetPkgNamesByPrefix(prefix, n)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
mtx.Lock()
|
||||
out = append(out, names...)
|
||||
mtx.Unlock()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
if err := wg.Wait(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
slices.Sort(out)
|
||||
if len(out) > n {
|
||||
out = out[:n]
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Search searches for packages across all stores based on the provided tags.
|
||||
// It returns a slice of search results and an error.
|
||||
func (cs *Store) Search(tags []string) (out []store.TagResult, latency time.Duration, err error) {
|
||||
mtx := &sync.Mutex{}
|
||||
wg := &errgroup.Group{}
|
||||
for _, s := range cs.Stores {
|
||||
wg.Go(func() error {
|
||||
results, dur, err := s.Search(tags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
mtx.Lock()
|
||||
latency += dur
|
||||
out = append(out, results...)
|
||||
mtx.Unlock()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
if err := wg.Wait(); err != nil {
|
||||
return nil, latency, err
|
||||
} else {
|
||||
store.SortResults(out)
|
||||
return out, latency, nil
|
||||
}
|
||||
}
|
236
internal/store/search.go
Normal file
@ -0,0 +1,236 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cespare/xxhash/v2"
|
||||
"github.com/cockroachdb/pebble"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gob.Register(&xxhash.Digest{})
|
||||
}
|
||||
|
||||
var ErrInvalidTag = errors.New("invalid tag format")
|
||||
|
||||
var (
|
||||
// startChars is a list of all the possible package name starting characters
|
||||
startChars = [...]byte{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
}
|
||||
// iterOpts contains iterator options with bounds defined such that
|
||||
// they cover all packages starting with each character defined
|
||||
// in startChars
|
||||
iterOpts = make([]*pebble.IterOptions, len(startChars))
|
||||
// tagRegex validates the format of a given tag
|
||||
tagRegex = regexp.MustCompile(`\w+=.+`)
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Populate the iterOpts slice
|
||||
for i, char := range startChars {
|
||||
iterOpts[i] = &pebble.IterOptions{
|
||||
LowerBound: []byte{char},
|
||||
UpperBound: []byte{char + 1},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TagResult represents the result of a tag search, including confidence and overlapping tags.
|
||||
type TagResult struct {
|
||||
// The confidence score for the tag match. This value will always be between 0 and 1.
|
||||
Confidence float32
|
||||
// A list of overlapping tags
|
||||
Overlap []string
|
||||
// The package associated with the tag result
|
||||
Package Package
|
||||
}
|
||||
|
||||
// Search searches for packages in the store that match the given tags.
|
||||
// Each tag must be in the format "key=value", and an error is returned
|
||||
// if any tag does not conform to this format. The function spawns multiple
|
||||
// worker goroutines (defined by s.SearchThreads) to perform a concurrent search.
|
||||
// The result is a list of [TagResult] structs representing the matching packages.
|
||||
func (s *Store) Search(tags []string) ([]TagResult, time.Duration, error) {
|
||||
start := time.Now()
|
||||
for _, tag := range tags {
|
||||
if !tagRegex.MatchString(tag) {
|
||||
return nil, 0, fmt.Errorf("%w: %q", ErrInvalidTag, tag)
|
||||
}
|
||||
}
|
||||
|
||||
optsMtx := &sync.Mutex{}
|
||||
opts := iterOpts
|
||||
|
||||
var results []TagResult
|
||||
resultsMtx := &sync.Mutex{}
|
||||
wg := &sync.WaitGroup{}
|
||||
errs := make(chan error)
|
||||
for range s.SearchThreads {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
optsMtx.Lock()
|
||||
if len(opts) == 0 {
|
||||
// If we have no more options structs left,
|
||||
// we can exit the goroutine
|
||||
optsMtx.Unlock()
|
||||
return
|
||||
}
|
||||
opt := opts[0]
|
||||
opts = opts[1:]
|
||||
optsMtx.Unlock()
|
||||
|
||||
found := false
|
||||
if filter, err := s.GetFilter(opt.LowerBound[0]); err == nil {
|
||||
for _, tag := range tags {
|
||||
if filter.Lookup(unsafeBytes(tag)) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
} else if !errors.Is(err, pebble.ErrNotFound) {
|
||||
errs <- err
|
||||
return
|
||||
}
|
||||
|
||||
// Skip the current chunk if the bloom filter
|
||||
// doesn't contain any of the tags, or if it doesn't
|
||||
// exist, which indicates that there are no packages
|
||||
// with the starting character we're looking for.
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
|
||||
// Create a new iterator that scans through the range defined in opt
|
||||
iter, err := s.db.NewIter(opt)
|
||||
if err != nil {
|
||||
errs <- err
|
||||
return
|
||||
}
|
||||
|
||||
var out []TagResult
|
||||
for iter.First(); iter.Valid(); iter.Next() {
|
||||
val, err := iter.ValueAndErr()
|
||||
if err != nil {
|
||||
errs <- err
|
||||
iter.Close()
|
||||
return
|
||||
}
|
||||
|
||||
// Convert the tag data to a string using an unsafe operation
|
||||
// so that we can split it by the unit separator character
|
||||
// and check if it has overlap without incurring the cost
|
||||
// of copying the value for a string conversion.
|
||||
//
|
||||
// If we find that there's overlap, we'll copy the data
|
||||
// later, before returning it.
|
||||
ptags := strings.Split(unsafeString(val), "\x1F")
|
||||
overlapTags, conf := overlap(tags, ptags)
|
||||
if conf == 0 {
|
||||
// If the confidence is zero, there's no overlap,
|
||||
// so we can continue to the next value
|
||||
continue
|
||||
}
|
||||
|
||||
out = append(out, TagResult{
|
||||
Confidence: conf,
|
||||
Overlap: overlapTags,
|
||||
Package: Package{
|
||||
Name: string(iter.Key()),
|
||||
// We need to do a deep copy here because we previously
|
||||
// used an unsafe operation to convert the tag data to
|
||||
// a string, and the values created by that will be
|
||||
// invalidated when the iterator is closed.
|
||||
Tags: cloneStringSlice(ptags),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if err := iter.Error(); err != nil {
|
||||
errs <- err
|
||||
iter.Close()
|
||||
return
|
||||
}
|
||||
|
||||
iter.Close()
|
||||
resultsMtx.Lock()
|
||||
results = append(results, out...)
|
||||
resultsMtx.Unlock()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
wg.Wait()
|
||||
close(done)
|
||||
}()
|
||||
|
||||
select {
|
||||
case err := <-errs:
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
case <-done:
|
||||
SortResults(results)
|
||||
return results, time.Since(start), nil
|
||||
}
|
||||
|
||||
SortResults(results)
|
||||
return results, time.Since(start), nil
|
||||
}
|
||||
|
||||
// SortResults sorts tag results by confidence
|
||||
func SortResults(results []TagResult) {
|
||||
slices.SortFunc(results, func(a, b TagResult) int {
|
||||
if a.Confidence < b.Confidence {
|
||||
return 1
|
||||
} else if a.Confidence > b.Confidence {
|
||||
return -1
|
||||
} else {
|
||||
return strings.Compare(a.Package.Name, b.Package.Name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// cloneStringSlice creates a deep copy of a slice of strings
|
||||
func cloneStringSlice(s []string) []string {
|
||||
out := make([]string, len(s))
|
||||
for i := 0; i < len(s); i++ {
|
||||
out[i] = strings.Clone(s[i])
|
||||
}
|
||||
return out
|
||||
}
|
389
internal/store/store.go
Normal file
@ -0,0 +1,389 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/cespare/xxhash/v2"
|
||||
"github.com/cockroachdb/pebble"
|
||||
"github.com/zeebo/sbloom"
|
||||
"go.elara.ws/distrohop/internal/index"
|
||||
)
|
||||
|
||||
// ErrBlocked is returned when a store's database is being updated
|
||||
var ErrBlocked = errors.New("database is being updated; please try again later")
|
||||
|
||||
func init() {
|
||||
gob.Register(&xxhash.Digest{})
|
||||
}
|
||||
|
||||
// Package represents a software package with a name and associated tags
|
||||
type Package struct {
|
||||
// The name of the package
|
||||
Name string
|
||||
// A list of tags associated with the package
|
||||
Tags []string
|
||||
}
|
||||
|
||||
type nopLogger struct{}
|
||||
|
||||
func (nopLogger) Infof(string, ...any) {}
|
||||
func (nopLogger) Fatalf(string, ...any) {}
|
||||
|
||||
// ReadOnly represents a read-only package store
|
||||
type ReadOnly interface {
|
||||
GetPkg(name string) (Package, error)
|
||||
GetPkgNamesByPrefix(prefix string, n int) ([]string, error)
|
||||
Search(tags []string) ([]TagResult, time.Duration, error)
|
||||
}
|
||||
|
||||
// Store represents persistent storage for package data
|
||||
type Store struct {
|
||||
Path string
|
||||
db *pebble.DB
|
||||
|
||||
// blocked is used to ensure that all other operations finish
|
||||
// running before a [Store.Replace] operation, and cannot
|
||||
// start running until the replace operation is completed.
|
||||
// [Store.Replace] does a write lock on the RWMutex. All
|
||||
// other operations do read locks.
|
||||
blocked sync.RWMutex
|
||||
|
||||
// SearchThreads is the number of worker goroutines to be used
|
||||
// for searching the database for a tag. The default is 4.
|
||||
SearchThreads int
|
||||
}
|
||||
|
||||
// Open initializes and opens a [Store] at the specified path
|
||||
func Open(path string) (*Store, error) {
|
||||
db, err := pebble.Open(path, &pebble.Options{Logger: nopLogger{}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Store{
|
||||
Path: path,
|
||||
db: db,
|
||||
SearchThreads: 4,
|
||||
}, err
|
||||
}
|
||||
|
||||
// WriteBatch writes a batch of index records to the store.
|
||||
// It merges existing tags with new ones and ensures they're unique.
|
||||
func (s *Store) WriteBatch(batch map[string]index.Record, filters map[byte]*sbloom.Filter) error {
|
||||
if !s.blocked.TryRLock() {
|
||||
return ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
b := s.db.NewBatch()
|
||||
defer b.Close()
|
||||
|
||||
for _, item := range batch {
|
||||
if len(item.Name) == 0 || len(item.Tags) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
key := unsafeBytes(item.Name)
|
||||
|
||||
curVal, cl, err := s.db.Get(key)
|
||||
if err == pebble.ErrNotFound {
|
||||
// Remove any duplicate tags
|
||||
slices.Sort(item.Tags)
|
||||
tags := slices.Compact(item.Tags)
|
||||
// Write the new package to the database
|
||||
err := b.Set(key, joinTags(item.Name[0], tags, filters), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else if err != nil {
|
||||
return err
|
||||
} else {
|
||||
// Since the package already exists in the database, combine its existing
|
||||
// tags with the ones we just got
|
||||
tags := strings.Split(unsafeString(curVal), "\x1F")
|
||||
tags = append(tags, item.Tags...)
|
||||
// Remove any duplicate tags
|
||||
slices.Sort(tags)
|
||||
tags = slices.Compact(tags)
|
||||
// Write the updated package to the database
|
||||
err := b.Set(key, joinTags(item.Name[0], tags, filters), nil)
|
||||
if err != nil {
|
||||
cl.Close()
|
||||
return err
|
||||
}
|
||||
cl.Close()
|
||||
}
|
||||
}
|
||||
// Commit the batch to persistent storage
|
||||
return b.Commit(nil)
|
||||
}
|
||||
|
||||
// WriteFilters writes bloom filters for each package name starting character
|
||||
// to the database.
|
||||
func (s *Store) WriteFilters(filters map[byte]*sbloom.Filter) error {
|
||||
if !s.blocked.TryRLock() {
|
||||
return ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
for firstChar, filter := range filters {
|
||||
data, err := filter.GobEncode()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = s.db.Set([]byte{0x02, firstChar}, data, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetFilter gets the bloom filter for the given first package name character
|
||||
// from the database.
|
||||
func (s *Store) GetFilter(firstChar byte) (*sbloom.Filter, error) {
|
||||
if !s.blocked.TryRLock() {
|
||||
return nil, ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
data, cl, err := s.db.Get([]byte{0x02, firstChar})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer cl.Close()
|
||||
|
||||
filter := &sbloom.Filter{}
|
||||
err = filter.GobDecode(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return filter, nil
|
||||
}
|
||||
|
||||
// joinTags converts the given tags to bytes, joins them with \x1F as the separator,
|
||||
// and updates the correct bloom filter for the first character of the package name.
|
||||
func joinTags(firstChar byte, tags []string, filters map[byte]*sbloom.Filter) []byte {
|
||||
if _, ok := filters[firstChar]; !ok {
|
||||
filters[firstChar] = sbloom.NewFilter(xxhash.New(), 10)
|
||||
}
|
||||
out := &bytes.Buffer{}
|
||||
for i, tag := range tags {
|
||||
btag := unsafeBytes(tag)
|
||||
filters[firstChar].Add(btag)
|
||||
out.Write(btag)
|
||||
if i != len(tags)-1 {
|
||||
out.WriteByte(0x1F)
|
||||
}
|
||||
}
|
||||
return out.Bytes()
|
||||
}
|
||||
|
||||
// GetPkg retrieves a package from the store by its name
|
||||
func (s *Store) GetPkg(name string) (Package, error) {
|
||||
if !s.blocked.TryRLock() {
|
||||
return Package{}, ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
data, cl, err := s.db.Get(unsafeBytes(name))
|
||||
if err != nil {
|
||||
return Package{}, err
|
||||
}
|
||||
defer cl.Close()
|
||||
|
||||
return Package{
|
||||
Name: name,
|
||||
Tags: strings.Split(string(data), "\x1F"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Store) GetPkgNamesByPrefix(prefix string, n int) ([]string, error) {
|
||||
if !s.blocked.TryRLock() {
|
||||
return nil, ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
out := make([]string, 0, n)
|
||||
|
||||
iter, err := s.db.NewIter(&pebble.IterOptions{
|
||||
LowerBound: unsafeBytes(prefix),
|
||||
UpperBound: append(unsafeBytes(prefix[:len(prefix)-1]), prefix[len(prefix)-1]+1),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer iter.Close()
|
||||
|
||||
i := 0
|
||||
for iter.First(); iter.Valid(); iter.Next() {
|
||||
if i == n-1 {
|
||||
break
|
||||
}
|
||||
out = append(out, string(iter.Key()))
|
||||
i++
|
||||
}
|
||||
|
||||
if err := iter.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// metaKey is the database key for repository metadata
|
||||
var metaKey = []byte("\x02META")
|
||||
|
||||
// RepoMeta represents repository metadata
|
||||
type RepoMeta struct {
|
||||
ETag string
|
||||
LastModified time.Time
|
||||
}
|
||||
|
||||
// WriteMeta writes the repository metadata to the database
|
||||
func (s *Store) WriteMeta(meta RepoMeta) error {
|
||||
if !s.blocked.TryRLock() {
|
||||
return ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
data, err := json.Marshal(meta)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return s.db.Set(metaKey, data, nil)
|
||||
}
|
||||
|
||||
// GetMeta reads the repository metadata from the database
|
||||
func (s *Store) GetMeta() (RepoMeta, error) {
|
||||
if !s.blocked.TryRLock() {
|
||||
return RepoMeta{}, ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
|
||||
data, cl, err := s.db.Get(metaKey)
|
||||
if err != nil {
|
||||
return RepoMeta{}, err
|
||||
}
|
||||
defer cl.Close()
|
||||
var meta RepoMeta
|
||||
err = json.Unmarshal(data, &meta)
|
||||
return meta, err
|
||||
}
|
||||
|
||||
// Replace atomically replaces the database from s with the database from s2.
|
||||
// The store is blocked during the replacement, causing any concurrent operations
|
||||
// to fail with [ErrBlocked]. The replacement operation closes and moves s2's
|
||||
// database, so s2 is no longer usable after this operation.
|
||||
//
|
||||
// This function attempts to roll back in case of partial failures. However, cleanup
|
||||
// failures may result in leftover temporary files.
|
||||
func (s *Store) Replace(s2 *Store) error {
|
||||
// Clean up any leftover old db files. We don't need to lock at this
|
||||
// point because concurrent operations are still safe to execute.
|
||||
oldPath := filepath.Join(filepath.Dir(s.Path), "db-old")
|
||||
if err := os.RemoveAll(oldPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Do a write lock, which will prevent any new operations
|
||||
// from executing and block until all existing operations
|
||||
// complete.
|
||||
s.blocked.Lock()
|
||||
|
||||
if err := s2.db.Close(); err != nil {
|
||||
s.blocked.Unlock()
|
||||
return err
|
||||
}
|
||||
if err := s.db.Close(); err != nil {
|
||||
s.blocked.Unlock()
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Rename(s.Path, oldPath); err != nil {
|
||||
s.blocked.Unlock()
|
||||
return err
|
||||
}
|
||||
if err := os.Rename(s2.Path, s.Path); err != nil {
|
||||
s.blocked.Unlock()
|
||||
return errors.Join(err, os.Rename(oldPath, s.Path))
|
||||
}
|
||||
|
||||
db, err := pebble.Open(s.Path, &pebble.Options{Logger: nopLogger{}})
|
||||
if err != nil {
|
||||
s.blocked.Unlock()
|
||||
return err
|
||||
}
|
||||
s.db = db
|
||||
|
||||
// We can unlock here even though there's more work to do because the replace
|
||||
// operation itself is complete and concurrent operations are now safe to
|
||||
// execute again.
|
||||
s.blocked.Unlock()
|
||||
|
||||
return os.RemoveAll(oldPath)
|
||||
}
|
||||
|
||||
// Close closes the underlying database
|
||||
func (s *Store) Close() error {
|
||||
if !s.blocked.TryRLock() {
|
||||
return ErrBlocked
|
||||
}
|
||||
defer s.blocked.RUnlock()
|
||||
return s.db.Close()
|
||||
}
|
||||
|
||||
// overlap calculates the overlap between two sets of tags.
|
||||
// It returns the list of overlapping tags and a confidence score.
|
||||
func overlap(stags, ptags []string) ([]string, float32) {
|
||||
var overlapTags []string
|
||||
for _, stag := range stags {
|
||||
if slices.Contains(ptags, stag) {
|
||||
overlapTags = append(overlapTags, stag)
|
||||
}
|
||||
}
|
||||
return overlapTags, float32(len(overlapTags)) / float32(len(stags))
|
||||
}
|
||||
|
||||
// unsafeBytes converts a string to a byte slice using unsafe operations
|
||||
func unsafeBytes(data string) []byte {
|
||||
return unsafe.Slice(unsafe.StringData(data), len(data))
|
||||
}
|
||||
|
||||
// unsafeString converts a byte slice to a string using unsafe operations
|
||||
func unsafeString(data []byte) string {
|
||||
return unsafe.String(unsafe.SliceData(data), len(data))
|
||||
}
|
168
internal/tags/tags.go
Normal file
@ -0,0 +1,168 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tags
|
||||
|
||||
import (
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Generate generates a list of tags based on the input filename.
|
||||
func Generate(filePath string) (tags []string) {
|
||||
lastSlash := strings.LastIndexByte(filePath, '/')
|
||||
name, dir := filePath[lastSlash+1:], filePath[:lastSlash]
|
||||
pathElems := strings.Split(dir, "/")
|
||||
added := false
|
||||
for _, elem := range pathElems {
|
||||
switch elem {
|
||||
case "usr", "opt", "local", "share":
|
||||
// Skip directories that we don't care about
|
||||
continue
|
||||
case "bin", "sbin":
|
||||
tags = append(tags, "bin="+name)
|
||||
added = true
|
||||
case "icons", "pixmaps":
|
||||
switch path.Ext(name) {
|
||||
case ".svg", ".png", ".jpg", ".jpeg":
|
||||
tags = append(tags, "icon="+name)
|
||||
added = true
|
||||
}
|
||||
case "man":
|
||||
if manName := manualName(name); manName != "" {
|
||||
tags = append(tags, "man="+manName)
|
||||
added = true
|
||||
}
|
||||
case "dist-packages", "site-packages":
|
||||
if pyName := pythonName(filePath); pyName != "" {
|
||||
tags = append(tags, "py="+pyName)
|
||||
added = true
|
||||
}
|
||||
case "pkgconfig", "pkg-config":
|
||||
if path.Ext(name) == ".pc" {
|
||||
tags = append(tags, "pkgcfg="+strings.TrimSuffix(name, ".pc"))
|
||||
added = true
|
||||
}
|
||||
case "applications":
|
||||
if path.Ext(name) == ".desktop" {
|
||||
tags = append(tags, "desktop="+strings.TrimSuffix(name, ".desktop"))
|
||||
added = true
|
||||
}
|
||||
case "dbus-1":
|
||||
if path.Ext(name) == ".service" {
|
||||
tags = append(tags, "dbus="+strings.TrimSuffix(name, ".service"))
|
||||
added = true
|
||||
}
|
||||
case "systemd":
|
||||
switch path.Ext(name) {
|
||||
case ".service", ".target", ".socket", ".timer":
|
||||
tags = append(tags, "systemd="+name)
|
||||
added = true
|
||||
}
|
||||
case "include":
|
||||
switch path.Ext(name) {
|
||||
case ".h", ".hh", ".hpp", ".hxx", "h++":
|
||||
_, hdrName, ok := strings.Cut(filePath, "include/")
|
||||
if !ok {
|
||||
hdrName = name
|
||||
}
|
||||
tags = append(tags, "hdr="+hdrName)
|
||||
added = true
|
||||
}
|
||||
case "lib", "lib32", "lib64":
|
||||
if libName, soversion, ok := strings.Cut(name, ".so"); ok && soversionIsValid(soversion) {
|
||||
tags = append(tags, "lib="+name)
|
||||
lastChar := name[len(name)-1]
|
||||
if lastChar >= '0' || lastChar <= '9' {
|
||||
tags = append(tags, "lib="+libName+".so")
|
||||
canonicalLibName := strings.TrimPrefix(libName, "lib")
|
||||
tags = append(tags, "lib="+canonicalLibName)
|
||||
}
|
||||
added = true
|
||||
} else if path.Ext(name) == ".a" {
|
||||
tags = append(tags, "lib="+name)
|
||||
tags = append(tags, "lib="+strings.TrimSuffix(name, ".a"))
|
||||
added = true
|
||||
}
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
||||
if added {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !added {
|
||||
tags = append(tags, "file="+filePath)
|
||||
}
|
||||
|
||||
return tags
|
||||
}
|
||||
|
||||
func manualName(fileName string) string {
|
||||
fileName = strings.TrimSuffix(fileName, ".gz")
|
||||
ext := path.Ext(fileName)
|
||||
if len(ext) == 0 || !isNum(ext[1:]) {
|
||||
return ""
|
||||
}
|
||||
return fileName
|
||||
}
|
||||
|
||||
func pythonName(filePath string) string {
|
||||
for _, start := range [...]string{"/dist-packages/", "/site-packages/"} {
|
||||
start := strings.Index(filePath, start)
|
||||
if start == -1 {
|
||||
continue
|
||||
}
|
||||
start += 15
|
||||
end := strings.Index(filePath[start:], "/")
|
||||
if end == -1 {
|
||||
continue
|
||||
}
|
||||
return filePath[start : start+end]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func soversionIsValid(s string) bool {
|
||||
if s == "" {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, elem := range strings.Split(s, ".") {
|
||||
if !isNum(elem) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func isNum(s string) bool {
|
||||
for i := range s {
|
||||
if s[i] < '0' || s[i] > '9' {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
370
main.go
Normal file
@ -0,0 +1,370 @@
|
||||
/*
|
||||
* distrohop - A utility for correlating and identifying equivalent software
|
||||
* packages across different Linux distributions
|
||||
*
|
||||
* Copyright (C) 2025 Elara Ivy <elara@elara.ws>
|
||||
*
|
||||
* This file is part of distrohop.
|
||||
*
|
||||
* distrohop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* distrohop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with distrohop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/pebble"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/httprate"
|
||||
"github.com/go-co-op/gocron/v2"
|
||||
"go.elara.ws/distrohop/internal/config"
|
||||
"go.elara.ws/distrohop/internal/index"
|
||||
"go.elara.ws/distrohop/internal/pull"
|
||||
"go.elara.ws/distrohop/internal/store"
|
||||
"go.elara.ws/distrohop/internal/store/cached"
|
||||
"go.elara.ws/distrohop/internal/store/combined"
|
||||
"go.elara.ws/loggers"
|
||||
"go.elara.ws/salix"
|
||||
)
|
||||
|
||||
//go:embed templates
|
||||
var tmpls embed.FS
|
||||
|
||||
//go:embed assets
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
log := slog.New(loggers.NewPretty(os.Stderr, loggers.Options{Level: slog.LevelDebug}))
|
||||
cfg, err := config.Load()
|
||||
if err != nil {
|
||||
log.Error("Error loading configuration", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
dataDir, err := userDataDir()
|
||||
if err != nil {
|
||||
log.Error("Error getting data directory", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
dataDir = filepath.Join(dataDir, "distrohop")
|
||||
|
||||
stores := map[string]store.ReadOnly{}
|
||||
|
||||
// Create a scheduler for repo refresh tasks
|
||||
sched, err := gocron.NewScheduler(
|
||||
gocron.WithLocation(time.Local),
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("Error creating scheduler", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
sched.Start()
|
||||
defer sched.Shutdown()
|
||||
|
||||
for _, repo := range cfg.Repos {
|
||||
// Create a combined store for the repo
|
||||
cs := combined.New()
|
||||
// Create a cached store for the combined store
|
||||
stores[repo.Name] = cached.New(cs, time.Hour, 10*time.Minute)
|
||||
|
||||
for _, repoName := range repo.Repos {
|
||||
for _, arch := range repo.Architectures {
|
||||
dbPath := filepath.Join(dataDir, repo.Name, repo.Version, repoName, arch, "db")
|
||||
// Open a store for a specific index within a repo
|
||||
s, err := store.Open(dbPath)
|
||||
if err == nil {
|
||||
// Add the index store to the combined store for the repo
|
||||
cs.Add(s)
|
||||
} else if err != nil {
|
||||
log.Error("Error opening database", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Schedule a refresh job for the repo
|
||||
if job := scheduleRefresh(log, s, sched, repo, repoName, arch); job != nil {
|
||||
// Run the refresh job immediately on startup
|
||||
if err := job.RunNow(); err != nil {
|
||||
log.Warn("Error executing repo refresh task on startup", slog.String("repo", repoName), slog.Any("error", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmplFS, err := fs.Sub(tmpls, "templates")
|
||||
if err != nil {
|
||||
log.Error("Error getting templates subdirectory", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
ns := salix.New().
|
||||
WithEscapeHTML(true).
|
||||
WithWriteOnSuccess(true).
|
||||
WithTagMap(map[string]salix.Tag{
|
||||
"icon": salix.FSTag{
|
||||
FS: assets,
|
||||
PathPrefix: "assets/icons",
|
||||
Extension: ".svg",
|
||||
},
|
||||
}).
|
||||
WithVarMap(map[string]any{
|
||||
"sprintf": fmt.Sprintf,
|
||||
})
|
||||
|
||||
err = ns.ParseFSGlob(tmplFS, "*")
|
||||
if err != nil {
|
||||
log.Error("Error parsing templates", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
mux := chi.NewMux()
|
||||
|
||||
mux.Handle("/assets/*", http.FileServer(http.FS(assets)))
|
||||
|
||||
mux.Get("/", handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
return ns.ExecuteTemplate(w, "home.html", map[string]any{"cfg": cfg})
|
||||
}))
|
||||
|
||||
mux.Get("/about", handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
return ns.ExecuteTemplate(w, "about.html", nil)
|
||||
}))
|
||||
|
||||
mux.Get("/pkg/{repo}/{package}", handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
repo := chi.URLParam(r, "repo")
|
||||
s, ok := stores[repo]
|
||||
if !ok {
|
||||
return fmt.Errorf("no such repo: %q", repo)
|
||||
}
|
||||
|
||||
pkgName := chi.URLParam(r, "package")
|
||||
pkg, err := s.GetPkg(pkgName)
|
||||
if errors.Is(err, pebble.ErrNotFound) {
|
||||
return fmt.Errorf("no such package: %q", pkgName)
|
||||
} else if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ns.ExecuteTemplate(w, "package.html", map[string]any{
|
||||
"inRepo": repo,
|
||||
"pkg": pkg,
|
||||
})
|
||||
}))
|
||||
|
||||
mux.Handle("/suggestions", handleErrJSON(func(w http.ResponseWriter, r *http.Request) error {
|
||||
if r.Method != http.MethodGet {
|
||||
return httpError{fmt.Errorf("method %s not allowed", r.Method), http.StatusMethodNotAllowed}
|
||||
}
|
||||
|
||||
repo := r.URL.Query().Get("repo")
|
||||
s, ok := stores[repo]
|
||||
if !ok {
|
||||
return httpError{fmt.Errorf("no such repo: %q", repo), http.StatusNotFound}
|
||||
}
|
||||
|
||||
pkgs, err := s.GetPkgNamesByPrefix(r.URL.Query().Get("input"), 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return json.NewEncoder(w).Encode(pkgs)
|
||||
}))
|
||||
|
||||
limiter := httprate.Limit(
|
||||
10,
|
||||
10*time.Second,
|
||||
httprate.WithKeyFuncs(httprate.KeyByRealIP),
|
||||
httprate.WithLimitHandler(handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
return httpError{errors.New("You've made too many requests. Please try again later."), http.StatusTooManyRequests}
|
||||
})),
|
||||
)
|
||||
|
||||
mux.With(limiter).Route("/search", func(search chi.Router) {
|
||||
search.Get("/tags", handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
query := r.URL.Query()
|
||||
tags := query["tag"]
|
||||
|
||||
inRepo := query.Get("in")
|
||||
in, ok := stores[inRepo]
|
||||
if !ok {
|
||||
return httpError{fmt.Errorf("no such repo: %q", inRepo), http.StatusNotFound}
|
||||
}
|
||||
|
||||
results, latency, err := in.Search(tags)
|
||||
if errors.Is(err, store.ErrInvalidTag) {
|
||||
return httpError{err, http.StatusBadRequest}
|
||||
} else if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ns.ExecuteTemplate(w, "results.html", map[string]any{
|
||||
"results": results,
|
||||
"fromRepo": "",
|
||||
"inRepo": inRepo,
|
||||
"tags": tags,
|
||||
"procTime": latency,
|
||||
})
|
||||
}))
|
||||
|
||||
search.Get("/pkg", handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
query := r.URL.Query()
|
||||
|
||||
inRepo := query.Get("in")
|
||||
in, ok := stores[inRepo]
|
||||
if !ok {
|
||||
return httpError{fmt.Errorf("no such repo: %q", inRepo), http.StatusNotFound}
|
||||
}
|
||||
|
||||
fromRepo := query.Get("from")
|
||||
from, ok := stores[fromRepo]
|
||||
if !ok {
|
||||
return httpError{fmt.Errorf("no such repo: %q", fromRepo), http.StatusNotFound}
|
||||
}
|
||||
|
||||
pkgName := query.Get("pkg")
|
||||
pkg, err := from.GetPkg(pkgName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
results, latency, err := in.Search(pkg.Tags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ns.ExecuteTemplate(w, "results.html", map[string]any{
|
||||
"results": results,
|
||||
"fromRepo": fromRepo,
|
||||
"inRepo": inRepo,
|
||||
"pkgName": pkgName,
|
||||
"procTime": latency,
|
||||
})
|
||||
}))
|
||||
})
|
||||
|
||||
mux.NotFound(handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
return httpError{errors.New("page not found"), http.StatusNotFound}
|
||||
}))
|
||||
|
||||
mux.MethodNotAllowed(handleErrGUI(ns, func(w http.ResponseWriter, r *http.Request) error {
|
||||
return httpError{fmt.Errorf("method %s not allowed", r.Method), http.StatusMethodNotAllowed}
|
||||
}))
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: ":8080",
|
||||
Handler: mux,
|
||||
}
|
||||
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, os.Interrupt)
|
||||
go handleShutdown(ch, log, srv, sched)
|
||||
|
||||
log.Info("Starting HTTP server", slog.Int("port", 8080))
|
||||
srv.ListenAndServe()
|
||||
}
|
||||
|
||||
// handleShutdown handles a shutdown signal, such as an OS interrupt
|
||||
func handleShutdown(ch chan os.Signal, log *slog.Logger, srv *http.Server, sched gocron.Scheduler) {
|
||||
sig := <-ch
|
||||
log.Info("Shutting down server", slog.String("signal", sig.String()))
|
||||
srv.Shutdown(nil)
|
||||
sched.Shutdown()
|
||||
}
|
||||
|
||||
// scheduleRefresh schedules a job to refresh a repo index database
|
||||
func scheduleRefresh(log *slog.Logger, s *store.Store, sched gocron.Scheduler, repo config.Repo, repoName, arch string) (job gocron.Job) {
|
||||
var err error
|
||||
job, err = sched.NewJob(
|
||||
gocron.CronJob(repo.RefreshSchedule, true),
|
||||
gocron.NewTask(func() {
|
||||
opts := pull.Options{
|
||||
BaseURL: repo.BaseURL,
|
||||
Version: repo.Version,
|
||||
Repo: repoName,
|
||||
Architecture: arch,
|
||||
ProgressFunc: func(title string, received, total int64) {
|
||||
log.Debug(
|
||||
fmt.Sprintf("[%s] download", title),
|
||||
slog.Int64("recvd", received),
|
||||
slog.Int64("total", total),
|
||||
)
|
||||
},
|
||||
}
|
||||
|
||||
importer, err := index.GetImporter(repo.Type)
|
||||
if err != nil {
|
||||
log.Error("Error getting importer", slog.Any("error", err))
|
||||
return
|
||||
}
|
||||
|
||||
log.Info(
|
||||
"Pulling repo",
|
||||
slog.String("name", repo.Name),
|
||||
slog.String("version", repo.Version),
|
||||
slog.String("repo", repoName),
|
||||
slog.String("arch", arch),
|
||||
)
|
||||
|
||||
err = pull.Pull(opts, s, importer)
|
||||
if err != nil && !errors.Is(err, pull.ErrUpToDate) {
|
||||
log.Warn("Error pulling repository", slog.String("repo", repoName), slog.Any("error", err))
|
||||
}
|
||||
|
||||
nextRun, err := job.NextRun()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
log.Info(
|
||||
fmt.Sprintf(
|
||||
"Next refresh scheduled for %s",
|
||||
nextRun.Format(time.RFC1123),
|
||||
),
|
||||
slog.String("name", repo.Name),
|
||||
slog.String("version", repo.Version),
|
||||
slog.String("repo", repoName),
|
||||
slog.String("arch", arch),
|
||||
)
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
log.Warn("Error scheduling repo refresh task", slog.String("repo", repoName), slog.Any("error", err))
|
||||
}
|
||||
return job
|
||||
}
|
||||
|
||||
// userDataDir returns the directory where distrohop should store its indices
|
||||
func userDataDir() (string, error) {
|
||||
if os.Getenv("RUNNING_IN_DOCKER") == "true" {
|
||||
return "/data", nil
|
||||
}
|
||||
if dir, ok := os.LookupEnv("XDG_DATA_HOME"); ok {
|
||||
return dir, nil
|
||||
}
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(home, ".local/share"), nil
|
||||
}
|
28
templates/about.html
Normal file
@ -0,0 +1,28 @@
|
||||
#macro("content"):
|
||||
<div class="block">
|
||||
<p class="is-size-4 mb-1">What is Distrohop?</p>
|
||||
<p>
|
||||
Distrohop lets you look up a package from a Linux distro's repositories and find the equivalent package in another distro's repositories.
|
||||
It also lets you look up a package by its contents. For example, you can look up
|
||||
<span class="tags has-addons is-inline-block m-0">
|
||||
<span class="tag is-dark has-background-info-dark has-text-info-light">bin</span><span class="tag is-dark">nano</span>
|
||||
</span>
|
||||
and get a list of packages that contain the <code>nano</code> command.
|
||||
</p>
|
||||
</div>
|
||||
<div class="block">
|
||||
<p class="is-size-4 mb-1">Why is Distrohop?</p>
|
||||
<p>Distrohop has many use cases. It can be used to figure out which package has the command, library, service, etc. you need. It can also be used to figure out the names of equivalent packages between different distros, which is extremely useful when you're trying to figure out dependencies for packaging software.</p>
|
||||
</div>
|
||||
<div class="block">
|
||||
<p class="is-size-4 mb-1">How is Distrohop?</p>
|
||||
<p class="mb-2">Distrohop works by downloading and decoding a file index from each supported repo. It analyzes the information contained in the index to form a generalized list of tags describing the contents of each package, and then stores that list in a database.</p>
|
||||
<p>When you search for a package from another distro, it resolves the package name to its list of tags, and then searches for any packages that match at least one tag in the other distro's repos. It calculates a confidence score based on how many of the tags match, and then sorts the results by confidence.</p>
|
||||
</div>
|
||||
<div class="block">
|
||||
<p class="is-size-4 mb-1">Why is my search so slow?</p>
|
||||
<p>Each repo can have tens of millions of tags that Distrohop has to churn through. It uses LSM trees and bloom filters to speed the search up as much as possible, and most searches can be measured in milliseconds, but for some searches that contain lots of tags, there may not be any shortcut and Distrohop may have to scan through all or most of the tags stored in the database, which can take a significant amount of time.</p>
|
||||
</div>
|
||||
#!macro
|
||||
|
||||
#include("base.html", page = "About")
|
51
templates/base.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>#(page | "Unknown") | Distrohop</title>
|
||||
<link rel="icon" href="/assets/logo/distrohop-no-text.svg">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/@alpinejs/anchor@3.x.x/dist/cdn.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
#macro("?head")
|
||||
</head>
|
||||
<body>
|
||||
<nav x-data="{'active': false}" class="navbar is-dark" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="/">
|
||||
<img src="/assets/logo/distrohop.svg" alt="Distrohop Logo">
|
||||
</a>
|
||||
|
||||
<a @click="active = !active" :class="active && 'is-active'" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-menu" :class="active && 'is-active'">
|
||||
<div class="navbar-end">
|
||||
<a class='navbar-item is-tab #(page == "Search" ? "is-active" : "")' href="/">
|
||||
<div class="icon-text">
|
||||
<span class="icon is-aligned">#icon("map/search")</span>
|
||||
<span>Search</span>
|
||||
</div>
|
||||
</a>
|
||||
<a class='navbar-item is-tab #(page == "About" ? "is-active" : "")' href="/about">
|
||||
<div class="icon-text">
|
||||
<span class="icon is-aligned">#icon("fe/question")</span>
|
||||
<span>About</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container mt-5">
|
||||
#macro("content")
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
16
templates/error.html
Normal file
@ -0,0 +1,16 @@
|
||||
#macro("content"):
|
||||
<div class="container has-text-centered">
|
||||
<div class="image is-96x96 is-inline-block has-text-danger m-0">#icon("weui/error-outlined")</div>
|
||||
<p class="is-size-4 has-text-danger">#(err)</p>
|
||||
<div class="is-inline-block">
|
||||
<a href="javascript:window.history.back()">
|
||||
<div class="icon-text has-text-centered">
|
||||
<span class="icon is-aligned">#icon("ri/arrow-left-line")</span>
|
||||
<span>Go Back</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
#!macro
|
||||
|
||||
#include("base.html", page = "Error")
|
163
templates/home.html
Normal file
@ -0,0 +1,163 @@
|
||||
#macro("head"):
|
||||
<script>
|
||||
async function getSuggestions(repo, input) {
|
||||
input = input.trim();
|
||||
if (repo.length == 0 || input.length == 0) return [];
|
||||
const res = await fetch("/suggestions?" + new URLSearchParams({
|
||||
'input': input,
|
||||
'repo': repo,
|
||||
}))
|
||||
if (!res.ok) {
|
||||
let resData = await res.json();
|
||||
throw new Error(`[suggestions] ${resData.error} (HTTP ${res.status})`)
|
||||
}
|
||||
return await res.json();
|
||||
}
|
||||
|
||||
function pushTag(tags, input) {
|
||||
const splitTag = input.value.split('=');
|
||||
if (splitTag.length != 2) {
|
||||
input.classList.add('is-danger');
|
||||
} else {
|
||||
input.classList.remove('is-danger');
|
||||
tags.push(splitTag);
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
#!macro
|
||||
|
||||
#macro("content"):
|
||||
<div class="is-flex is-flex-direction-column is-align-items-center image is-16x9 mb-4">
|
||||
<img src="/assets/logo/distrohop.svg" style="max-width: 500px" alt="Distrohop Logo">
|
||||
</div>
|
||||
|
||||
<section
|
||||
x-data="{activeTab: new URLSearchParams(location.search).get('tab') || 'pkg', nav: false}"
|
||||
x-init="$watch('activeTab', (val) => {
|
||||
if (nav) {
|
||||
nav = false;
|
||||
return;
|
||||
}
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('tab', val);
|
||||
history.pushState(null, document.title, url.toString());
|
||||
})"
|
||||
@popstate.window="nav = true; activeTab = new URLSearchParams(location.search).get('tab') || 'pkg'"
|
||||
>
|
||||
<div class="tabs is-centered">
|
||||
<ul>
|
||||
<li :class="{'is-active': activeTab == 'pkg'}" @click="activeTab = 'pkg'"><a>Search by Package</a></li>
|
||||
<li :class="{'is-active': activeTab == 'tags'}" @click="activeTab = 'tags'"><a>Search by Tags</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div x-cloak x-transition:enter x-show="activeTab == 'pkg'" class="columns">
|
||||
<form x-data="{'suggestions': []}" class="column is-half is-offset-one-quarter has-text-centered" action="/search/pkg">
|
||||
<label class="label" for="from">Search For:</label>
|
||||
<div class="field has-addons is-align-self-stretch" id="from">
|
||||
<div class="control">
|
||||
<span class="select">
|
||||
<select name="from" x-ref="from" class="is-clipped" autocomplete="off" required>
|
||||
<option selected disabled value="">Select Repo...</option>
|
||||
#for(repo in cfg.Repos):
|
||||
<option>#(repo.Name)</option>
|
||||
#!for
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control is-expanded">
|
||||
<p @click.outside="suggestions = []">
|
||||
<input @keyup.debounce="suggestions = await getSuggestions($refs.from.value, $refs.pkg.value)" x-ref="pkg" class="input" name="pkg" type="text" placeholder="Package Name" autocomplete="off">
|
||||
</p>
|
||||
<div class="dropdown is-active" x-show="suggestions.length > 0" x-anchor.bottom-start="$refs.pkg" style="z-index: 1000; width: 100%">
|
||||
<div class="dropdown-content" style="width: 100%">
|
||||
<template x-for="suggestion in suggestions">
|
||||
<button @click.prevent="$refs.pkg.value = suggestion; suggestions = []" :title="suggestion" x-text="suggestion" class="dropdown-item is-clipped" style="text-overflow: ellipsis"></button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="label" for="in">In:</label>
|
||||
<div class="field is-align-self-stretch" id="in">
|
||||
<p class="control">
|
||||
<span class="select is-fullwidth">
|
||||
<select name="in" autocomplete="off" required>
|
||||
<option selected disabled value="">Select Repo...</option>
|
||||
#for(repo in cfg.Repos):
|
||||
<option>#(repo.Name)</option>
|
||||
#!for
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field mt-4 is-align-self-stretch">
|
||||
<p class="control">
|
||||
<button class="button is-dark is-rounded is-fullwidth" type="submit">
|
||||
<div class="icon-text">
|
||||
<span class="icon is-aligned m-0">#icon("map/search")</span>
|
||||
<span>Search</span>
|
||||
</div>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div x-cloak x-data="{tags: []}" x-transition:enter x-show="activeTab == 'tags'" class="columns">
|
||||
<div class="column is-half is-offset-one-quarter has-text-centered">
|
||||
<form action="/search/tags" x-ref="tagsForm">
|
||||
<div class="field is-grouped is-grouped-multiline">
|
||||
<template x-for="(tag, idx) in tags">
|
||||
<div>
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark has-background-info-dark has-text-info-light" x-text="tag[0]"></span><span class="tag is-dark" x-text="tag[1]"></span><a class="tag is-delete m-0" @click.prevent="tags.splice(idx, 1)"></a>
|
||||
</div>
|
||||
<input class="is-hidden" name="tag" :value="tag.join('=')">
|
||||
</div>
|
||||
</template>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 field has-addons">
|
||||
<div class="control is-expanded">
|
||||
<input @keydown.comma.prevent="pushTag(tags, $refs.newTagInput)" class="input" x-ref="newTagInput" placeholder="bin=nano">
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button" @click.prevent="pushTag(tags, $refs.newTagInput)">
|
||||
<div class="icon-text">
|
||||
<span class="icon is-aligned m-0">#icon("icons8/plus")</span>
|
||||
<span>Add</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field" id="in">
|
||||
<p class="control">
|
||||
<span class="select is-fullwidth">
|
||||
<select name="in" autocomplete="off" required>
|
||||
<option selected disabled value="">Select Repo...</option>
|
||||
#for(repo in cfg.Repos):
|
||||
<option>#(repo.Name)</option>
|
||||
#!for
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button class="button is-dark is-rounded is-fullwidth" type="submit">
|
||||
<div class="icon-text">
|
||||
<span class="icon is-aligned m-0">#icon("map/search")</span>
|
||||
<span>Search</span>
|
||||
</div>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
#!macro
|
||||
#include("base.html", page = "Search")
|
21
templates/package.html
Normal file
@ -0,0 +1,21 @@
|
||||
#macro("content"):
|
||||
<a href="javascript:window.history.back()" class="is-block">
|
||||
<div class="icon-text has-text-centered">
|
||||
<span class="icon is-aligned">#icon("ri/arrow-left-line")</span>
|
||||
<span>Back</span>
|
||||
</div>
|
||||
</a>
|
||||
<p class="title">#(pkg.Name)</p>
|
||||
<p class="subtitle">#(inRepo)</p>
|
||||
|
||||
<ul>
|
||||
#for(tag in pkg.Tags):
|
||||
#(st = split(tag, "="))
|
||||
<div class="tags has-addons my-1 mx-1">
|
||||
<span class="tag mb-2 is-dark has-background-info-dark has-text-info-light">#(st[0])</span><span class="tag mb-2 is-dark">#(st[1])</span>
|
||||
</div>
|
||||
#!for
|
||||
</ul>
|
||||
#!macro
|
||||
|
||||
#include("base.html", page = "Package " + pkg.Name)
|
73
templates/results.html
Normal file
@ -0,0 +1,73 @@
|
||||
#macro("content"):
|
||||
<p class="title mb-0">Results</p>
|
||||
#if(fromRepo == ""):
|
||||
<div x-data="{active: false}">
|
||||
<p class="subtitle mb-2">Searching for <a @click="active = true">tags</a> in <code>#(inRepo)</code></p>
|
||||
<div x-show="active" x-transition class="modal is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card" @click.outside="active = false">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">Search Tags</p>
|
||||
<button class="delete" aria-label="close" @click="active = false"></button>
|
||||
</header>
|
||||
<div class="modal-card-body">
|
||||
<div class="field is-grouped is-grouped-multiline">
|
||||
#for(tag in tags):
|
||||
#(st = split(tag, "="))
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark has-background-info-dark has-text-info-light">#(st[0])</span><span class="tag is-dark">#(st[1])</span>
|
||||
</div>
|
||||
#!for
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#else:
|
||||
<p class="subtitle mb-2">Searching for <code>#(pkgName)</code> from <code>#(fromRepo)</code> in <code>#(inRepo)</code></p>
|
||||
#!if
|
||||
<p class="is-size-7 has-text-grey">Found #(len(results)) packages in #(procTime)</p>
|
||||
<hr>
|
||||
#for(result in results):
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<div class="card-header-title">
|
||||
<p>#(result.Package.Name) </p>
|
||||
<p class="has-text-primary" title="Confidence Score">(#(sprintf("%.2f", result.Confidence * 100))%)</p>
|
||||
</div>
|
||||
<a class="card-header-icon" href="/pkg/#(inRepo)/#(result.Package.Name)" title="See all tags">
|
||||
<span class="icon">#icon("gridicons/external")</span>
|
||||
</a>
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<div x-data="{'active': false}" class="pkg-tags" x-ref="tags" :class="active && 'is-active'">
|
||||
#for(tag in result.Overlap):
|
||||
#(st = split(tag, "="))
|
||||
<div class="tags has-addons is-display-inline-block my-1 mx-1">
|
||||
<span class="tag is-dark has-background-info-dark has-text-info-light">#(st[0])</span><span class="tag is-dark">#(st[1])</span>
|
||||
</div>
|
||||
#!for
|
||||
<template x-if="$refs.tags.childElementCount > 11">
|
||||
<button class="tag is-inline-block is-dark has-background-primary-dark has-text-primary-light" @click="active = !active">
|
||||
<div class="icon-text">
|
||||
<template x-if="active">
|
||||
<span class="icon is-aligned">#icon("ri/arrow-left-line")</span>
|
||||
</template>
|
||||
<span x-text="active ? 'Show Less' : 'Show More'"></span>
|
||||
<template x-if="!active">
|
||||
<span class="icon is-aligned">#icon("ri/arrow-right-line")</span>
|
||||
</template>
|
||||
</div>
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#!for
|
||||
#if(len(results) == 0):
|
||||
<p class="has-text-centered has-text-danger subtitle">No results found :(</p>
|
||||
#!if
|
||||
#!macro
|
||||
|
||||
#include("base.html", page = "Results")
|