gws.base.storage.core

Storage object.

Source code: gws.base.storage.core

Module Contents

class gws.base.storage.core.Config(*args, **kwargs)

Bases: gws.ConfigWithAccess

Storage configuration

categoryName: str | None

Category name.

providerUid: str | None

Storage provider uid.

class gws.base.storage.core.Object

Bases: gws.Node

GWS object tree node.

categoryName: str
storageProvider: gws.StorageProvider
configure()

Configuration hook.

configure_provider()
get_state_for(user)
handle_request(req: gws.WebRequester, p: Request) Response
props(user)

Generate a Props struct for this object.

Parameters:

user – The user for which the props should be generated.

class gws.base.storage.core.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

state: State
class gws.base.storage.core.Request(*args, **kwargs)

Bases: gws.Request

Command request.

entryData: dict | None
entryName: str | None
verb: Verb
class gws.base.storage.core.Response(*args, **kwargs)

Bases: gws.Response

Command response.

data: dict | None
state: State
class gws.base.storage.core.State(*args, **kwargs)

Bases: gws.Data

Storage state.

canCreate: bool

User can create entries.

canDelete: bool

User can delete entries.

canRead: bool

User can read entries.

canWrite: bool

User can write entries.

names: list[str]

List of entry names.

class gws.base.storage.core.Verb(*args, **kwds)

Bases: gws.Enum

Storage action verbs.

delete = 'delete'

Delete an entry.

list = 'list'

List entries.

read = 'read'

Read an entry.

write = 'write'

Write an entry.