Help us shape the future of Go! Take the 2026 Go Developer Survey

claude

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeMessage

type ClaudeMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

ClaudeMessage represents a message in the Claude API format

type ClaudeRequest

type ClaudeRequest struct {
	Model     string          `json:"model"`
	MaxTokens int             `json:"max_tokens"`
	Messages  []ClaudeMessage `json:"messages"`
}

ClaudeRequest represents a request to the Claude API

type ClaudeResponse

type ClaudeResponse struct {
	ID         string                  `json:"id"`
	Type       string                  `json:"type"`
	Role       string                  `json:"role"`
	Model      string                  `json:"model"`
	Content    []ClaudeResponseContent `json:"content"`
	StopReason string                  `json:"stop_reason"`
	Usage      ClaudeUsage             `json:"usage"`
}

ClaudeResponse represents a response from the Claude API

type ClaudeResponseContent

type ClaudeResponseContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

ClaudeResponseContent represents content in the Claude API response

type ClaudeUsage

type ClaudeUsage struct {
	InputTokens  int `json:"input_tokens"`
	OutputTokens int `json:"output_tokens"`
}

ClaudeUsage represents usage information in the Claude API response

type Client

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

Client represents a Claude API client

func NewClient

func NewClient(model string) (*Client, error)

NewClient creates a new Claude API client

func (*Client) GenerateCommitMessage

func (c *Client) GenerateCommitMessage(diff string, branch string) (string, error)

GenerateCommitMessage generates a commit message based on the provided diff

Jump to

Keyboard shortcuts

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