Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMessages ¶
func FormatMessages(messages []CommitMessage) []string
func SetFixturesDir ¶
func SetFixturesDir(dir string)
SetFixturesDir overrides the directory from which fixtures are loaded.
Types ¶
type AgentEnsurer ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateSession ¶
func (*Client) DeleteSession ¶
func (*Client) GenerateMessages ¶
func (c *Client) GenerateMessages(ctx context.Context, sessionID string, params GenerateParams) ([]CommitMessage, error)
type ClientFactory ¶
type CommitMessage ¶
type GenerateParams ¶
type OCError ¶
type OCError struct {
Kind OCErrorKind
RequestType string
SessionID string
Agent string
Code string
Message string
Status int
RawJSON string
}
func (*OCError) RenderDetails ¶
type OCErrorKind ¶
type OCErrorKind string
const ( OCErrAPI OCErrorKind = "api_error" OCErrHTTP OCErrorKind = "http_error" OCErrNoStructuredOutput OCErrorKind = "no_structured_output" OCErrNoSubjects OCErrorKind = "no_subjects" )
type PipelineResult ¶
type PipelineResult struct {
SessionID string
Messages []CommitMessage
Error error
}
type PipelineRunner ¶
type PipelineRunner struct {
EnsureAgent AgentEnsurer
StartServer ServerStarter
StopServer ServerStopper
NewClient ClientFactory
RepoDir string
Agent string
InstallAgent bool
}
func (*PipelineRunner) Run ¶
func (r *PipelineRunner) Run(ctx context.Context, genParams GenerateParams) PipelineResult
func (*PipelineRunner) Stop ¶
func (r *PipelineRunner) Stop()
type ServerStopper ¶
type ServerStopper func() error
Click to show internal directories.
Click to hide internal directories.