From 99c7b9f095eb72b69599b20696b7649e3d928653 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Thu, 4 Aug 2022 19:01:28 -0600 Subject: [PATCH] update to quartzgun v0.2, add MIT license --- LICENSE | 7 +++++++ README.md | 4 ++++ go.mod | 2 +- go.sum | 2 ++ nirvash.go | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9614d19 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2022 Derek Stevens + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 6d780ff..b596bb3 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,7 @@ The `Adapter` interface and associated data types can be found in the [adapter.g - `SavePage(oldSlug, newSlug, title, content string) error`: given all the proper arguments, save a page to the backing store (eg filesystem, db) - `DeletePage(slug string) error`: given a slug, delete the corresponding page source and possibly its generated HTML, depending on the `Adapter` - `Build(buildOptions map[string][]string) BuildStatus`: takes a map of build option names to their values and builds the site, returning a `BuildStatus` object containing the success or failure as a boolean and the detailed status (eg, the console ouptut of the build process) + +## license + +`nirvash` is licensed under the [MIT license](./LICENSE). \ No newline at end of file diff --git a/go.mod b/go.mod index 01c1e10..59944db 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module nilfm.cc/git/nirvash go 1.17 -require nilfm.cc/git/quartzgun v0.1.2 +require nilfm.cc/git/quartzgun v0.2.0 require golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 // indirect diff --git a/go.sum b/go.sum index 64b79ee..866e179 100644 --- a/go.sum +++ b/go.sum @@ -27,3 +27,5 @@ nilfm.cc/git/quartzgun v0.1.1 h1:swJg3im4YsD64MnfJHa2Bxm0adGT/ArAMHLAPeEjuS0= nilfm.cc/git/quartzgun v0.1.1/go.mod h1:/DDvt1DtzNuUf3HHaP29WMei/kkdaRW+ySmEzybvVto= nilfm.cc/git/quartzgun v0.1.2 h1:B0IN24Y1Bg2IVvKxXXVtTUNFdVL8h3k/r0+LFAyqtMI= nilfm.cc/git/quartzgun v0.1.2/go.mod h1:/DDvt1DtzNuUf3HHaP29WMei/kkdaRW+ySmEzybvVto= +nilfm.cc/git/quartzgun v0.2.0 h1:JJjkCbRLaMmfGLe5GQHWhBkkY6Is0roTMyWC76VtBPI= +nilfm.cc/git/quartzgun v0.2.0/go.mod h1:/DDvt1DtzNuUf3HHaP29WMei/kkdaRW+ySmEzybvVto= diff --git a/nirvash.go b/nirvash.go index f173411..a6ad14f 100644 --- a/nirvash.go +++ b/nirvash.go @@ -48,7 +48,7 @@ func main() { rtr.Get("/login", renderer.Template( pathConcat(templateRoot, "login.html"))) - rtr.Post("/login", Authorize("/", udb, "/login?tryagain=1")) + rtr.Post("/login", Authorize("/", udb, "/login?tryagain=1", 84)) rtr.Get("/logout", Bunt("/", udb, "/login?tryagain=1"))