good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Trevor Judice
jrpc
Commits
cb54b1c9
Commit
cb54b1c9
authored
Dec 28, 2022
by
a
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gfx.cafe:open/jrpc
parents
7022374a
fc42ade2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
middleware/log.go
+1
-1
1 addition, 1 deletion
middleware/log.go
openrpc/types/types.go
+39
-7
39 additions, 7 deletions
openrpc/types/types.go
with
40 additions
and
8 deletions
middleware/log.go
+
1
−
1
View file @
cb54b1c9
...
@@ -17,7 +17,7 @@ func Logger(next jrpc.Handler) jrpc.Handler {
...
@@ -17,7 +17,7 @@ func Logger(next jrpc.Handler) jrpc.Handler {
log
.
Trace
()
.
log
.
Trace
()
.
Stringer
(
"time"
,
time
.
Since
(
start
))
.
Stringer
(
"time"
,
time
.
Since
(
start
))
.
Str
(
"remote"
,
r
.
Remote
())
.
Str
(
"remote"
,
r
.
Remote
())
.
Str
(
"method"
,
r
.
Method
()
)
.
Str
(
"method"
,
r
.
Method
)
.
Str
(
"params"
,
string
(
r
.
Msg
()
.
Params
))
.
Msg
(
"RPC Request"
)
Str
(
"params"
,
string
(
r
.
Msg
()
.
Params
))
.
Msg
(
"RPC Request"
)
}
}
return
jrpc
.
HandlerFunc
(
fn
)
return
jrpc
.
HandlerFunc
(
fn
)
...
...
This diff is collapsed.
Click to expand it.
openrpc/types/types.go
+
39
−
7
View file @
cb54b1c9
...
@@ -64,6 +64,7 @@ type Schema struct {
...
@@ -64,6 +64,7 @@ type Schema struct {
type
Param
struct
{
type
Param
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Description
string
`json:"description,omitempty"`
Required
bool
`json:"required"`
Required
bool
`json:"required"`
Schema
Schema
`json:"schema"`
Schema
Schema
`json:"schema"`
}
}
...
@@ -75,9 +76,40 @@ type Result struct {
...
@@ -75,9 +76,40 @@ type Result struct {
type
Method
struct
{
type
Method
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Tags
[]
Tag
`json:"tags,omitempty"`
Summary
string
`json:"summary"`
Summary
string
`json:"summary"`
Params
[]
Param
`json:"params"`
Params
[]
Param
`json:"params"`
Result
Result
`json:"result"`
Result
Result
`json:"result"`
Examples
[]
ExamplePairing
`json:"examples,omitempty"`
}
type
Tag
struct
{
Ref
string
`json:"$ref,omitempty"`
Name
string
`json:"name"`
Summary
string
`json:"summary,omitempty"`
Description
string
`json:"description,omitempty"`
ExternalDocs
*
ExternalDocumentation
`json:"externalDocs,omitempty"`
}
type
ExternalDocumentation
struct
{
Description
string
`json:"description,omitempty"`
URL
string
`json:"url,omitempty"`
}
type
ExamplePairing
struct
{
Name
string
`json:"name"`
Description
string
`json:"description,omitempty"`
Summary
string
`json:"summary,omitempty"`
Params
[]
Example
`json:"params"`
Result
Example
`json:"result"`
}
type
Example
struct
{
Ref
string
`json:"$ref,omitempty"`
Name
string
`json:"name"`
Summary
string
`json:"summary,omitempty"`
Description
string
`json:"description,omitempty"`
Value
any
`json:"value"`
}
}
func
(
m
*
Method
)
Namespace
()
string
{
func
(
m
*
Method
)
Namespace
()
string
{
...
...
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