mirror of
https://codeberg.org/scip/anydb.git
synced 2026-10-08 03:04:20 +02:00
Compare commits
4 Commits
clarify-te
...
mux
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b66c57f4c | |||
| 38d3d2c442 | |||
| b4fa28d0c5 | |||
| 37c7e808ed |
@@ -6,7 +6,7 @@ variables:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
dryrun:
|
dryrun:
|
||||||
image: docker.io/woodpeckerci/plugin-docker-buildx:6.0.3
|
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
@@ -17,7 +17,7 @@ steps:
|
|||||||
event: [pull_request]
|
event: [pull_request]
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: docker.io/woodpeckerci/plugin-docker-buildx:6.0.3
|
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|||||||
18
anydb.1
18
anydb.1
@@ -133,7 +133,7 @@
|
|||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "ANYDB 1"
|
.IX Title "ANYDB 1"
|
||||||
.TH ANYDB 1 "2026-04-29" "1" "User Commands"
|
.TH ANYDB 1 "2025-11-03" "1" "User Commands"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
@@ -613,16 +613,8 @@ The following template variables can be used:
|
|||||||
.PD 0
|
.PD 0
|
||||||
.IP "\fB.Value\fR \- string" 4
|
.IP "\fB.Value\fR \- string" 4
|
||||||
.IX Item ".Value - string"
|
.IX Item ".Value - string"
|
||||||
.PD
|
|
||||||
To be able to use the value in a template, you'll need to add the
|
|
||||||
\&\f(CW\*(C`\-s\*(C'\fR flag so that values are included in output data
|
|
||||||
stream. Otherwise you can only use \f(CW\*(C`.Preview\*(C'\fR.
|
|
||||||
.IP "\fB.Preview\fR string" 4
|
|
||||||
.IX Item ".Preview string"
|
|
||||||
First line of entry value (if it is a string).
|
|
||||||
.IP "\fB.Bin\fR \- []byte" 4
|
.IP "\fB.Bin\fR \- []byte" 4
|
||||||
.IX Item ".Bin - []byte"
|
.IX Item ".Bin - []byte"
|
||||||
.PD 0
|
|
||||||
.IP "\fB.Created\fR \- timestamp.Time" 4
|
.IP "\fB.Created\fR \- timestamp.Time" 4
|
||||||
.IX Item ".Created - timestamp.Time"
|
.IX Item ".Created - timestamp.Time"
|
||||||
.PD
|
.PD
|
||||||
@@ -737,7 +729,7 @@ Some curl example calls to the \s-1API:\s0
|
|||||||
Post a new key:
|
Post a new key:
|
||||||
curl \-X \s-1PUT\s0 localhost:8787/anydb/v1/ \e
|
curl \-X \s-1PUT\s0 localhost:8787/anydb/v1/ \e
|
||||||
\-H 'Content\-Type: application/json' \e
|
\-H 'Content\-Type: application/json' \e
|
||||||
\-d '{\*(L"key\*(R":\*(L"foo\*(R",\*(L"data\*(R":\*(L"bar\*(R"}'
|
\-d '{\*(L"key\*(R":\*(L"foo\*(R",\*(L"val\*(R":\*(L"bar\*(R"}'
|
||||||
.PP
|
.PP
|
||||||
Retrieve the value:
|
Retrieve the value:
|
||||||
.PP
|
.PP
|
||||||
@@ -750,12 +742,6 @@ List all keys:
|
|||||||
.Vb 1
|
.Vb 1
|
||||||
\& curl localhost:8787/anydb/v1/
|
\& curl localhost:8787/anydb/v1/
|
||||||
.Ve
|
.Ve
|
||||||
.PP
|
|
||||||
Delete an entry:
|
|
||||||
.PP
|
|
||||||
.Vb 1
|
|
||||||
\& curl \-s \-X DELETE http://localhost:8787/anydb/v1/foo
|
|
||||||
.Ve
|
|
||||||
.SH "BUGS"
|
.SH "BUGS"
|
||||||
.IX Header "BUGS"
|
.IX Header "BUGS"
|
||||||
In order to report a bug, unexpected behavior, feature requests
|
In order to report a bug, unexpected behavior, feature requests
|
||||||
|
|||||||
11
anydb.pod
11
anydb.pod
@@ -452,17 +452,6 @@ The following template variables can be used:
|
|||||||
|
|
||||||
=item B<.Value> - string
|
=item B<.Value> - string
|
||||||
|
|
||||||
To be able to use the value in a template, you'll need to add the
|
|
||||||
C<-s> flag so that values are included in output data
|
|
||||||
stream. Otherwise you can only use C<.Preview>.
|
|
||||||
|
|
||||||
Be careful if you use C<-s> and C<.Value> though: if a value is a
|
|
||||||
multiline string, it may clutter your output.
|
|
||||||
|
|
||||||
=item B<.Preview> string
|
|
||||||
|
|
||||||
First line of entry value (if it is a string).
|
|
||||||
|
|
||||||
=item B<.Bin> - []byte
|
=item B<.Bin> - []byte
|
||||||
|
|
||||||
=item B<.Created> - timestamp.Time
|
=item B<.Created> - timestamp.Time
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import (
|
|||||||
"github.com/tlinden/yadu"
|
"github.com/tlinden/yadu"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version string = "v0.3.1"
|
var Version string = "v0.3.0"
|
||||||
|
|
||||||
type BucketConfig struct {
|
type BucketConfig struct {
|
||||||
Encrypt bool
|
Encrypt bool
|
||||||
|
|||||||
13
cmd/anydb.go
13
cmd/anydb.go
@@ -413,13 +413,6 @@ TEMPLATES
|
|||||||
|
|
||||||
.Key - string
|
.Key - string
|
||||||
.Value - string
|
.Value - string
|
||||||
To be able to use the value in a template, you'll need to add the
|
|
||||||
"-s" flag so that values are included in output data stream.
|
|
||||||
Otherwise you can only use ".Preview".
|
|
||||||
|
|
||||||
.Preview string
|
|
||||||
First line of entry value (if it is a string).
|
|
||||||
|
|
||||||
.Bin - []byte
|
.Bin - []byte
|
||||||
.Created - timestamp.Time
|
.Created - timestamp.Time
|
||||||
To retrieve a string representation of the timestamp, use
|
To retrieve a string representation of the timestamp, use
|
||||||
@@ -511,7 +504,7 @@ REST API
|
|||||||
Some curl example calls to the API:
|
Some curl example calls to the API:
|
||||||
|
|
||||||
Post a new key: curl -X PUT localhost:8787/anydb/v1/ \ -H 'Content-Type:
|
Post a new key: curl -X PUT localhost:8787/anydb/v1/ \ -H 'Content-Type:
|
||||||
application/json' \ -d '{"key":"foo","data":"bar"}'
|
application/json' \ -d '{"key":"foo","val":"bar"}'
|
||||||
|
|
||||||
Retrieve the value:
|
Retrieve the value:
|
||||||
|
|
||||||
@@ -521,10 +514,6 @@ REST API
|
|||||||
|
|
||||||
curl localhost:8787/anydb/v1/
|
curl localhost:8787/anydb/v1/
|
||||||
|
|
||||||
Delete an entry:
|
|
||||||
|
|
||||||
curl -s -X DELETE http://localhost:8787/anydb/v1/foo
|
|
||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
In order to report a bug, unexpected behavior, feature requests or to
|
In order to report a bug, unexpected behavior, feature requests or to
|
||||||
submit a patch, please open an issue on github:
|
submit a patch, please open an issue on github:
|
||||||
|
|||||||
Reference in New Issue
Block a user