Documentation
¶
Index ¶
- func MimeTypeForPath(path string) string
- type BinaryStoreAdapter
- func (a *BinaryStoreAdapter) Delete(ctx context.Context, path string) error
- func (a *BinaryStoreAdapter) Get(ctx context.Context, path string) (storage.Object, error)
- func (a *BinaryStoreAdapter) List(ctx context.Context) ([]storage.ObjectEntry, error)
- func (a *BinaryStoreAdapter) Move(ctx context.Context, oldPath, newPath string) error
- func (a *BinaryStoreAdapter) Put(ctx context.Context, path string, content []byte, mimeType string) error
- func (a *BinaryStoreAdapter) Stat(ctx context.Context, path string) (storage.ObjectEntry, error)
- type Client
- func (c *Client) Config() Config
- func (c *Client) CreateDatabase(ctx context.Context, name string) error
- func (c *Client) CreateUser(ctx context.Context, username, password string, roles []string) error
- func (c *Client) DatabaseSize(ctx context.Context, name string) (int64, error)
- func (c *Client) DatabaseURL(name string) string
- func (c *Client) DeleteDatabase(ctx context.Context, name string) error
- func (c *Client) DeleteUser(ctx context.Context, username string) error
- func (c *Client) GetSetupStatus(ctx context.Context) (SetupStatus, error)
- func (c *Client) GetUser(ctx context.Context, username string) (UserInfo, error)
- func (c *Client) GetUserDatabaseAccess(ctx context.Context, username string) ([]string, error)
- func (c *Client) GrantDatabaseAccess(ctx context.Context, dbName, username string) error
- func (c *Client) ListDatabases(ctx context.Context) ([]string, error)
- func (c *Client) ListUsers(ctx context.Context) ([]UserListEntry, error)
- func (c *Client) RevokeDatabaseAccess(ctx context.Context, dbName, username string) error
- func (c *Client) SetDatabaseSecurity(ctx context.Context, dbName string, memberUsernames ...string) error
- func (c *Client) Setup(ctx context.Context) error
- func (c *Client) UpdateUser(ctx context.Context, username, password string, roles []string) error
- type Config
- type FileDoc
- type FileEntry
- type LiveSyncClient
- func (c *LiveSyncClient) DeleteFile(ctx context.Context, path string) error
- func (c *LiveSyncClient) DeleteNote(ctx context.Context, path string) error
- func (c *LiveSyncClient) GetNoteMetadata(ctx context.Context, path string) (NoteDoc, error)
- func (c *LiveSyncClient) ListFiles(ctx context.Context) ([]FileEntry, error)
- func (c *LiveSyncClient) ListFolders(ctx context.Context) ([]string, error)
- func (c *LiveSyncClient) ListNotes(ctx context.Context) ([]NoteEntry, error)
- func (c *LiveSyncClient) ListTags(ctx context.Context) ([]string, error)
- func (c *LiveSyncClient) MoveFile(ctx context.Context, oldPath, newPath string) error
- func (c *LiveSyncClient) MoveNote(ctx context.Context, oldPath, newPath string) error
- func (c *LiveSyncClient) ReadFile(ctx context.Context, path string) (FileDoc, error)
- func (c *LiveSyncClient) ReadNote(ctx context.Context, path string) (NoteDoc, error)
- func (c *LiveSyncClient) StatFile(ctx context.Context, path string) (FileEntry, error)
- func (c *LiveSyncClient) WriteFile(ctx context.Context, path string, content []byte) error
- func (c *LiveSyncClient) WriteNote(ctx context.Context, path, content string) error
- type NoteDoc
- type NoteEntry
- type SetupStatus
- type UserInfo
- type UserListEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MimeTypeForPath ¶
Types ¶
type BinaryStoreAdapter ¶
type BinaryStoreAdapter struct {
// contains filtered or unexported fields
}
BinaryStoreAdapter implements storage.BinaryStore on top of a LiveSyncClient's existing binary-file methods, letting a vault route non-markdown MCP file operations to CouchDB instead of S3 when its "use CouchDB for binaries" setting is on.
func NewBinaryStoreAdapter ¶
func NewBinaryStoreAdapter(client *LiveSyncClient) *BinaryStoreAdapter
func (*BinaryStoreAdapter) Delete ¶
func (a *BinaryStoreAdapter) Delete(ctx context.Context, path string) error
func (*BinaryStoreAdapter) List ¶
func (a *BinaryStoreAdapter) List(ctx context.Context) ([]storage.ObjectEntry, error)
func (*BinaryStoreAdapter) Move ¶
func (a *BinaryStoreAdapter) Move(ctx context.Context, oldPath, newPath string) error
func (*BinaryStoreAdapter) Stat ¶
func (a *BinaryStoreAdapter) Stat(ctx context.Context, path string) (storage.ObjectEntry, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateDatabase ¶
func (*Client) CreateUser ¶
func (*Client) DatabaseSize ¶
DatabaseSize returns name's on-disk footprint in bytes (DiskSize — CouchDB's sizes.file, which includes B-tree overhead rather than just live document bytes).
func (*Client) DatabaseURL ¶
func (*Client) DeleteDatabase ¶
func (*Client) GetSetupStatus ¶
func (c *Client) GetSetupStatus(ctx context.Context) (SetupStatus, error)
func (*Client) GetUserDatabaseAccess ¶
func (*Client) GrantDatabaseAccess ¶
func (*Client) ListDatabases ¶
func (*Client) RevokeDatabaseAccess ¶
func (*Client) SetDatabaseSecurity ¶
type LiveSyncClient ¶
type LiveSyncClient struct {
// contains filtered or unexported fields
}
func NewLiveSyncClient ¶
func NewLiveSyncClient(baseURL, dbName, username, password string) *LiveSyncClient
func (*LiveSyncClient) DeleteFile ¶
func (c *LiveSyncClient) DeleteFile(ctx context.Context, path string) error
func (*LiveSyncClient) DeleteNote ¶
func (c *LiveSyncClient) DeleteNote(ctx context.Context, path string) error
func (*LiveSyncClient) GetNoteMetadata ¶
func (*LiveSyncClient) ListFiles ¶
func (c *LiveSyncClient) ListFiles(ctx context.Context) ([]FileEntry, error)
func (*LiveSyncClient) ListFolders ¶
func (c *LiveSyncClient) ListFolders(ctx context.Context) ([]string, error)
func (*LiveSyncClient) ListNotes ¶
func (c *LiveSyncClient) ListNotes(ctx context.Context) ([]NoteEntry, error)
func (*LiveSyncClient) ListTags ¶
func (c *LiveSyncClient) ListTags(ctx context.Context) ([]string, error)
func (*LiveSyncClient) MoveFile ¶
func (c *LiveSyncClient) MoveFile(ctx context.Context, oldPath, newPath string) error
func (*LiveSyncClient) MoveNote ¶
func (c *LiveSyncClient) MoveNote(ctx context.Context, oldPath, newPath string) error
type SetupStatus ¶
type SetupStatus struct {
ClusterModeEnabled bool
UsersDbInitialized bool
ReplicatorDbInitialized bool
}
SetupStatus reports which initial setup steps have been applied to a CouchDB instance.
type UserListEntry ¶
Click to show internal directories.
Click to hide internal directories.