Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateArtwork(ctx context.Context, r io.ReadCloser) (*schema.Artwork, error)
- func (c *Client) CreateLLMProvider(ctx context.Context, meta schema.LLMProviderCreate) (*schema.LLMProvider, error)
- func (c *Client) CreateVolume(ctx context.Context, volume schema.VolumeCreate) (*schema.Volume, error)
- func (c *Client) DeleteVolume(ctx context.Context, name string) (*schema.Volume, error)
- func (c *Client) GetMetadata(ctx context.Context, r io.Reader) (*schema.ObjectMeta, error)
- func (c *Client) GetObject(ctx context.Context, volume, path string) (*schema.Object, error)
- func (c *Client) GetVolume(ctx context.Context, name string) (*schema.Volume, error)
- func (c *Client) ListObjects(ctx context.Context, req schema.ObjectListRequest) (*schema.ObjectList, error)
- func (c *Client) ListVolumes(ctx context.Context, req schema.VolumeListRequest) (*schema.VolumeList, error)
- func (c *Client) PutObject(ctx context.Context, volume, path string, r io.Reader, attr schema.ObjectAttr, ...) (*schema.Object, error)
- func (c *Client) ReadObject(ctx context.Context, volume, path string, attr schema.ObjectAttr, ...) (*schema.Object, error)
- func (c *Client) ReadObjectWithMeta(ctx context.Context, volume, path string, attr schema.ObjectAttr, ...) (*schema.Object, error)
- func (c *Client) ReindexVolume(ctx context.Context, name string, meta schema.ObjectListFilters, force bool, ...) error
- func (c *Client) Search(ctx context.Context, req schema.SearchListRequest) (*schema.SearchList, error)
- func (c *Client) UpdateVolume(ctx context.Context, name string, meta schema.VolumeMeta) (*schema.Volume, error)
- type NamedReader
- type PutObjectOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a filer HTTP client that wraps the base HTTP client and provides typed methods for interacting with the filer API.
func New ¶
New creates a new filer HTTP client with the given base URL and options. The url parameter should point to the filer API endpoint, e.g. "http://localhost:8080/api/filer".
func (*Client) CreateArtwork ¶ added in v0.2.16
func (*Client) CreateLLMProvider ¶ added in v0.2.10
func (c *Client) CreateLLMProvider(ctx context.Context, meta schema.LLMProviderCreate) (*schema.LLMProvider, error)
func (*Client) CreateVolume ¶ added in v0.2.0
func (*Client) DeleteVolume ¶ added in v0.2.14
func (*Client) GetMetadata ¶ added in v0.2.3
GetMetadata extracts metadata for a single file by POSTing it to the metadata endpoint as multipart/form-data.
func (*Client) ListObjects ¶
func (c *Client) ListObjects(ctx context.Context, req schema.ObjectListRequest) (*schema.ObjectList, error)
func (*Client) ListVolumes ¶ added in v0.2.7
func (c *Client) ListVolumes(ctx context.Context, req schema.VolumeListRequest) (*schema.VolumeList, error)
func (*Client) ReadObject ¶
func (*Client) ReadObjectWithMeta ¶ added in v0.2.25
func (*Client) ReindexVolume ¶ added in v0.2.16
func (c *Client) ReindexVolume(ctx context.Context, name string, meta schema.ObjectListFilters, force bool, callback func(total uint64)) error
ReindexVolume requests reindexing of a volume. The response is a text/event-stream: "progress" events report the running total of objects considered, invoking callback if it is not nil, and a final "error" event reports any error encountered.
func (*Client) Search ¶ added in v0.2.10
func (c *Client) Search(ctx context.Context, req schema.SearchListRequest) (*schema.SearchList, error)
type NamedReader ¶ added in v0.2.16
type PutObjectOpt ¶ added in v0.2.24
type PutObjectOpt func(*putObjectOptions)
func PutObjectContentType ¶ added in v0.2.24
func PutObjectContentType(contentType string) PutObjectOpt
func PutObjectIfNotExists ¶ added in v0.2.24
func PutObjectIfNotExists() PutObjectOpt