Documentation
¶
Index ¶
- type AlpaconClient
- func (ac *AlpaconClient) IsUsingHTTPS() (bool, error)
- func (ac *AlpaconClient) SendDeleteRequest(url string) ([]byte, error)
- func (ac *AlpaconClient) SendGetRequest(url string) ([]byte, error)
- func (ac *AlpaconClient) SendGetRequestForDownload(url string) (*http.Response, error)
- func (ac *AlpaconClient) SendMultipartRequest(url string, multiPartWriter *multipart.Writer, body bytes.Buffer) ([]byte, error)
- func (ac *AlpaconClient) SendPatchRequest(url string, body interface{}) ([]byte, error)
- func (ac *AlpaconClient) SendPostRequest(url string, body interface{}) ([]byte, error)
- func (ac *AlpaconClient) SetWebsocketHeader() http.Header
- type CheckAuthResponse
- type CheckPrivilegesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlpaconClient ¶
type AlpaconClient struct {
HTTPClient *http.Client
BaseURL string
Token string
AccessToken string
Privileges string
UserAgent string
}
func NewAlpaconAPIClient ¶
func NewAlpaconAPIClient() (*AlpaconClient, error)
func (*AlpaconClient) IsUsingHTTPS ¶
func (ac *AlpaconClient) IsUsingHTTPS() (bool, error)
func (*AlpaconClient) SendDeleteRequest ¶
func (ac *AlpaconClient) SendDeleteRequest(url string) ([]byte, error)
func (*AlpaconClient) SendGetRequest ¶
func (ac *AlpaconClient) SendGetRequest(url string) ([]byte, error)
Get Request to Alpacon Server
func (*AlpaconClient) SendGetRequestForDownload ¶
func (ac *AlpaconClient) SendGetRequestForDownload(url string) (*http.Response, error)
This function returns response for custom error handling in each function, unlike direct error throwing in sendRequest.
func (*AlpaconClient) SendMultipartRequest ¶
func (*AlpaconClient) SendPatchRequest ¶
func (ac *AlpaconClient) SendPatchRequest(url string, body interface{}) ([]byte, error)
TODO PUT
func (*AlpaconClient) SendPostRequest ¶
func (ac *AlpaconClient) SendPostRequest(url string, body interface{}) ([]byte, error)
POST Request to Alpacon Server
func (*AlpaconClient) SetWebsocketHeader ¶
func (ac *AlpaconClient) SetWebsocketHeader() http.Header
type CheckAuthResponse ¶
type CheckAuthResponse struct {
Authenticated bool `json:"authenticated"`
}
type CheckPrivilegesResponse ¶
Click to show internal directories.
Click to hide internal directories.