hookdeck

package
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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"`
	ProjectID        string `json:"team_id"`
	ProjectName      string `json:"team_name"`
	ProjectMode      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

	ProjectID 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) Get

func (c *Client) Get(ctx context.Context, path string, params string, configure func(*http.Request)) (*http.Response, error)

func (*Client) ListProjects

func (c *Client) ListProjects() ([]Project, error)

func (*Client) PerformRequest

func (c *Client) PerformRequest(ctx context.Context, req *http.Request) (*http.Response, error)

PerformRequest sends a request to Hookdeck and returns the response.

func (*Client) Post

func (c *Client) Post(ctx context.Context, path string, data []byte, configure func(*http.Request)) (*http.Response, error)

func (*Client) Put

func (c *Client) Put(ctx context.Context, path string, data []byte, configure func(*http.Request)) (*http.Response, error)

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 ErrorResponse struct {
	Handled bool   `json:"Handled"`
	Message string `json:"message"`
}

type GuestUser

type GuestUser struct {
	Id         string `json:"id"`
	APIKey     string `json:"key"`
	Url        string `json:"link"`
	BrowserURL string `json:"browser_url"`
	PollURL    string `json:"poll_url"`
}

type Project

type Project struct {
	Id   string
	Name string
	Mode string
}

type SDKClientInit

type SDKClientInit struct {
	APIBaseURL string
	APIKey     string
	TeamID     string
}

type Session

type Session struct {
	Id string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL