Documentation
¶
Index ¶
- func ContextWithGitHubErrors(ctx context.Context) context.Context
- func NewGitHubAPIErrorResponse(ctx context.Context, message string, resp *github.Response, err error) *mcp.CallToolResult
- func NewGitHubAPIErrorToCtx(ctx context.Context, message string, resp *github.Response, err error) (context.Context, error)
- func NewGitHubGraphQLErrorResponse(ctx context.Context, message string, err error) *mcp.CallToolResult
- type GitHubAPIError
- type GitHubCtxErrors
- type GitHubErrorKey
- type GitHubGraphQLError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithGitHubErrors ¶
ContextWithGitHubErrors updates or creates a context with a pointer to GitHub error information (to be used by middleware).
func NewGitHubAPIErrorResponse ¶
func NewGitHubAPIErrorResponse(ctx context.Context, message string, resp *github.Response, err error) *mcp.CallToolResult
NewGitHubAPIErrorResponse returns an mcp.NewToolResultError and retains the error in the context for access via middleware
func NewGitHubAPIErrorToCtx ¶
func NewGitHubGraphQLErrorResponse ¶
func NewGitHubGraphQLErrorResponse(ctx context.Context, message string, err error) *mcp.CallToolResult
NewGitHubGraphQLErrorResponse returns an mcp.NewToolResultError and retains the error in the context for access via middleware
Types ¶
type GitHubAPIError ¶
type GitHubAPIError struct { Message string `json:"message"` Response *github.Response `json:"-"` Err error `json:"-"` }
func GetGitHubAPIErrors ¶
func GetGitHubAPIErrors(ctx context.Context) ([]*GitHubAPIError, error)
GetGitHubAPIErrors retrieves the slice of GitHubAPIErrors from the context.
func (*GitHubAPIError) Error ¶
func (e *GitHubAPIError) Error() string
type GitHubCtxErrors ¶
type GitHubCtxErrors struct {
// contains filtered or unexported fields
}
type GitHubErrorKey ¶
type GitHubErrorKey struct{}
type GitHubGraphQLError ¶
func GetGitHubGraphQLErrors ¶
func GetGitHubGraphQLErrors(ctx context.Context) ([]*GitHubGraphQLError, error)
GetGitHubGraphQLErrors retrieves the slice of GitHubGraphQLErrors from the context.
func (*GitHubGraphQLError) Error ¶
func (e *GitHubGraphQLError) Error() string
Click to show internal directories.
Click to hide internal directories.