Documentation
¶
Overview ¶
Package doctorapi provides types and client for the cloud doctor API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the doctor API client.
func NewClient ¶
func NewClient(cfg ClientConfig) *Client
NewClient creates a new doctor API client.
func (*Client) GetContext ¶
func (c *Client) GetContext(ctx context.Context) (*DoctorContextResponse, error)
GetContext fetches server-side context for troubleshooting.
type ClientConfig ¶
type ClientConfig struct {
Endpoint string
AuthFunc func() string
HTTPClient *http.Client
Timeout time.Duration
}
ClientConfig configures the doctor API client.
type DoctorContextResponse ¶
type DoctorContextResponse struct {
User *UserInfo `json:"user,omitempty"`
Repositories []RepoInfo `json:"repositories"`
Teams []TeamInfo `json:"teams"`
Endpoints Endpoints `json:"endpoints"`
Features Features `json:"features"`
ExpectedEnvVars []EnvVar `json:"expected_env_vars"`
Server ServerInfo `json:"server"`
}
DoctorContextResponse contains server-side context for client troubleshooting.
type Endpoints ¶
type Endpoints struct {
API string `json:"api"`
Auth string `json:"auth"`
GitLab string `json:"gitlab,omitempty"`
WebSocket string `json:"websocket,omitempty"`
}
Endpoints contains integration endpoints.
type EnvVar ¶
type EnvVar struct {
Name string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
Example string `json:"example,omitempty"`
}
EnvVar describes an expected environment variable.
type Features ¶
type Features struct {
Waitlist bool `json:"waitlist"`
Stealth bool `json:"stealth"`
Temporal bool `json:"temporal"`
OCR bool `json:"ocr"`
Notifications NotificationConfig `json:"notifications"`
}
Features contains feature flags.
type GitInfo ¶
type GitInfo struct {
Provider string `json:"provider,omitempty"`
DefaultBranch string `json:"default_branch,omitempty"`
RemoteURL string `json:"remote_url,omitempty"`
}
GitInfo contains git-specific information.
type NotificationConfig ¶
type NotificationConfig struct {
InApp bool `json:"in_app"`
Email bool `json:"email"`
Push bool `json:"push"`
}
NotificationConfig contains notification channel config.
type RepoInfo ¶
type RepoInfo struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
Teams []string `json:"teams,omitempty"`
Git *GitInfo `json:"git,omitempty"`
}
RepoInfo contains repository information.
type ServerInfo ¶
type ServerInfo struct {
Version string `json:"version"`
Environment string `json:"environment"`
Timestamp string `json:"timestamp"`
}
ServerInfo contains server metadata.