Documentation
¶
Index ¶
- Constants
- func CreateSDKClient(init SDKClientInit) *hookdeckclient.Client
- type CIClient
- type CLITelemetry
- type Client
- func (c *Client) CreateCIClient(input CreateCIClientInput) (CIClient, error)
- func (c *Client) CreateGuestUser(input CreateGuestUserInput) (GuestUser, error)
- func (c *Client) CreateSession(input CreateSessionInput) (Session, error)
- func (c *Client) Get(ctx context.Context, path string, params string, configure func(*http.Request)) (*http.Response, error)
- func (c *Client) ListProjects() ([]Project, error)
- func (c *Client) PerformRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func (c *Client) Post(ctx context.Context, path string, data []byte, configure func(*http.Request)) (*http.Response, error)
- func (c *Client) Put(ctx context.Context, path string, data []byte, configure func(*http.Request)) (*http.Response, error)
- type CreateCIClientInput
- type CreateGuestUserInput
- type CreateSessionInput
- type ErrorResponse
- type GuestUser
- type Project
- type SDKClientInit
- type Session
Constants ¶
View Source
const DefaultAPIBaseURL = "https://api.hookdeck.com"
DefaultAPIBaseURL is the default base URL for API requests
View Source
const DefaultConsoleBaseURL = "https://console.hookdeck.com"
View Source
const DefaultDashboardBaseURL = "https://dashboard.hookdeck.com"
DefaultDashboardBaseURL is the default base URL for dashboard requests
View Source
const DefaultDashboardURL = "https://dashboard.hookdeck.com"
DefaultDashboardURL is the default base URL for web links
View Source
const DefaultProfileName = "default"
View Source
const DefaultWebsocektURL = "wss://ws.hookdeck.com"
Variables ¶
This section is empty.
Functions ¶
func CreateSDKClient ¶
func CreateSDKClient(init SDKClientInit) *hookdeckclient.Client
Types ¶
type CIClient ¶
type CIClient struct { Claimed bool `json:"claimed"` UserID string `json:"user_id"` UserName string `json:"user_name"` OrganizationName string `json:"organization_name"` OrganizationID string `json:"organization_id"` TeamID string `json:"team_id"` TeamName string `json:"team_name"` TeamMode string `json:"team_mode"` APIKey string `json:"key"` ClientID string `json:"client_id"` }
type CLITelemetry ¶
type CLITelemetry struct { CommandPath string `json:"command_path"` DeviceName string `json:"device_name"` GeneratedResource bool `json:"generated_resource"` }
CLITelemetry is the structure that holds telemetry data sent to Hookdeck in API requests.
func GetTelemetryInstance ¶
func GetTelemetryInstance() *CLITelemetry
GetTelemetryInstance returns the CLITelemetry instance (initializing it first if necessary).
func (*CLITelemetry) SetCommandContext ¶
func (t *CLITelemetry) SetCommandContext(cmd *cobra.Command)
SetCommandContext sets the telemetry values for the command being executed.
func (*CLITelemetry) SetDeviceName ¶
func (t *CLITelemetry) SetDeviceName(deviceName string)
SetDeviceName puts the device name into telemetry
type Client ¶
type Client struct { // The base URL (protocol + hostname) used for all requests sent by this // client. BaseURL *url.URL // API key used to authenticate requests sent by this client. If left // empty, the `Authorization` header will be omitted. APIKey string TeamID string // When this is enabled, request and response headers will be printed to // stdout. Verbose bool // contains filtered or unexported fields }
Client is the API client used to sent requests to Hookdeck.
func (*Client) CreateCIClient ¶
func (c *Client) CreateCIClient(input CreateCIClientInput) (CIClient, error)
func (*Client) CreateGuestUser ¶
func (c *Client) CreateGuestUser(input CreateGuestUserInput) (GuestUser, error)
func (*Client) CreateSession ¶
func (c *Client) CreateSession(input CreateSessionInput) (Session, error)
func (*Client) ListProjects ¶
func (*Client) PerformRequest ¶
PerformRequest sends a request to Hookdeck and returns the response.
type CreateCIClientInput ¶
type CreateCIClientInput struct {
DeviceName string `json:"device_name"`
}
type CreateGuestUserInput ¶
type CreateGuestUserInput struct {
DeviceName string `json:"device_name"`
}
type CreateSessionInput ¶
type CreateSessionInput struct {
ConnectionIds []string `json:"webhook_ids"`
}
type ErrorResponse ¶
type SDKClientInit ¶
Click to show internal directories.
Click to hide internal directories.