Documentation
¶
Overview ¶
Package httpclient is a client of the memory's HTTP API
Index ¶
- type Client
- func (c *Client) ForgetDetail(ctx context.Context, field schema.Field) (*schema.Details, error)
- func (c *Client) ForgetMemory(ctx context.Context, key, line string) (*schema.Memory, error)
- func (c *Client) GetDetails(ctx context.Context) (*schema.Details, error)
- func (c *Client) GetMemory(ctx context.Context, key string) (*schema.Memory, error)
- func (c *Client) ListMemories(ctx context.Context, req schema.MemoryListRequest) (*schema.MemoryList, error)
- func (c *Client) RememberMemory(ctx context.Context, key string, req schema.MemoryRequest) (*schema.Memory, error)
- func (c *Client) SetDetail(ctx context.Context, field schema.Field, detail schema.Detail) (*schema.Details, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a client of the memory's HTTP API, which wraps the base HTTP client, with typed methods for its requests
func New ¶
New returns a client of the memory's API, at the URL, which is the server's API endpoint, such as http://localhost:8084/api, with the options. Each method adds its own path, such as memory/detail, as the memory's handlers register them.
func (*Client) ForgetDetail ¶
ForgetDetail forgets the detail of the field, so it isn't known, and returns the details
func (*Client) ForgetMemory ¶
ForgetMemory forgets the memory with the key, or, with a line, only the line of it, and returns the memory, as it is, or was, when it's forgotten
func (*Client) GetDetails ¶
GetDetails returns the details, which are those which are known, or declined
func (*Client) ListMemories ¶
func (c *Client) ListMemories(ctx context.Context, req schema.MemoryListRequest) (*schema.MemoryList, error)
ListMemories returns the memories, the most recently changed first, as the request selects, and how many there are
func (*Client) RememberMemory ¶
func (c *Client) RememberMemory(ctx context.Context, key string, req schema.MemoryRequest) (*schema.Memory, error)
RememberMemory remembers the memory with the key, which is created, when the request has no version, or replaces the memory at the version, and returns it