Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
contract.FetcherOperator
}
func NewClient ¶
func NewClient(d Dependencies, opts ClientOptions) (Client, error)
type ClientOption ¶
type ClientOption = contract.Opt[ClientOptions]
func WithFetcherBaseURL ¶
func WithFetcherBaseURL(x *url.URL) ClientOption
func WithLoaded ¶
func WithLoaded(x Loaded) ClientOption
func WithTimeout ¶
func WithTimeout(x time.Duration) ClientOption
func WithUserIDHeaderKey ¶
func WithUserIDHeaderKey(x string) ClientOption
type ClientOptions ¶
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) FetchMany ¶
func (d *DefaultTool) FetchMany(ctx context.Context, opts contract.FetchManyOptions) ([]any, error)
FetchMany retrieves multiple documents from a remote collection using query parameters.
func (*DefaultTool) FetchOne ¶
func (d *DefaultTool) FetchOne(ctx context.Context, opts contract.FetchOneOptions) (any, error)
FetchOne retrieves a single document from a remote collection by ID.
type Dependencies ¶
type Dependencies struct {
HD contract.HTTPDoer
HR contract.HTTPRequester
HU contract.HTTPUtil
U contract.Unmarshaler
M contract.Marshaler
E contract.EnvironmentOperator
R contract.ReflectOperator
}
Click to show internal directories.
Click to hide internal directories.