forked from cuelang/cue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkg.go
60 lines (54 loc) · 970 Bytes
/
pkg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Code generated by go generate. DO NOT EDIT.
//go:generate rm pkg.go
//go:generate go run ../../gen/gen.go
package http
import (
"github.com/solo-io/cue/internal/core/adt"
"github.com/solo-io/cue/pkg/internal"
)
func init() {
internal.Register("tool/http", pkg)
}
var _ = adt.TopKind // in case the adt package isn't used
var pkg = &internal.Package{
Native: []*internal.Builtin{},
CUE: `{
Get: Do & {
method: "GET"
}
Post: Do & {
method: "POST"
}
Put: Do & {
method: "PUT"
}
Delete: Do & {
method: "DELETE"
}
Do: {
$id: *"tool/http.Do" | "http"
method: string
url: string
request: {
body?: bytes | string
header: {
[string]: string | [...string]
}
trailer: {
[string]: string | [...string]
}
}
response: {
status: string
statusCode: int
body: *bytes | string
header: {
[string]: string | [...string]
}
trailer: {
[string]: string | [...string]
}
}
}
}`,
}