Documentation ¶
Index ¶
- Variables
- func ErrNotFound(err error) bool
- func LogHttpResponse(reqDesc string, reqURL *url.URL, resp *http.Response, body interface{}, ...)
- func Provider() *schema.Provider
- func SetResData(d *schema.ResourceData, m map[string]interface{}, n string)
- func SetResDataFrom(d *schema.ResourceData, m map[string]interface{}, dn, n string)
- type ClientConfig
- type CreateTeamNamedNetworkParams
- type JobStorage
- type JobStorageServer
- type MapIf
- func (m *MapIf) Append(d *schema.ResourceData, k string)
- func (m *MapIf) AppendAs(d *schema.ResourceData, k, nk string)
- func (m *MapIf) AppendAsIfSet(d *schema.ResourceData, k, nk string)
- func (m *MapIf) AppendIfSet(d *schema.ResourceData, k string)
- func (m *MapIf) AppendV(d *schema.ResourceData, k, v string)
- type NamedNetwork
- type Network
- type PaperspaceClient
- func (paperspaceClient *PaperspaceClient) CreateMachine(data []byte) (id string, err error)
- func (paperspaceClient *PaperspaceClient) CreateTeamNamedNetwork(teamID int, createNamedNetworkParams CreateTeamNamedNetworkParams) error
- func (paperspaceClient *PaperspaceClient) DeleteMachine(id string) (err error)
- func (paperspaceClient *PaperspaceClient) GetJobStorageByRegion(teamID int, region string) (JobStorage, error)
- func (paperspaceClient *PaperspaceClient) GetMachine(id string) (body map[string]interface{}, err error)
- func (paperspaceClient *PaperspaceClient) GetTeamNamedNetwork(teamID int, name string) (*NamedNetwork, error)
- func (paperspaceClient *PaperspaceClient) GetTeamNamedNetworkById(teamID int, id string) (*NamedNetwork, error)
- func (paperspaceClient *PaperspaceClient) GetTeamNamedNetworks(teamID int) ([]NamedNetwork, error)
- func (paperspaceClient *PaperspaceClient) NewHttpRequest(method, url string, buf io.Reader) (*http.Request, error)
- func (paperspaceClient *PaperspaceClient) Request(method string, url string, data []byte) (body map[string]interface{}, statusCode int, err error)
- func (paperspaceClient *PaperspaceClient) RequestInterface(method string, url string, params, result interface{}) (res *http.Response, err error)
- type StorageRegion
Constants ¶
This section is empty.
Variables ¶
View Source
var MachineDeleteNotFoundError = "Error on DeleteMachine: machine not found"
View Source
var MachineNotFoundError = "Error on GetMachine: machine not found"
View Source
var RegionMap = map[string]int{
"East Coast (NY2)": 1,
"West Coast (CA1)": 2,
"Europe (AMS1)": 3,
}
Functions ¶
func ErrNotFound ¶
func LogHttpResponse ¶
func LogHttpResponse(reqDesc string, reqURL *url.URL, resp *http.Response, body interface{}, err error)
LogHttpResponse logs http response fields
func SetResData ¶
func SetResData(d *schema.ResourceData, m map[string]interface{}, n string)
func SetResDataFrom ¶
func SetResDataFrom(d *schema.ResourceData, m map[string]interface{}, dn, n string)
Types ¶
type ClientConfig ¶
func (*ClientConfig) Client ¶
func (c *ClientConfig) Client() (paperspaceClient PaperspaceClient)
type JobStorage ¶
type JobStorage struct { Handle string `json:"handle"` TeamID int `json:"teamId"` Server JobStorageServer `json:"jobStorageServer"` }
type JobStorageServer ¶
type JobStorageServer struct { IP string `json:"ipAddress"` StorageRegion StorageRegion `json:"storageRegion"` }
type MapIf ¶
type MapIf map[string]interface{}
func (*MapIf) AppendAsIfSet ¶
func (m *MapIf) AppendAsIfSet(d *schema.ResourceData, k, nk string)
func (*MapIf) AppendIfSet ¶
func (m *MapIf) AppendIfSet(d *schema.ResourceData, k string)
type NamedNetwork ¶
type PaperspaceClient ¶
func (*PaperspaceClient) CreateMachine ¶
func (paperspaceClient *PaperspaceClient) CreateMachine(data []byte) (id string, err error)
func (*PaperspaceClient) CreateTeamNamedNetwork ¶
func (paperspaceClient *PaperspaceClient) CreateTeamNamedNetwork(teamID int, createNamedNetworkParams CreateTeamNamedNetworkParams) error
func (*PaperspaceClient) DeleteMachine ¶
func (paperspaceClient *PaperspaceClient) DeleteMachine(id string) (err error)
func (*PaperspaceClient) GetJobStorageByRegion ¶
func (paperspaceClient *PaperspaceClient) GetJobStorageByRegion(teamID int, region string) (JobStorage, error)
func (*PaperspaceClient) GetMachine ¶
func (paperspaceClient *PaperspaceClient) GetMachine(id string) (body map[string]interface{}, err error)
func (*PaperspaceClient) GetTeamNamedNetwork ¶
func (paperspaceClient *PaperspaceClient) GetTeamNamedNetwork(teamID int, name string) (*NamedNetwork, error)
func (*PaperspaceClient) GetTeamNamedNetworkById ¶
func (paperspaceClient *PaperspaceClient) GetTeamNamedNetworkById(teamID int, id string) (*NamedNetwork, error)
func (*PaperspaceClient) GetTeamNamedNetworks ¶
func (paperspaceClient *PaperspaceClient) GetTeamNamedNetworks(teamID int) ([]NamedNetwork, error)
func (*PaperspaceClient) NewHttpRequest ¶
func (*PaperspaceClient) RequestInterface ¶
type StorageRegion ¶
type StorageRegion struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.