Documentation
¶
Index ¶
- type APIRequest
- type Client
- func (c *Client) Post(command string, payload map[string]interface{}) ([]byte, error)
- func (c *Client) PostAccountGetRaw(accountID uint) ([]byte, error)
- func (c *Client) PostProvidersListRaw() ([]byte, error)
- func (c *Client) PostSiteGetRaw(siteID uint) ([]byte, error)
- func (c *Client) PostSyncData(payload map[string]interface{}) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRequest ¶
type APIRequest struct {
Command string `json:"command"`
Token string `json:"token"`
SiteID uint `json:"site_id,omitempty"`
AccountID uint `json:"account_id,omitempty"`
// Additional fields can be added as json.RawMessage
Extra map[string]interface{} `json:"-"`
}
APIRequest represents the JSON body sent to the CaptainCore API.
type Client ¶
Client wraps HTTP calls to the CaptainCore API, replacing wp_remote_post().
func (*Client) PostAccountGetRaw ¶
PostAccountGetRaw fetches raw account data from the API.
func (*Client) PostProvidersListRaw ¶
PostProvidersListRaw fetches all provider records from the API.
func (*Client) PostSiteGetRaw ¶
PostSiteGetRaw fetches raw site data from the API.
Click to show internal directories.
Click to hide internal directories.