platform

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 OAuthResponse struct {
	ExpiresIn   int    `json:"expires_in"`
	AccessToken string `json:"access_token"`
}

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

func (*RestApi) GetDeployPlan

func (api *RestApi) GetDeployPlan(payload io.Reader, verbose bool) (map[string]types.Plan, error)

GetDeployPlan fetches a deploymnent plan from Skuid Platform API

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL