Documentation ¶
Index ¶
- Constants
- func BookID(tx db.Transaction, ID string) error
- func Description(description null.NullString) error
- func Direction(direction armaria.Direction) error
- func First(limit null.NullInt64) error
- func Name(name null.NullString) error
- func Order(order armaria.Order) error
- func ParentID(tx db.Transaction, parentID null.NullString) error
- func Query(query null.NullString) error
- func Tags(tags []string, existingTags []string) error
- func URL(URL null.NullString) error
Constants ¶
const MaxDescriptionLength = 4096
const MaxNameLength = 2048
const MaxTagLength = 128
const MaxTags = 24
const MaxURLLength = 2048
const MinQueryLength = 3
Variables ¶
This section is empty.
Functions ¶
func BookID ¶
func BookID(tx db.Transaction, ID string) error
BookID validates a bookmark ID value. The target bookmark must exist.
func Description ¶
func Description(description null.NullString) error
Description validates a description value. IT's optional and must have a length <= 5096.
func Direction ¶
func Direction(direction armaria.Direction) error
Direction validates a direction value. It must be asc or desc.
func Name ¶
func Name(name null.NullString) error
Name validates a name value. It's required and must have a length >= 1 and <= 1024.
func Order ¶
func Order(order armaria.Order) error
Order validates an order value. It must be modified or name.
func ParentID ¶
func ParentID(tx db.Transaction, parentID null.NullString) error
ParentID validates a parent ID value. It's optional but if it is provided the target parent folder must exist.
func Query ¶
func Query(query null.NullString) error
Query validates a query value. It's optional must be at least 3 chars long.
func Tags ¶
Tags validates a tags value. They must be unique. Each must have a length >= 1 and <= 128. Each must be comprised of the chars A-Z a-z 0-9 - _
func URL ¶
func URL(URL null.NullString) error
URL validates a URL value. It's only used for bookmarks and must have a length >= 1 and <= 2048.
Types ¶
This section is empty.