singletons

package
v1.202405300917.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 10 Imported by: 0

README

Singletons

Singletons system view

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNameNotFound = errors.New("name not found")
View Source
var ErrSingletonIDsExceeds = fmt.Errorf("the maximum number of singleton document identifiers (%v) has been exceeded", istructs.MaxSingletonID)

Functions

This section is empty.

Types

type Singletons

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

Singletons IDs system view.

Use ID() to obtain singleton ID by its QName.
Use Prepare() to load Singletons from storage.

func New

func New() *Singletons

Creates and returns new singletons system view

func (*Singletons) ID

func (st *Singletons) ID(qName appdef.QName) (istructs.RecordID, error)

Returns ID for singleton with specified QName

func (*Singletons) Prepare

func (st *Singletons) Prepare(storage istorage.IAppStorage, versions *vers.Versions, appDef appdef.IAppDef) (err error)

Loads all singletons IDs from storage, add all known application singletons and store if some changes. Must be called at application starts

Jump to

Keyboard shortcuts

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