collection

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...option.RequestOption) *Client

func (*Client) Create

func (c *Client) Create(
	ctx context.Context,

	collectionName string,
	request *zepgo.CreateDocumentCollectionRequest,
	opts ...option.RequestOption,
) (string, error)

If a collection with the same name already exists, an error will be returned.

func (*Client) CreateIndex

func (c *Client) CreateIndex(
	ctx context.Context,

	collectionName string,
	request *zepgo.CollectionCreateIndexRequest,
	opts ...option.RequestOption,
) (string, error)

Creates an index for the specified DocumentCollection to improve query performance.

func (*Client) Delete

func (c *Client) Delete(
	ctx context.Context,

	collectionName string,
	opts ...option.RequestOption,
) (string, error)

If a collection with the same name already exists, it will be overwritten.

func (*Client) Get

func (c *Client) Get(
	ctx context.Context,

	collectionName string,
	opts ...option.RequestOption,
) (*zepgo.DocumentCollectionResponse, error)

Returns a DocumentCollection if it exists.

func (*Client) List

Returns a list of all DocumentCollections.

func (*Client) Update

func (c *Client) Update(
	ctx context.Context,

	collectionName string,
	request *zepgo.UpdateDocumentCollectionRequest,
	opts ...option.RequestOption,
) (string, error)

Jump to

Keyboard shortcuts

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