rest

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package rest provides REST protocol constants and error handling for A2A.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCancelTaskPath

func MakeCancelTaskPath(taskID string) string

MakeCancelTaskPath returns the REST path for cancelling a task.

func MakeCreatePushConfigPath

func MakeCreatePushConfigPath(taskID string) string

MakeCreatePushConfigPath returns the REST path for creating a push notification config for a task.

func MakeDeletePushConfigPath

func MakeDeletePushConfigPath(taskID, configID string) string

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

func MakeGetPushConfigPath(taskID, configID string) string

MakeGetPushConfigPath returns the REST path for getting a specific push notification config for a task.

func MakeGetTaskPath

func MakeGetTaskPath(taskID string) string

MakeGetTaskPath returns the REST path for getting a specific task.

func MakeListPushConfigsPath

func MakeListPushConfigsPath(taskID string) string

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

func MakeSubscribeTaskPath(taskID string) string

MakeSubscribeTaskPath returns the REST path for subscribing to task updates.

func ToA2AError

func ToA2AError(resp *http.Response) error

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

func ToRESTError(err error, taskID a2a.TaskID) *Error

ToRESTError converts an error and a a2a.TaskID to a REST Error.

Jump to

Keyboard shortcuts

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