~bigbes/core-go

ref: 3dc39b678422dbb6aa9f49daca8538415d187c71 core-go/client/graphql.go -rw-r--r-- 4.5 KiB
e22c3e1c — Conrad Hoffmann 9 months ago
Fix a bunch of linter complaints
39c3fd1e — Conrad Hoffmann 9 months ago
Run modernize

See https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize

It's mostly interface{} -> any, but also two quite useful applications
of slices.Contains.
3e875f28 — Conrad Hoffmann 10 months ago
objects: bring back support for plain HTTP

This got lost during the transition from minio to S3 client.
87bd2cb1 — Drew DeVault 10 months ago
client: improve user agent
3e1d5d3a — Drew DeVault 11 months ago
config: add GetAPI
bf509aee — Drew DeVault 1 year, 6 months ago
client: add User-Agent to outgoing requests
562662dc — Robin Jarry 1 year, 8 months ago
graphql: add support for multipart file uploads

Inspire from the python implementation in core.sr.ht.

Link: https://git.sr.ht/~sircmpwn/core.sr.ht/tree/7bcbc8ba8f4e/item/srht/graphql/client.py
Signed-off-by: Robin Jarry <robin@jarry.cc>
864816cf — Simon Ser 2 years ago
client: rename Execute to Do

583d0b1bcb08 ("client/graphql: handle GraphQL errors") changed
Execute behavior by wrapping the result into a struct with "data"
and "errors" fields. This is a breaking change, but it's hard to
spot when upgrading core-go because it won't cause a compilation
error.

Rename Execute to Do to break the build and force callers to update
accordingly.
583d0b1b — Simon Ser 2 years ago
client/graphql: handle GraphQL errors

Instead of leaving it up to the caller to check for GraphQL errors,
centralize in core-go.
f44afb10 — Simon Ser 4 years ago
go fmt
12996e4a — Simon Ser 5 years ago
client: add config option to override API origin

If the config file contains an "api-origin" key for a service, prefer it
instead of "origin". This allows users to directly point the Python
frontend to the Go backend for local development, without having to
setup a reverse proxy.

This is the Go port of [1].

While at it, use GetOrigin for symmetry with the Python code.

[1]: https://git.sr.ht/~sircmpwn/meta.sr.ht/commit/6c2ee03923fe65423a2c55e6648f555c08db827a
906acc05 — Drew DeVault 5 years ago
client: populate NodeID from service name
943e2834 — Drew DeVault 5 years ago
Drop leftover references to gql.sr.ht
b0ebfa5f — Drew DeVault 5 years ago
client: import from gql.sr.ht