Class DefaultBowireUserStore

Namespace
Kuestenlogik.Bowire.Auth
Assembly
Kuestenlogik.Bowire.dll

Default IBowireUserStore implementation -- the legacy single-user layout under ~/.bowire/. Installations that don't opt into multi-tenant mode (issue #28) use this transparently and see no behavioural change.

public sealed class DefaultBowireUserStore : IBowireUserStore, IBowireStorageRootProvider
Inheritance
DefaultBowireUserStore
Implements
Inherited Members

Constructors

DefaultBowireUserStore(string)

A store rooted at root.

public DefaultBowireUserStore(string root)

Parameters

root string

Remarks

The root used to be a static readonly field, which made the location a property of the process rather than of anything the operator controls. That is what made "start the CLI in the workspace and .bowire/ lands next to the code" false: the working directory never entered into it (#591). A constructor parameter lets a host root the data at a project without the rest of the code knowing or caring.

Fields

Instance

The machine-wide store: ~/.bowire/, shared by every workspace on this machine. Still the default — a host opts into anything else.

public static readonly DefaultBowireUserStore Instance

Field Value

DefaultBowireUserStore

Properties

Root

The directory this store resolves paths under.

public string Root { get; }

Property Value

string

StorageRoot

The storage root this store resolves under — the directory the Data scope means, not the per-identity slot inside it.

public string StorageRoot { get; }

Property Value

string

Remarks

The same directory as Root: the flat layout puts a person's state directly in the storage root, so for this store the two questions have one answer. They come apart in ScopedBowireUserStore.

UserProfileRoot

~/.bowire.

public static string UserProfileRoot { get; }

Property Value

string

Methods

GetUserPath(string)

Absolute path to the file filename under the active user's scope. Implementations are free to colocate users (single shared dir, the default) or partition by identity (per-user subdirectory, the multi-tenant case).

public string GetUserPath(string filename)

Parameters

filename string

Trailing-component file name without any directory prefix -- e.g. "environments.json", "recordings.json". Implementations decorate it with whatever path makes sense for their model.

Returns

string