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/01/11 01:03:28 UTC

[GitHub] dubeejw closed pull request #58: Remove client code that will be removed from the API.

dubeejw closed pull request #58: Remove client code that will be removed from the API.
URL: https://github.com/apache/incubator-openwhisk-client-go/pull/58
 
 
   

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/namespace.go b/whisk/namespace.go
index 0fc24032..03b77c0c 100644
--- a/whisk/namespace.go
+++ b/whisk/namespace.go
@@ -27,14 +27,6 @@ import (
 
 type Namespace struct {
     Name                string  `json:"name"`
-    Contents                    `json:"contents,omitempty"`
-}
-
-type Contents struct {
-    Actions  []Action       `json:"actions"`
-    Packages []Package      `json:"packages"`
-    Triggers []Trigger      `json:"triggers"`
-    Rules    []Rule         `json:"rules"`
 }
 
 type NamespaceService struct {
@@ -102,33 +94,3 @@ func (s *NamespaceService) List() ([]Namespace, *http.Response, error) {
     Debug(DbgInfo, "Returning []namespaces: %#v\n", namespaces)
     return namespaces, resp, nil
 }
-
-func (s *NamespaceService) Get(namespace string) (*Namespace, *http.Response, error) {
-
-    if len(namespace) == 0 {
-        namespace = s.client.Config.Namespace
-    }
-
-    s.client.Namespace = namespace
-    resNamespace := &Namespace{
-        Name: namespace,
-    }
-
-    req, err := s.client.NewRequest("GET", "", nil, IncludeNamespaceInUrl)
-    if err != nil {
-        Debug(DbgError, "s.client.NewRequest(GET) error: %s\n", err)
-        errStr := wski18n.T("Unable to create HTTP request for GET: {{.err}}", map[string]interface{}{"err": err})
-        werr := MakeWskErrorFromWskError(errors.New(errStr), err, EXIT_CODE_ERR_GENERAL, DISPLAY_MSG, NO_DISPLAY_USAGE)
-        return resNamespace, nil, werr
-    }
-
-    resp, err := s.client.Do(req, &resNamespace.Contents, ExitWithSuccessOnTimeout)
-    if err != nil {
-        Debug(DbgError, "s.client.Do() error - HTTP req %s; error '%s'\n", req.URL.String(), err)
-        return resNamespace, resp, err
-    }
-
-    Debug(DbgInfo, "Returning namespace: %#v\n", resNamespace)
-
-    return resNamespace, resp, nil
-}


 

----------------------------------------------------------------
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