FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cloudflared/cfapi/tunnel_filter.go at master · embed-coder/cloudflared · GitHub
embed-coder
/
cloudflared
Public
forked from
cloudflare/cloudflared
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cloudflared
/
cfapi
/
tunnel_filter.go
Copy path
More file actions
More file actions
Latest commit
History
History
History
55 lines (42 loc) · 1.05 KB
Breadcrumbs
cloudflared
/
cfapi
/
tunnel_filter.go
Copy path
File metadata and controls
55 lines (42 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
cfapi
import
(
"net/url"
"strconv"
"time"
"github.com/google/uuid"
)
const
(
TimeLayout
=
time
.
RFC3339
)
type
TunnelFilter
struct
{
queryParams
url.
Values
}
func
NewTunnelFilter
()
*
TunnelFilter
{
return
&
TunnelFilter
{
queryParams
: url.
Values
{},
}
}
func
(
f
*
TunnelFilter
)
ByName
(
name
string
) {
f
.
queryParams
.
Set
(
"name"
,
name
)
}
func
(
f
*
TunnelFilter
)
ByNamePrefix
(
namePrefix
string
) {
f
.
queryParams
.
Set
(
"name_prefix"
,
namePrefix
)
}
func
(
f
*
TunnelFilter
)
ExcludeNameWithPrefix
(
excludePrefix
string
) {
f
.
queryParams
.
Set
(
"exclude_prefix"
,
excludePrefix
)
}
func
(
f
*
TunnelFilter
)
NoDeleted
() {
f
.
queryParams
.
Set
(
"is_deleted"
,
"false"
)
}
func
(
f
*
TunnelFilter
)
ByExistedAt
(
existedAt
time.
Time
) {
f
.
queryParams
.
Set
(
"existed_at"
,
existedAt
.
Format
(
TimeLayout
))
}
func
(
f
*
TunnelFilter
)
ByTunnelID
(
tunnelID
uuid.
UUID
) {
f
.
queryParams
.
Set
(
"uuid"
,
tunnelID
.
String
())
}
func
(
f
*
TunnelFilter
)
MaxFetchSize
(
max
uint
) {
f
.
queryParams
.
Set
(
"per_page"
,
strconv
.
Itoa
(
int
(
max
)))
}
func
(
f
TunnelFilter
)
encode
()
string
{
return
f
.
queryParams
.
Encode
()
}
Back
|
FazBrowse Home
|
New Git URL