mirror of
https://github.com/foomo/contentfulvalidation.git
synced 2025-10-16 12:25:37 +00:00
Merge pull request #8 from foomo/feat/publication-restrictions
feat/publication-restrictions
This commit is contained in:
commit
98a1d35f47
@ -5,13 +5,13 @@ module:
|
||||
targets:
|
||||
validation:
|
||||
services:
|
||||
/services/contenfulvalidation/validation: Validation
|
||||
/services/contentfulvalidation/validation: Validation
|
||||
package: github.com/foomo/contentfulvalidation/validation
|
||||
tsrpc:
|
||||
- Validation
|
||||
webhook:
|
||||
services:
|
||||
/services/contenfulvalidation/webhook: Webhook
|
||||
/services/contentfulvalidation/webhook: Webhook
|
||||
package: github.com/foomo/contentfulvalidation/webhook
|
||||
tsrpc:
|
||||
- Webhook
|
||||
|
||||
@ -24,7 +24,7 @@ type ValidationGoTSRPCProxy struct {
|
||||
}
|
||||
|
||||
func NewDefaultValidationGoTSRPCProxy(service Validation) *ValidationGoTSRPCProxy {
|
||||
return NewValidationGoTSRPCProxy(service, "/services/contenfulvalidation/validation")
|
||||
return NewValidationGoTSRPCProxy(service, "/services/contentfulvalidation/validation")
|
||||
}
|
||||
|
||||
func NewValidationGoTSRPCProxy(service Validation, endpoint string) *ValidationGoTSRPCProxy {
|
||||
|
||||
@ -26,7 +26,7 @@ type HTTPValidationGoTSRPCClient struct {
|
||||
}
|
||||
|
||||
func NewDefaultValidationGoTSRPCClient(url string) *HTTPValidationGoTSRPCClient {
|
||||
return NewValidationGoTSRPCClient(url, "/services/contenfulvalidation/validation")
|
||||
return NewValidationGoTSRPCClient(url, "/services/contentfulvalidation/validation")
|
||||
}
|
||||
|
||||
func NewValidationGoTSRPCClient(url string, endpoint string) *HTTPValidationGoTSRPCClient {
|
||||
|
||||
@ -36,7 +36,9 @@ func (ap *AttributeProvider) Init() error {
|
||||
_, err := s.Every(1).Day().At("03:00").Do(func() {
|
||||
ap.attributes = ap.updateFunc(ap.ctx)
|
||||
})
|
||||
log.Must(ap.l, err, "failed to ...")
|
||||
if err != nil {
|
||||
log.Must(ap.l, err, "failed to initialize attribute provider scheduler")
|
||||
}
|
||||
s.StartAsync()
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ type WebhookGoTSRPCProxy struct {
|
||||
}
|
||||
|
||||
func NewDefaultWebhookGoTSRPCProxy(service Webhook) *WebhookGoTSRPCProxy {
|
||||
return NewWebhookGoTSRPCProxy(service, "/services/contenfulvalidation/webhook")
|
||||
return NewWebhookGoTSRPCProxy(service, "/services/contentfulvalidation/webhook")
|
||||
}
|
||||
|
||||
func NewWebhookGoTSRPCProxy(service Webhook, endpoint string) *WebhookGoTSRPCProxy {
|
||||
|
||||
@ -22,7 +22,7 @@ type HTTPWebhookGoTSRPCClient struct {
|
||||
}
|
||||
|
||||
func NewDefaultWebhookGoTSRPCClient(url string) *HTTPWebhookGoTSRPCClient {
|
||||
return NewWebhookGoTSRPCClient(url, "/services/contenfulvalidation/webhook")
|
||||
return NewWebhookGoTSRPCClient(url, "/services/contentfulvalidation/webhook")
|
||||
}
|
||||
|
||||
func NewWebhookGoTSRPCClient(url string, endpoint string) *HTTPWebhookGoTSRPCClient {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user