Documentation ¶
Index ¶
Constants ¶
View Source
const ( // JSONIDKey is the key of the id returned in the JSON response JSONIDKey = "id" // DocumentIDKey is the key of ids in mongodb DocumentIDKey = "_id" // LimitKey is used for paginating HTTP requests LimitKey = "_limit" // OffsetKey is used for paginating HTTP requests OffsetKey = "_offset" // SortKey is used for sorting the query by a field SortKey = "_sort" // RelationKey is used for relations RelationKey = "_relation" // MetadataKey is the key used to store internal metadata for an object MetadataKey = "_metadata" MetadataCreated = "_metadata.created" MetadataCreator = "_metadata.creator" MetadataCreatorType = "_metadata.creator_type" // MaxRecursion is the maximum amount of levels allowed in a JSON object (array and objects) MaxRecursion = 8 )
Variables ¶
View Source
var MaxLengthOfCollectionInfo = 12
MaxLengthOfCollectionInfo is the maximum character length of collection/resource names and paths
View Source
var ValidPathFormat = regexp.MustCompile(`^[a-zA-Z0-9_-]*$`)
ValidPathFormat is the regular expression used to validate resource path names, collection names, and project slugs
Functions ¶
func CastInterfaceToType ¶
CastInterfaceToType returns the interface with a proper type
func ContainsReservedField ¶
ContainsReservedField checks for reserved fields in a map[string]whatever
func ReservedField ¶
ReservedField returns true if the string is a reserved field key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.