Documentation
¶
Overview ¶
Package rest provides REST protocol constants and error handling for A2A.
Index ¶
- func MakeCancelTaskPath(taskID string) string
- func MakeCreatePushConfigPath(taskID string) string
- func MakeDeletePushConfigPath(taskID, configID string) string
- func MakeGetExtendedAgentCardPath() string
- func MakeGetPushConfigPath(taskID, configID string) string
- func MakeGetTaskPath(taskID string) string
- func MakeListPushConfigsPath(taskID string) string
- func MakeListTasksPath() string
- func MakeSendMessagePath() string
- func MakeStreamMessagePath() string
- func MakeSubscribeTaskPath(taskID string) string
- func ToA2AError(resp *http.Response) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCancelTaskPath ¶
MakeCancelTaskPath returns the REST path for cancelling a task.
func MakeCreatePushConfigPath ¶
MakeCreatePushConfigPath returns the REST path for creating a push notification config for a task.
func MakeDeletePushConfigPath ¶
MakeDeletePushConfigPath returns the REST path for deleting a push notification config for a task.
func MakeGetExtendedAgentCardPath ¶
func MakeGetExtendedAgentCardPath() string
MakeGetExtendedAgentCardPath returns the REST path for getting an extended agent card.
func MakeGetPushConfigPath ¶
MakeGetPushConfigPath returns the REST path for getting a specific push notification config for a task.
func MakeGetTaskPath ¶
MakeGetTaskPath returns the REST path for getting a specific task.
func MakeListPushConfigsPath ¶
MakeListPushConfigsPath returns the REST path for listing push notification configs for a task.
func MakeListTasksPath ¶
func MakeListTasksPath() string
MakeListTasksPath returns the REST path for listing tasks.
func MakeSendMessagePath ¶
func MakeSendMessagePath() string
MakeSendMessagePath returns the REST path for sending a message.
func MakeStreamMessagePath ¶
func MakeStreamMessagePath() string
MakeStreamMessagePath returns the REST path for streaming messages.
func MakeSubscribeTaskPath ¶
MakeSubscribeTaskPath returns the REST path for subscribing to task updates.
func ToA2AError ¶
ToA2AError returns A2A error based on HTTP status codes and messages
Types ¶
type Error ¶
type Error struct {
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Detail string `json:"detail"`
TaskID string `json:"taskId,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
}
Error represents a problem detail as defined in RFC 7807.
func ToRESTError ¶
ToRESTError converts an error and a a2a.TaskID to a REST Error.