Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
go-orusapi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orus-io
go-orusapi
Commits
a747e2ea1c93
Commit
a747e2ea1c93
authored
2 months ago
by
Christophe de Vienne
Browse files
Options
Downloads
Patches
Plain Diff
cmd: add Redner support
parent
22c9516be333
No related branches found
No related tags found
No related merge requests found
Pipeline
#118463
failed
2 months ago
Changes
4
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmd/program.go
+1
-0
1 addition, 0 deletions
cmd/program.go
cmd/redner.go
+46
-0
46 additions, 0 deletions
cmd/redner.go
go.mod
+20
-3
20 additions, 3 deletions
go.mod
go.sum
+141
-5
141 additions, 5 deletions
go.sum
with
208 additions
and
8 deletions
cmd/program.go
+
1
−
0
View file @
a747e2ea
...
...
@@ -51,6 +51,7 @@
TokenOptions
*
auth
.
TokenOptions
DatabaseOptions
database
.
Options
XbusOptions
XbusOptions
RednerOptions
RednerOptions
Ext
E
...
...
This diff is collapsed.
Click to expand it.
cmd/redner.go
0 → 100644
+
46
−
0
View file @
a747e2ea
package
cmd
import
(
redner
"orus.io/orus-io/go-redner/client"
)
type
RednerOptions
struct
{
NoSSL
bool
`long:"no-ssl" ini-name:"no-ssl" description:"disable ssl"`
Host
string
`long:"host" ini-name:"host" description:"Redner host"`
APIKey
string
`long:"api-key" ini-name:"api-key" description:"Redner api-key"`
Account
string
`long:"account" ini-name:"account" description:"Redner account name"`
client
*
redner
.
Redner
}
func
(
options
*
RednerOptions
)
Client
()
*
redner
.
Redner
{
if
options
.
client
==
nil
&&
options
.
Host
!=
""
{
schemes
:=
[]
string
{
"https"
}
if
options
.
NoSSL
{
schemes
=
[]
string
{
"http"
}
}
options
.
client
=
redner
.
NewHTTPClientWithConfig
(
nil
,
redner
.
DefaultTransportConfig
()
.
WithHost
(
options
.
Host
)
.
WithSchemes
(
schemes
),
)
options
.
client
.
SetAPIKey
(
options
.
APIKey
)
}
return
options
.
client
}
func
WithRedner
[
E
any
]()
Option
[
E
]
{
return
func
(
program
*
Program
[
E
])
{
g
,
err
:=
program
.
Parser
.
AddGroup
(
"Redner"
,
"Redner options"
,
&
program
.
RednerOptions
)
if
err
!=
nil
{
panic
(
err
)
}
g
.
Namespace
=
"redner"
g
.
EnvNamespace
=
"REDNER"
}
}
func
(
program
*
Program
[
E
])
Redner
()
*
redner
.
Redner
{
return
program
.
RednerOptions
.
Client
()
}
This diff is collapsed.
Click to expand it.
go.mod
+
20
−
3
View file @
a747e2ea
...
...
@@ -5,6 +5,7 @@
require (
github.com/Masterminds/squirrel
v1.5.4
github.com/fatih/structtag
v1.2.0
github.com/getkin/kin-openapi
v0.128.0
github.com/getsentry/sentry-go
v0.24.1
github.com/go-openapi/runtime
v0.26.0
github.com/go-openapi/swag
v0.23.0
...
...
@@ -19,5 +20,6 @@
github.com/prometheus/client_golang
v1.17.0
github.com/rs/zerolog
v1.31.0
github.com/stretchr/testify
v1.9.0
github.com/timewasted/go-accept-headers
v0.0.0-20130320203746-c78f304b1b09
golang.org/x/net
v0.15.0
golang.org/x/term
v0.12.0
...
...
@@ -22,7 +24,9 @@
golang.org/x/net
v0.15.0
golang.org/x/term
v0.12.0
gopkg.in/dgrijalva/jwt-go.v3
v3.2.0
orus.io/orus-io/go-redner
v0.0.0-20240212152601-2bd8ade04023
orus.io/xbus/xbus-stdlib
v1.3.3
xbus.io/go-xbus/v4
v4.0.0-20230823140355-edd2d56a84db
)
require (
...
...
@@ -24,8 +28,9 @@
orus.io/xbus/xbus-stdlib
v1.3.3
xbus.io/go-xbus/v4
v4.0.0-20230823140355-edd2d56a84db
)
require (
github.com/asaskevich/govalidator
v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks
v1.0.1 // indirect
github.com/cespare/xxhash/v2
v2.2.0 // indirect
github.com/davecgh/go-spew
v1.1.1 // indirect
...
...
@@ -29,5 +34,6 @@
github.com/beorn7/perks
v1.0.1 // indirect
github.com/cespare/xxhash/v2
v2.2.0 // indirect
github.com/davecgh/go-spew
v1.1.1 // indirect
github.com/dgrijalva/jwt-go
v3.2.0+incompatible // indirect
github.com/docker/go-units
v0.5.0 // indirect
github.com/fsnotify/fsnotify
v1.6.0 // indirect
...
...
@@ -32,4 +38,7 @@
github.com/docker/go-units
v0.5.0 // indirect
github.com/fsnotify/fsnotify
v1.6.0 // indirect
github.com/getkin/kin-openapi
v0.128.0 // indirect
github.com/go-logr/logr
v1.2.3 // indirect
github.com/go-logr/stdr
v1.2.2 // indirect
github.com/go-openapi/analysis
v0.21.4 // indirect
github.com/go-openapi/errors
v0.20.3 // indirect
github.com/go-openapi/jsonpointer
v0.21.0 // indirect
...
...
@@ -35,4 +44,9 @@
github.com/go-openapi/jsonpointer
v0.21.0 // indirect
github.com/go-openapi/jsonreference
v0.20.0 // indirect
github.com/go-openapi/loads
v0.21.2 // indirect
github.com/go-openapi/spec
v0.20.8 // indirect
github.com/go-openapi/strfmt
v0.21.7 // indirect
github.com/go-openapi/validate
v0.22.1 // indirect
github.com/golang/protobuf
v1.5.3 // indirect
github.com/hashicorp/errwrap
v1.1.0 // indirect
github.com/hashicorp/go-multierror
v1.1.1 // indirect
...
...
@@ -58,6 +72,8 @@
github.com/nats-io/nuid
v1.0.1 // indirect
github.com/nats-rpc/nrpc
v0.0.0-20230331165850-dd9d3cdece2a // indirect
github.com/nightlyone/lockfile
v1.0.0 // indirect
github.com/oklog/ulid
v1.3.1 // indirect
github.com/opentracing/opentracing-go
v1.2.0 // indirect
github.com/pelletier/go-toml/v2
v2.1.0 // indirect
github.com/perimeterx/marshmallow
v1.1.5 // indirect
github.com/pmezard/go-difflib
v1.0.0 // indirect
...
...
@@ -71,9 +87,11 @@
github.com/spf13/pflag
v1.0.5 // indirect
github.com/spf13/viper
v1.16.0 // indirect
github.com/subosito/gotenv
v1.6.0 // indirect
github.com/timewasted/go-accept-headers
v0.0.0-20130320203746-c78f304b1b09 // indirect
go.mongodb.org/mongo-driver
v1.11.3 // indirect
go.opentelemetry.io/otel
v1.14.0 // indirect
go.opentelemetry.io/otel/trace
v1.14.0 // indirect
go.uber.org/atomic
v1.11.0 // indirect
golang.org/x/crypto
v0.13.0 // indirect
golang.org/x/sys
v0.21.0 // indirect
golang.org/x/text
v0.13.0 // indirect
google.golang.org/protobuf
v1.31.0 // indirect
...
...
@@ -75,9 +93,8 @@
go.uber.org/atomic
v1.11.0 // indirect
golang.org/x/crypto
v0.13.0 // indirect
golang.org/x/sys
v0.21.0 // indirect
golang.org/x/text
v0.13.0 // indirect
google.golang.org/protobuf
v1.31.0 // indirect
gopkg.in/dgrijalva/jwt-go.v3
v3.2.0 // indirect
gopkg.in/ini.v1
v1.67.0 // indirect
gopkg.in/yaml.v2
v2.4.0 // indirect
gopkg.in/yaml.v3
v3.0.1 // indirect
...
...
This diff is collapsed.
Click to expand it.
go.sum
+
141
−
5
View file @
a747e2ea
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment