github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/client/controller/api/apps.go (about)

     1  package api
     2  
     3  // App is the definition of the app object.
     4  type App struct {
     5  	Created string `json:"created"`
     6  	ID      string `json:"id"`
     7  	Owner   string `json:"owner"`
     8  	Updated string `json:"updated"`
     9  	URL     string `json:"url"`
    10  	UUID    string `json:"uuid"`
    11  }
    12  
    13  type Apps []App
    14  
    15  func (a Apps) Len() int           { return len(a) }
    16  func (a Apps) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
    17  func (a Apps) Less(i, j int) bool { return a[i].ID < a[j].ID }
    18  
    19  // AppCreateRequest is the definition of POST /v1/apps/.
    20  type AppCreateRequest struct {
    21  	ID string `json:"id,omitempty"`
    22  }
    23  
    24  // AppUpdateRequest is the definition of POST /v1/apps/<app id>/.
    25  type AppUpdateRequest struct {
    26  	Owner string `json:"owner,omitempty"`
    27  }
    28  
    29  // AppRunRequest is the definition of POST /v1/apps/<app id>/run.
    30  type AppRunRequest struct {
    31  	Command string `json:"command"`
    32  }
    33  
    34  // AppRunResponse is the definition of /v1/apps/<app id>/run.
    35  type AppRunResponse struct {
    36  	Output     string `json:"output"`
    37  	ReturnCode int    `json:"rc"`
    38  }