Documentation ¶
Index ¶
- func Cancel() error
- func CheckConection(client *http.Client, controllerURL url.URL) error
- func CreateHTTPClient(sslVerify bool) *http.Client
- func Login(controllerURL url.URL, username string, password string, sslVerify bool) error
- func Logout() error
- func Passwd(username string, password string, newPassword string) error
- func Regenerate(username string, all bool) error
- func Register(controllerURL url.URL, username string, password string, email string, ...) error
- func Webbrowser(u string) (err error)
- type Client
- func (c Client) BasicRequest(method string, path string, body []byte) (string, error)
- func (c Client) CreateRemote(remote, appID string) error
- func (c Client) DeleteRemote(appID string) error
- func (c Client) DetectApp() (string, error)
- func (c Client) RemoteURL(appID string) string
- func (c Client) Request(method string, path string, body []byte) (*http.Response, error)
- func (c Client) Save() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConection ¶
CheckConection checks that the user is connected to a network and the URL points to a valid controller.
func CreateHTTPClient ¶
CreateHTTPClient creates a HTTP Client with proper SSL options.
func Regenerate ¶
Regenerate regenenerates a user's token.
func Register ¶
func Register(controllerURL url.URL, username string, password string, email string, sslVerify bool, loginAfter bool) error
Register creates a account on a Deis controller.
func Webbrowser ¶
Webbrowser opens a URL with the default browser.
Types ¶
type Client ¶
type Client struct { // HTTP client used to communicate with the API. HTTPClient *http.Client // SSLVerify determines whether or not to verify SSL conections. SSLVerify bool // URL used to communicate with the controller. ControllerURL url.URL // Token is used to authenticate the request against the API. Token string // Username is the name of the user performing requests against the API. Username string }
Client oversees the interaction between the client and controller
func (Client) BasicRequest ¶
BasicRequest makes a simple http request on the controller.
func (Client) CreateRemote ¶
CreateRemote adds a git remote in the current directory.
func (Client) DeleteRemote ¶
DeleteRemote removes a git remote in the current directory.
Click to show internal directories.
Click to hide internal directories.