Documentation ¶
Index ¶
- type Client
- func (c *Client) CredentialsList() ([]Credential, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) DoJSON(req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) DoJSONRequest(method string, path string, body interface{}, v interface{}) (*http.Response, error)
- func (c *Client) NewRequest(method string, path string, body interface{}) (*http.Request, error)
- func (c *Client) ServersList() ([]Server, error)
- func (c *Client) SetUserAgent(ua string) error
- type Credential
- type CredentialsListResponse
- type Server
- type ServersListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Base URL for API requests. BaseURL *url.URL // User agent for client UserAgent string // contains filtered or unexported fields }
Client enables communication with the Laravel Forge API
func (*Client) CredentialsList ¶
func (c *Client) CredentialsList() ([]Credential, error)
CredentialsList
func (*Client) DoJSONRequest ¶
func (c *Client) DoJSONRequest(method string, path string, body interface{}, v interface{}) (*http.Response, error)
DoJSONRequest is a convenience method
func (*Client) NewRequest ¶
NewRequest returns a new pre-configured HTTP Request
func (*Client) SetUserAgent ¶
SetUserAgent adds an additional user agent string to all requests
type Credential ¶
Credential
type CredentialsListResponse ¶
type CredentialsListResponse struct {
Credentials []Credential `json:"credentials"`
}
CredentialsListResponse
type Server ¶
type Server struct { ID int `json:"id"` CredentialID int `json:"credential_id"` Name string `json:"name"` PHPVersion string `json:"php_version"` IsReady bool `json:"is_ready"` }
Server
type ServersListResponse ¶
type ServersListResponse struct {
Servers []Server `json:"servers"`
}
ServersListResponse
Click to show internal directories.
Click to hide internal directories.