client

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidClient = errors.New("invalid client")

Functions

This section is empty.

Types

type AuthorizedRoundTripper

type AuthorizedRoundTripper struct {
	// contains filtered or unexported fields
}

func (*AuthorizedRoundTripper) RoundTrip

func (a *AuthorizedRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type Client

type Client interface {
	WhoAmI(ctx context.Context) (string, error)
	GenerateRunbook(ctx context.Context, commands []string) (*GeneratedRunbook, error)
}

func New

func New() (Client, error)

type GeneratedRunbook

type GeneratedRunbook struct {
	Runbook Runbook `json:"runbook"`
	URL     string  `json:"url"`
}

type Runbook

type Runbook struct {
	Title string `json:"title"`
	Steps []Step `json:"steps"`
}

type Step

type Step struct {
	Description string `json:"description"`
	Command     string `json:"command"`
}

Jump to

Keyboard shortcuts

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