Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateInstallation(installationRequest *CreateInstallationRequest) (*CreateInstallationResponse, error)
- func (c *Client) DeleteInstallation(installationID string) error
- func (c *Client) DeleteStripeWebhook(owner string) error
- func (c *Client) GetInstallations() ([]*Installation, error)
- func (c *Client) GetMyCustomers() ([]*Customer, error)
- func (c *Client) Login(email, password string) (*User, error)
- func (c *Client) RegisterStripeWebhook(url, owner string) (string, error)
- func (c *Client) SignUp(email, password string) (*SignupResponse, error)
- func (c *Client) VerifyUser(userID string) error
- type CreateInstallationRequest
- type CreateInstallationResponse
- type Customer
- type Installation
- type RegisterStripeWebhookResponse
- type SignupResponse
- type User
Constants ¶
const ( // SessionHeader is the header key for a session. SessionHeader = "Token" // HeaderAuthorization is the HTTP header Authorization. HeaderAuthorization = "Authorization" // AuthorizationBearer is the bearer HTTP authorization type. AuthorizationBearer = "BEARER" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client CWS client to perform actions the against CWS service
func (*Client) CreateInstallation ¶
func (c *Client) CreateInstallation(installationRequest *CreateInstallationRequest) (*CreateInstallationResponse, error)
CreateInstallation creates a new installation in CWS using the parameters paseed in the installation request
func (*Client) DeleteInstallation ¶
DeleteInstallation deleted the installation passed as parameter
func (*Client) DeleteStripeWebhook ¶ added in v0.3.11
DeleteStripeWebhook Calls test portal's internal API to delete a webhook endpoint in Stripe
func (*Client) GetInstallations ¶
func (c *Client) GetInstallations() ([]*Installation, error)
GetInstallations returns the installations associated that belongs to the logged user
func (*Client) GetMyCustomers ¶
GetMyCustomers returns the customers asociated to the logged user
func (*Client) RegisterStripeWebhook ¶ added in v0.3.11
RegisterStripeWebhook Calls test portal's internal API to register a new webhook endpoint in Stripe
func (*Client) SignUp ¶
func (c *Client) SignUp(email, password string) (*SignupResponse, error)
SignUp sign up a new user in the CWS service
func (*Client) VerifyUser ¶
VerifyUser verifies the user passed a parameter
type CreateInstallationRequest ¶
type CreateInstallationRequest struct {
CustomerID string `json:"customer_id"`
RequestedWorkspaceName string `json:"workspace_name"`
Version string `json:"version"`
Image string `json:"image"`
GroupID string `json:"group_id"`
APILock bool `json:"api_lock"`
}
CreateInstallationRequest needed parameters to create a new installation in CWS
type CreateInstallationResponse ¶
type CreateInstallationResponse struct {
InstallationID string `json:"installationId"`
Token string `json:"token"`
}
CreateInstallationResponse model returned after a installation is created successfully
type Installation ¶
Installation model that represents a CWS installation
type RegisterStripeWebhookResponse ¶ added in v0.3.11
type RegisterStripeWebhookResponse struct {
Secret string `json:"secret"`
}
RegisterStripeWebhookResponse model returned after webhook endpoint is registered in Stripe by the test portal
type SignupResponse ¶
SignupResponse model returned after the signup is called succesfully