Documentation ¶
Index ¶
- func AddSortOrder(ctx context.Context, coll *mongo.Collection, displaySep *string) error
- func Create(ctx context.Context, api GroupAPI, display string, upsert bool, ...) (string, error)
- func ListChildren(ctx context.Context, api GroupAPI, params *apis.GroupListParams, ...) error
- func Update(ctx context.Context, api GroupAPI, id string, update *apis.GroupUpdate) error
- func UpdateGroupPhotoCountsAndVisTokens(ctx context.Context, api GroupAPI, oldIDs []string, newIDs []string, ...) error
- type CreateOptions
- type GroupAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSortOrder ¶ added in v1.4.0
AddSortOrder adds sort order to all groups in the given collection
func Create ¶
func Create(ctx context.Context, api GroupAPI, display string, upsert bool, opts *CreateOptions) (string, error)
Create creates the any group for the given path. Path must not already exist. Returns the id.
func ListChildren ¶
func ListChildren(ctx context.Context, api GroupAPI, params *apis.GroupListParams, results interface{}) error
ListChildren returns an array of documents for each child of the given id. Children are sorted by id. If no projection keys are provided (nil), the default projection is just the folder id.
func UpdateGroupPhotoCountsAndVisTokens ¶
func UpdateGroupPhotoCountsAndVisTokens( ctx context.Context, api GroupAPI, oldIDs []string, newIDs []string, oldTokens []string, newTokens []string, count int, ) error
UpdateGroupPhotoCountsAndVisTokens updates a set of group documents based on the diff of ids. Also updates the visibility token photo counts in each affected group document.
Types ¶
Click to show internal directories.
Click to hide internal directories.