mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-19 00:40:47 +00:00
Move out repository models; Hidrate collection on create
This commit is contained in:
32
internal/struct_hidrators/collection_defaults.go
Normal file
32
internal/struct_hidrators/collection_defaults.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package structhidrators
|
||||
|
||||
import (
|
||||
repositorymodels "github.com/pikami/cosmium/internal/repository_models"
|
||||
)
|
||||
|
||||
var defaultCollection repositorymodels.Collection = repositorymodels.Collection{
|
||||
IndexingPolicy: repositorymodels.CollectionIndexingPolicy{
|
||||
IndexingMode: "consistent",
|
||||
Automatic: true,
|
||||
IncludedPaths: []repositorymodels.CollectionIndexingPolicyPath{
|
||||
{Path: "/*"},
|
||||
},
|
||||
ExcludedPaths: []repositorymodels.CollectionIndexingPolicyPath{
|
||||
{Path: "/\"_etag\"/?"},
|
||||
},
|
||||
},
|
||||
PartitionKey: repositorymodels.CollectionPartitionKey{
|
||||
Paths: []string{"/_partitionKey"},
|
||||
Kind: "Hash",
|
||||
Version: 2,
|
||||
},
|
||||
Rid: "nFFFFFFFFFF=",
|
||||
Ts: 0,
|
||||
Self: "",
|
||||
Etag: "\"00000000-0000-0000-0000-000000000000\"",
|
||||
Docs: "docs/",
|
||||
Sprocs: "sprocs/",
|
||||
Triggers: "triggers/",
|
||||
Udfs: "udfs/",
|
||||
Conflicts: "conflicts/",
|
||||
}
|
||||
Reference in New Issue
Block a user