Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
wb
gocrawlhq
Commits
277845f1
Commit
277845f1
authored
Jun 01, 2022
by
Corentin Barreau
⚜
Browse files
Merge branch 'only-seencheck-discovered' into 'master'
Add seencheck only support to gocrawlhq See merge request
!3
parents
5b231cb0
34d5b93e
Changes
3
Hide whitespace changes
Inline
Side-by-side
discovered.go
View file @
277845f1
...
...
@@ -7,7 +7,7 @@ import (
"net/http"
)
func
(
c
*
Client
)
Discovered
(
URLs
[]
URL
,
URLType
string
,
bypassSeencheck
bool
)
(
discoveredResponse
*
DiscoveredResponse
,
err
error
)
{
func
(
c
*
Client
)
Discovered
(
URLs
[]
URL
,
URLType
string
,
bypassSeencheck
bool
,
seencheckOnly
bool
)
(
discoveredResponse
*
DiscoveredResponse
,
err
error
)
{
expectedStatusCode
:=
201
discoveredResponse
=
new
(
DiscoveredResponse
)
...
...
@@ -19,6 +19,7 @@ func (c *Client) Discovered(URLs []URL, URLType string, bypassSeencheck bool) (d
payload
:=
DiscoveredPayload
{
Project
:
c
.
Project
,
BypassSeencheck
:
bypassSeencheck
,
SeencheckOnly
:
seencheckOnly
,
Type
:
URLType
,
URLs
:
URLsPayload
,
}
...
...
gocrawlhq.go
View file @
277845f1
...
...
@@ -12,7 +12,7 @@ var (
FinishedEndpoint
*
url
.
URL
FeedEndpoint
*
url
.
URL
Version
=
"1.1.
4
"
Version
=
"1.1.
8
"
)
func
Init
(
key
,
secret
,
project
,
HQAddress
string
)
(
c
*
Client
,
err
error
)
{
...
...
models.go
View file @
277845f1
...
...
@@ -25,6 +25,7 @@ type FeedResponse struct {
type
DiscoveredResponse
struct
{
Project
string
`json:"project"`
Type
string
`json:"type"`
URLs
[]
URL
`json:"urls,omitempty"`
}
type
FinishedResponse
struct
{
...
...
@@ -36,6 +37,7 @@ type DiscoveredPayload struct {
Type
string
`json:"type"`
URLs
[]
URL
`json:"urls"`
BypassSeencheck
bool
`json:"bypassSeencheck"`
SeencheckOnly
bool
`json:"seencheckOnly"`
}
type
FinishedPayload
struct
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment