Documentation
¶
Index ¶
- Constants
- type UidList
- func (ul *UidList) AddItem(uid uint, addToTop bool) (err error)
- func (ul *UidList) CheckIntegrity() (err error)
- func (ul *UidList) MoveItemDown(uid uint) (err error)
- func (ul *UidList) MoveItemUp(uid uint) (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 ¶
const ( ErrDestinationIsNotInitialised = "destination is not initialised" ErrFUnsupportedDataType = "unsupported data type: %s" ErrFDuplicateUid = "duplicate uid: %v" ErrFUidIsNotFound = "uid is not found: %v" ErrEdgePosition = "edge position" )
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) MoveItemDown ¶ added in v0.0.38
MoveItemDown moves an existing identifier one position downwards if possible.
func (*UidList) MoveItemUp ¶ added in v0.0.38
MoveItemUp moves an existing identifier one position upwards if possible.
func (*UidList) RemoveItem ¶
RemoveItem deletes an identifier from the list shifting its items.