Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotUseGuest = errors.New("cannot use guest client for this operation")
View Source
var ErrInvalidClient = errors.New("invalid client")
Functions ¶
This section is empty.
Types ¶
type AuthorizedRoundTripper ¶
type AuthorizedRoundTripper struct {
// contains filtered or unexported fields
}
type Client ¶
type Client interface { WhoAmI(ctx context.Context) (string, error) GenerateRunbookV2(ctx context.Context, commands []RecordedCommand) (*GeneratedRunbook, error) // Deprecated. Use GenerateRunbookV2 instead GenerateRunbook(ctx context.Context, commands []string) (*GeneratedRunbook, error) RunbookByID(ctx context.Context, id string) (*Runbook, error) Runbooks(ctx context.Context) ([]RunbookInfo, error) Ask(ctx context.Context, question QuestionInfo) (*Runbook, error) SaveRunbook(ctx context.Context, runbook *Runbook) (*GeneratedRunbook, error) Explain(ctx context.Context, code CodeInfo) (<-chan string, error) StepContentByStepID(ctx context.Context, stepID string) (*StepContent, error) }
type ErrorResponse ¶ added in v0.9.0
type ErrorResponse struct {
Message string `json:"message"`
}
type GeneratedRunbook ¶
type GuestRoundTripper ¶ added in v0.9.0
type GuestRoundTripper struct {
// contains filtered or unexported fields
}
type QuestionInfo ¶ added in v0.9.5
type RecordedCommand ¶ added in v0.8.2
type Runbook ¶
type RunbookInfo ¶ added in v0.9.1
type Step ¶
type Step struct { Type StepTypeEnum `json:"type"` Description string `json:"description"` Command string `json:"command"` }
type StepContent ¶ added in v0.10.0
type StepContent struct { Content []byte `json:"content"` Mode fs.FileMode `json:"mode"` Name string `json:"name"` DirPath string `json:"dir_path"` }
func (*StepContent) UnmarshalJSON ¶ added in v0.10.0
func (sc *StepContent) UnmarshalJSON(data []byte) error
UnmarshalJSON is a custom unmarshaler for StepContent that handles the mode as a float64.
type StepTypeEnum ¶ added in v0.10.0
type StepTypeEnum string
const ( StepTypeCode StepTypeEnum = "code" StepTypeFile StepTypeEnum = "file" )
Click to show internal directories.
Click to hide internal directories.