Documentation ¶
Index ¶
- type Client
- type HTTPClient
- func (c *HTTPClient) Embed(token, title, description, cid string) (Video, error)
- func (c *HTTPClient) Post() error
- func (c *HTTPClient) Powergate(secret string, premium bool) (Powergate, error)
- func (c *HTTPClient) Retrieve(secret string) (string, error)
- func (c *HTTPClient) Signup() error
- func (c *HTTPClient) Token() (string, error)
- func (c *HTTPClient) URL() string
- type Powergate
- type Response
- type User
- type Video
- type Videos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct { Endpoint string `json:"endpoint"` Payload map[string]interface{} `json:"payload"` BaseURL string }
HTTPClient interface to encapsulate the logic behind client
func (*HTTPClient) Embed ¶
func (c *HTTPClient) Embed(token, title, description, cid string) (Video, error)
Embed do request to create a video at Voodfy
func (*HTTPClient) Powergate ¶
func (c *HTTPClient) Powergate(secret string, premium bool) (Powergate, error)
Powergate do request to retrieve powergate instance
func (*HTTPClient) Retrieve ¶
func (c *HTTPClient) Retrieve(secret string) (string, error)
Retrieve do request to retrieve user by secret
func (*HTTPClient) Token ¶
func (c *HTTPClient) Token() (string, error)
Token do request to get token
type Powergate ¶
type Powergate struct { InstanceID string `json:"instanceID"` Token string `json:"token"` Address string `json:"address"` }
Powergate struct used to bind powergate instance
type Response ¶
type Response struct { Result struct { User User `json:"user"` Powergate Powergate `json:"powergate"` Video Video `json:"video"` Videos Videos `json:"videos"` } `json:"result"` }
Response struct used to bind response from api
Click to show internal directories.
Click to hide internal directories.