Documentation ¶
Index ¶
- Variables
- type JWTResponse
- type OAuthResponse
- type RestApi
- func (api *RestApi) ExecuteDeployPlan(plans map[string]types.Plan, targetDir string, verbose bool) ([]*io.ReadCloser, error)
- func (api *RestApi) ExecutePlanItem(plan types.Plan, targetDir string, verbose bool) (*io.ReadCloser, error)
- func (api *RestApi) GetDeployPlan(payload io.Reader, verbose bool) (map[string]types.Plan, error)
- type RestConnection
- func (conn *RestConnection) GetJWT() error
- func (conn *RestConnection) MakeJWTRequest(method string, url string, payload io.Reader, contentType string) (result *io.ReadCloser, err error)
- func (conn *RestConnection) MakeRequest(method string, url string, payload io.Reader, contentType string) (result *io.ReadCloser, err error)
- func (conn *RestConnection) Refresh() error
Constants ¶
This section is empty.
Variables ¶
View Source
var VERSION string = "0.4.3"
Functions ¶
This section is empty.
Types ¶
type JWTResponse ¶
type JWTResponse struct {
Token string `json:"token"`
}
type OAuthResponse ¶
type RestApi ¶
type RestApi struct {
Connection *RestConnection
}
func Login ¶
func Login(host, username, password, apiVersion, metadataServiceProxy, dataServiceProxy string, verbose bool) (api *RestApi, err error)
Login logs a given user into a target Skuid Platform site and returns a RestApi connection that can be used to make HTTP requests
func (*RestApi) ExecuteDeployPlan ¶
func (api *RestApi) ExecuteDeployPlan(plans map[string]types.Plan, targetDir string, verbose bool) ([]*io.ReadCloser, error)
ExecuteDeployPlan executes a map of plan items in a deployment plan
func (*RestApi) ExecutePlanItem ¶
func (api *RestApi) ExecutePlanItem(plan types.Plan, targetDir string, verbose bool) (*io.ReadCloser, error)
ExecutePlanItem executes a particular item in a deployment plan
type RestConnection ¶
type RestConnection struct { AccessToken string APIVersion string ClientId string ClientSecret string Host string Password string Username string JWT string MetadataServiceProxy *url.URL DataServiceProxy *url.URL }
func (*RestConnection) GetJWT ¶
func (conn *RestConnection) GetJWT() error
func (*RestConnection) MakeJWTRequest ¶
func (conn *RestConnection) MakeJWTRequest(method string, url string, payload io.Reader, contentType string) (result *io.ReadCloser, err error)
MakeJWTRequest Executes HTTP request using a jwt
func (*RestConnection) MakeRequest ¶
func (conn *RestConnection) MakeRequest(method string, url string, payload io.Reader, contentType string) (result *io.ReadCloser, err error)
MakeRequest Executes an HTTP request using a session token
func (*RestConnection) Refresh ¶
func (conn *RestConnection) Refresh() error
Refresh is used to obtain an OAuth2 access_token
Click to show internal directories.
Click to hide internal directories.