Documentation
¶
Index ¶
- Constants
- type UidList
- func (ul *UidList) AddItem(uid uint, addToTop bool) (err error)
- func (ul *UidList) CheckIntegrity() (err error)
- func (ul *UidList) OnPage(pageNumber uint, pageSize uint) (ulop *UidList)
- func (ul *UidList) RaiseItem(uid uint) (isAlreadyRaised bool, err error)
- func (ul *UidList) RemoveItem(uid uint) (err error)
- func (ul *UidList) Scan(src any) (err error)
- func (ul *UidList) Size() (n int)
- func (ul *UidList) Value() (dv driver.Value, err error)
- func (ul *UidList) ValuesString() (values string, err error)
Constants ¶
View Source
const ( ErrDestinationIsNotInitialised = "destination is not initialised" ErrFUnsupportedDataType = "unsupported data type: %s" ErrFDuplicateUid = "duplicate uid: %v" ErrFUidIsNotFound = "uid is not found: %v" )
View Source
const ( ListItemSeparator = "," StringOnError = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UidList ¶
type UidList []uint
UidList is a list unique identifiers.
The main purpose of this list is to store a chronological order of all added items. An identifier is an unsigned integer number. The order of items in the list is important. New items are added to the end of the list, deleted items shift existing items.
func NewFromArray ¶
func (*UidList) AddItem ¶
AddItem add a new identifier to the end of the list. If 'addToTop' is set to 'True', then the item is added to the beginning (top) of the list; otherwise – to the end (bottom) of the list.
func (*UidList) CheckIntegrity ¶
CheckIntegrity verifies integrity of the list. All items must be unique to pass the check.
func (*UidList) RemoveItem ¶
RemoveItem deletes an identifier from the list shifting its items.
func (*UidList) ValuesString ¶
Click to show internal directories.
Click to hide internal directories.