You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/10 03:32:29 UTC
[GitHub] dubee closed pull request #99: Replace trigger service type with
interface
dubee closed pull request #99: Replace trigger service type with interface
URL: https://github.com/apache/incubator-openwhisk-client-go/pull/99
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/whisk/client.go b/whisk/client.go
index d6f25973..c1b36301 100644
--- a/whisk/client.go
+++ b/whisk/client.go
@@ -58,13 +58,21 @@ type ClientInterface interface {
Do(req *http.Request, v interface{}, ExitWithErrorOnTimeout bool, secretToObfuscate ...ObfuscateSet) (*http.Response, error)
}
+type TriggerServiceInterface interface {
+ List(options *TriggerListOptions) ([]Trigger, *http.Response, error)
+ Insert(trigger *Trigger, overwrite bool) (*Trigger, *http.Response, error)
+ Get(triggerName string) (*Trigger, *http.Response, error)
+ Delete(triggerName string) (*Trigger, *http.Response, error)
+ Fire(triggerName string, payload interface{}) (*Trigger, *http.Response, error)
+}
+
type Client struct {
client *http.Client
*Config
Transport *http.Transport
Sdks *SdkService
- Triggers *TriggerService
+ Triggers TriggerServiceInterface
Actions *ActionService
Rules *RuleService
Activations *ActivationService
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services