Documentation
¶
Overview ¶
Package upload provides an HTTP client for uploading images to the relay's /internal/upload endpoint, authenticated with the daemon's machine token.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImageFile ¶
IsImageFile returns true if the file path has a recognised image extension.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client uploads images to the relay HTTP endpoint.
func NewClient ¶
NewClient creates an upload client. relayWSURL is the daemon's configured WebSocket URL (e.g. "wss://relay.gsd.build/ws/daemon"); it is converted to an HTTPS base URL automatically.
func (*Client) SetAuthToken ¶
SetAuthToken updates the bearer token used for future upload requests.
Click to show internal directories.
Click to hide internal directories.