Documentation ¶
Index ¶
- Constants
- Variables
- func ForEach[T any](ctx context.Context, c *Client, db, bucket string, ...) error
- func ForEachTx[T any](tx *Tx, bucket string, fn func(key string, v T) error) error
- func Get[T any](ctx context.Context, c *Client, db, bucket, key string) (v T, err error)
- type Client
- func (c *Client) Close() error
- func (c *Client) Delete(ctx context.Context, db, bucket, key string) error
- func (c *Client) Get(ctx context.Context, db, bucket, key string, v any) (err error)
- func (c *Client) NextIndex(ctx context.Context, db, bucket string) (id uint64, err error)
- func (c *Client) Put(ctx context.Context, db, bucket, key string, v any) error
- func (c *Client) SetNextIndex(ctx context.Context, db, bucket string, id uint64) (err error)
- func (c *Client) Update(ctx context.Context, db string, fn func(tx *Tx) error) error
- type Server
- type Tx
Constants ¶
View Source
const Version = 20230609
Variables ¶
View Source
var ( RespOK = gserv.NewMsgpResponse(nil).Cached() RespNotFound = gserv.NewError(http.StatusNotFound, "Not Found") RespAlreadyUnlocked = gserv.NewError(http.StatusLocked, "Already Unlocked") )
Functions ¶
Types ¶
type Client ¶
type Client struct { RetryCount int RetrySleep time.Duration AuthKey string // contains filtered or unexported fields }
func (*Client) SetNextIndex ¶
type Server ¶
Click to show internal directories.
Click to hide internal directories.