Documentation ¶
Index ¶
- func AddAppScore(ctx context.Context, db ReadWriter, score int64, appIDs ...string) error
- func ArgsToParams(args []interface{}) map[string]interface{}
- func Delete[T tables.Table, K Keys](db BufferWriter, keys ...K) error
- func DeleteAppPermissions(ctx context.Context, db DBWriter, appID string, permissionIDs ...string) error
- func DeleteAppPermissionsInCircle(_ context.Context, db BufferWriter, appID, circleID string, ...) error
- func DeleteAppReviewVote(_ context.Context, db BufferWriter, reviewID, userID string) error
- func DeleteAppReviews(ctx context.Context, db Updater, userID string, reviewIDs ...string) error
- func DeleteAppSaves(ctx context.Context, db DBWriter, appID, userID string) (err error)
- func DeleteAppSubscriptions(ctx context.Context, db DBWriter, appID string, subIDs ...string) error
- func DeleteAppSubscriptionsInCircle(_ context.Context, db BufferWriter, appID, circleID string, ...) error
- func DeleteAppTags(_ context.Context, db BufferWriter, appID string, tagIDs ...string) error
- func DeleteAppToken(_ context.Context, db BufferWriter, tokenID string) error
- func DeleteAppVote(_ context.Context, db BufferWriter, appID, userID string) (err error)
- func DeleteApps(ctx context.Context, db Updater, userID string, appIDs ...string) error
- func DeleteByBuilder(ctx context.Context, db Updater, b squirrel.DeleteBuilder) (int64, error)
- func DeleteCircleApps(ctx context.Context, db DBWriter, appID, circleID string) (err error)
- func DeleteDefaultApps(_ context.Context, db BufferWriter, appIDs ...string) error
- func DeleteFeaturedApps(_ context.Context, db BufferWriter, appIDs ...string) error
- func ExistsAppPermission(ctx context.Context, db RowReader, appID, permissionID string) (bool, error)
- func ExistsAppReviewVote(ctx context.Context, db RowReader, reviewID, userID string) (bool, error)
- func ExistsAppSave(ctx context.Context, db RowReader, appID, userID string) (bool, error)
- func ExistsAppSubscription(ctx context.Context, db RowReader, appID, subscriptionID string) (bool, error)
- func ExistsAppVote(ctx context.Context, db RowReader, appID, userID string) (bool, error)
- func ExistsCircleApp(ctx context.Context, db RowReader, appID, circleID string) (bool, error)
- func ExistsDefaultApp(ctx context.Context, db RowReader, id string) (bool, error)
- func ExistsFeaturedApp(ctx context.Context, db RowReader, id string) (bool, error)
- func ExistsKey[T tables.Table, K Key](ctx context.Context, db RowReader, k K) (bool, error)
- func GetApp(ctx context.Context, db RowReader, id string) (repo.App, error)
- func GetAppCircleCounter(ctx context.Context, db RowReader, id string) (repo.AppCounters, error)
- func GetAppLastUsedByUser(ctx context.Context, db Reader, appID, userID string) (*time.Time, error)
- func GetAppPermissions(ctx context.Context, db Reader, appID string) ([]string, error)
- func GetAppPermissionsInCircle(ctx context.Context, db Queryer, appID, circleID string) ([]string, error)
- func GetAppReviewVote(ctx context.Context, db RowReader, reviewID, userID string) (*repo.AppReviewVote, error)
- func GetAppReviews(ctx context.Context, db Reader, ids ...string) ([]repo.AppReview, error)
- func GetAppReviewsByAppID(ctx context.Context, db Queryer, appID string, c cursor.Cursor) ([]repo.AppReview, error)
- func GetAppReviewsByUserID(ctx context.Context, db Queryer, appID, userID string) ([]repo.AppReview, error)
- func GetAppRoles(ctx context.Context, db Reader, appID string) ([]string, error)
- func GetAppSavedByUser(ctx context.Context, db Reader, appID, userID string) (*time.Time, error)
- func GetAppSubscriptions(ctx context.Context, db Reader, appID string) ([]string, error)
- func GetAppSubscriptionsInCircle(ctx context.Context, db Queryer, appID, circleID string) ([]string, error)
- func GetAppTags(ctx context.Context, db Queryer, appID string) ([]repo.Tag, error)
- func GetAppToken(ctx context.Context, db RowReader, tokenID string) (repo.AppToken, bool, error)
- func GetAppTokens(ctx context.Context, db Queryer, appID string) ([]repo.AppToken, error)
- func GetAppUpvotedByUser(ctx context.Context, db Reader, appID, userID string) (*time.Time, error)
- func GetApps(ctx context.Context, db Reader, ids ...string) ([]repo.App, error)
- func GetAppsBySearch(ctx context.Context, db Queryer, f repo.SearchAppsFilter) ([]repo.App, error)
- func GetAppsCreatedBy(ctx context.Context, db Queryer, createdBy string) ([]repo.App, error)
- func GetAppsPermissions(ctx context.Context, db Reader, appIDs ...string) (map[string][]string, error)
- func GetAppsSubscriptions(ctx context.Context, db Reader, appIDs ...string) (map[string][]string, error)
- func GetByKey[M any, T tables.Table, K Key](ctx context.Context, db RowReader, k K) (m M, err error)
- func GetByKeys[M any, T tables.Table, K Keys](ctx context.Context, db Reader, ids ...K) ([]M, error)
- func GetCircleApps(ctx context.Context, db Queryer, filter repo.CircleAppsFilter) ([]repo.CircleApp, error)
- func GetCircleSubscribers(ctx context.Context, db Reader, circleID, subscriptionID string) ([]string, error)
- func GetCircles(ctx context.Context, db Reader, ids ...string) ([]repo.Circle, error)
- func GetDefaultApps(ctx context.Context, db Reader) ([]string, error)
- func GetFeaturedApps(ctx context.Context, db Reader) ([]string, error)
- func GetLastUsedApps(ctx context.Context, db Queryer, userID string, c cursor.Cursor) ([]string, error)
- func GetPermissions(ctx context.Context, db Reader, ids ...string) ([]repo.Permission, error)
- func GetPtrResults[M any](iter *spanner.RowIterator) (out []*M, err error)
- func GetResult[M any](iter *spanner.RowIterator) (out M, err error)
- func GetResultByBuilder[M any](ctx context.Context, db Queryer, b squirrel.SelectBuilder) (m M, err error)
- func GetResults[M any](iter *spanner.RowIterator) (out []M, err error)
- func GetResultsByBuilder[M any](ctx context.Context, db Queryer, b squirrel.SelectBuilder) ([]M, error)
- func GetSavedApps(ctx context.Context, db Queryer, userID string, f repo.GetSavedAppsFilter) ([]repo.AppSave, error)
- func GetSubscriptions(ctx context.Context, db Reader, ids ...string) ([]repo.Subscription, error)
- func GetTags(ctx context.Context, db Reader, ids ...string) ([]repo.Tag, error)
- func IncAppCircleCounter(ctx context.Context, db ReadWriter, value int64, appIDs ...string) error
- func IncAppRatingCounter(ctx context.Context, db ReadWriter, rating, count int64, appIDs ...string) error
- func IncAppReviewDownvote(ctx context.Context, db Updater, value int64, reviewID string) error
- func IncAppReviewUpvote(ctx context.Context, db Updater, value int64, reviewID string) error
- func IncAppSaveCounter(ctx context.Context, db ReadWriter, value int64, appIDs ...string) error
- func IncAppVoteCounter(ctx context.Context, db ReadWriter, value int64, appIDs ...string) error
- func InsertApp(_ context.Context, db BufferWriter, in repo.AppCreateInput) error
- func InsertAppReview(_ context.Context, db BufferWriter, in repo.AppReviewCreateInput) error
- func InsertAppReviewVote(_ context.Context, db BufferWriter, reviewID, userID string, isUpvote bool) error
- func InsertAppRole(_ context.Context, db BufferWriter, appID, roleID string) error
- func InsertAppSaves(_ context.Context, db BufferWriter, in ...repo.AddAppSaveInput) error
- func InsertAppToken(_ context.Context, db BufferWriter, appTokenInput repo.InsertAppTokenInput) error
- func InsertAppVote(_ context.Context, db BufferWriter, appID, userID string) error
- func InsertByBuilder(ctx context.Context, db Updater, b squirrel.InsertBuilder) (int64, error)
- func InsertCircleApps(_ context.Context, db BufferWriter, in ...repo.AddCircleAppInput) error
- func InsertDefaultApps(_ context.Context, db BufferWriter, userID string, appIDs ...string) error
- func InsertFeaturedApps(_ context.Context, db BufferWriter, userID string, appIDs ...string) error
- func NewSpannerClient(ctx context.Context, dsn, adcCredPath string) (*spanner.Client, error)
- func UpdateApp(_ context.Context, db BufferWriter, appID, userID string, ...) error
- func UpdateByBuilder(ctx context.Context, db Updater, b squirrel.UpdateBuilder) (int64, error)
- func UpdateCircle(_ context.Context, db BufferWriter, circleID string, in repo.CircleUpdateInput) error
- func UpsertAppPermissionInCircles(_ context.Context, db BufferWriter, perms ...repo.AppPermissionInCircle) error
- func UpsertAppPermissions(_ context.Context, db BufferWriter, appID string, permissionIDs ...string) error
- func UpsertAppReviewVote(_ context.Context, db BufferWriter, reviewID, userID string, isUpvote bool) error
- func UpsertAppSubscriptionInCircles(_ context.Context, db BufferWriter, in ...repo.AppSubscriptionInCircle) error
- func UpsertAppSubscriptions(_ context.Context, db BufferWriter, appID string, subscriptionIDs ...string) error
- func UpsertAppTags(_ context.Context, db BufferWriter, appID string, tagIDs ...string) error
- func UpsertCircles(_ context.Context, db BufferWriter, in ...repo.CircleCreateInput) error
- func UpsertLastUsedApp(_ context.Context, db BufferWriter, appID, userID string) error
- func UpsertPermissions(_ context.Context, db BufferWriter, permissions ...repo.Permission) error
- func UpsertSubscriptions(_ context.Context, db BufferWriter, subs ...repo.Subscription) error
- func UpsertTags(_ context.Context, db BufferWriter, tags ...repo.Tag) error
- type BufferWriter
- type DBWriter
- type IndexReader
- type Key
- type Keys
- type Queryer
- type ReadWriter
- type Reader
- type Repo
- func (r Repo) Close()
- func (r Repo) ReadOnlyTx(ctx context.Context, f func(context.Context, repo.ReadActions) error) error
- func (r Repo) ReadWriteTx(ctx context.Context, f func(context.Context, repo.ReadWriteActions) error) (time.Time, error)
- func (r Repo) SingleRead() repo.ReadActions
- func (r Repo) SingleWrite() repo.WriteActions
- type RowReader
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAppScore ¶
func ArgsToParams ¶
func ArgsToParams(args []interface{}) map[string]interface{}
func DeleteAppPermissions ¶
func DeleteAppReviewVote ¶
func DeleteAppReviewVote(_ context.Context, db BufferWriter, reviewID, userID string) error
func DeleteAppReviews ¶
func DeleteAppSaves ¶
func DeleteAppSubscriptions ¶
func DeleteAppTags ¶
func DeleteAppToken ¶
func DeleteAppToken( _ context.Context, db BufferWriter, tokenID string, ) error
func DeleteAppVote ¶
func DeleteAppVote(_ context.Context, db BufferWriter, appID, userID string) (err error)
func DeleteApps ¶
func DeleteByBuilder ¶
func DeleteCircleApps ¶
func DeleteDefaultApps ¶
func DeleteDefaultApps(_ context.Context, db BufferWriter, appIDs ...string) error
func DeleteFeaturedApps ¶
func DeleteFeaturedApps(_ context.Context, db BufferWriter, appIDs ...string) error
func ExistsAppPermission ¶
func ExistsAppReviewVote ¶
func ExistsAppSave ¶
func ExistsAppSubscription ¶
func ExistsAppVote ¶
func ExistsCircleApp ¶
func ExistsDefaultApp ¶
func ExistsFeaturedApp ¶
func GetAppCircleCounter ¶
func GetAppLastUsedByUser ¶
func GetAppPermissions ¶
func GetAppReviewVote ¶
func GetAppReviews ¶
func GetAppReviewsByAppID ¶
func GetAppReviewsByUserID ¶
func GetAppSavedByUser ¶
func GetAppSubscriptions ¶
func GetAppTags ¶
func GetAppToken ¶
func GetAppTokens ¶
func GetAppUpvotedByUser ¶
func GetAppsBySearch ¶
func GetAppsCreatedBy ¶
func GetAppsPermissions ¶
func GetAppsSubscriptions ¶
func GetCircleApps ¶
func GetCircleSubscribers ¶
func GetCircles ¶
func GetLastUsedApps ¶
func GetPermissions ¶
func GetPtrResults ¶
func GetPtrResults[M any](iter *spanner.RowIterator) (out []*M, err error)
GetPtrResults returns the results from the iterator. Calls Stop after the iterator is finished.
func GetResult ¶
func GetResult[M any](iter *spanner.RowIterator) (out M, err error)
GetResult returns the result from the iterator. Calls Stop after the iterator is finished.
func GetResultByBuilder ¶
func GetResults ¶
func GetResults[M any](iter *spanner.RowIterator) (out []M, err error)
GetResults returns the results from the iterator. Calls Stop after the iterator is finished.
func GetResultsByBuilder ¶
func GetSavedApps ¶
func GetSubscriptions ¶
func IncAppCircleCounter ¶
func IncAppRatingCounter ¶
func IncAppReviewDownvote ¶
func IncAppReviewUpvote ¶
func IncAppSaveCounter ¶
func IncAppVoteCounter ¶
func InsertApp ¶
func InsertApp(_ context.Context, db BufferWriter, in repo.AppCreateInput) error
func InsertAppReview ¶
func InsertAppReview(_ context.Context, db BufferWriter, in repo.AppReviewCreateInput) error
func InsertAppReviewVote ¶
func InsertAppRole ¶
func InsertAppRole(_ context.Context, db BufferWriter, appID, roleID string) error
func InsertAppSaves ¶
func InsertAppSaves(_ context.Context, db BufferWriter, in ...repo.AddAppSaveInput) error
func InsertAppToken ¶
func InsertAppToken(_ context.Context, db BufferWriter, appTokenInput repo.InsertAppTokenInput) error
func InsertAppVote ¶
func InsertAppVote(_ context.Context, db BufferWriter, appID, userID string) error
func InsertByBuilder ¶
func InsertCircleApps ¶
func InsertCircleApps(_ context.Context, db BufferWriter, in ...repo.AddCircleAppInput) error
func InsertDefaultApps ¶
func InsertFeaturedApps ¶
func NewSpannerClient ¶
func UpdateApp ¶
func UpdateApp(_ context.Context, db BufferWriter, appID, userID string, in repo.AppUpdateInput) error
func UpdateByBuilder ¶
func UpdateCircle ¶
func UpdateCircle(_ context.Context, db BufferWriter, circleID string, in repo.CircleUpdateInput) error
func UpsertAppPermissionInCircles ¶
func UpsertAppPermissionInCircles(_ context.Context, db BufferWriter, perms ...repo.AppPermissionInCircle) error
func UpsertAppPermissions ¶
func UpsertAppReviewVote ¶
func UpsertAppSubscriptionInCircles ¶
func UpsertAppSubscriptionInCircles(_ context.Context, db BufferWriter, in ...repo.AppSubscriptionInCircle) error
func UpsertAppSubscriptions ¶
func UpsertAppTags ¶
func UpsertCircles ¶
func UpsertCircles(_ context.Context, db BufferWriter, in ...repo.CircleCreateInput) error
func UpsertLastUsedApp ¶
func UpsertLastUsedApp(_ context.Context, db BufferWriter, appID, userID string) error
func UpsertPermissions ¶
func UpsertPermissions(_ context.Context, db BufferWriter, permissions ...repo.Permission) error
func UpsertSubscriptions ¶
func UpsertSubscriptions(_ context.Context, db BufferWriter, subs ...repo.Subscription) error
func UpsertTags ¶
Types ¶
type BufferWriter ¶
type DBWriter ¶
type DBWriter interface { Updater BufferWriter }
type IndexReader ¶
type ReadWriter ¶
type ReadWriter interface { Reader BufferWriter }
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewRepoWithClient ¶
func (Repo) ReadOnlyTx ¶
func (Repo) ReadWriteTx ¶
func (Repo) SingleRead ¶
func (r Repo) SingleRead() repo.ReadActions
func (Repo) SingleWrite ¶
func (r Repo) SingleWrite() repo.WriteActions
Source Files ¶
- delete_app_circle.go
- delete_app_permissions.go
- delete_app_permissions_in_circle.go
- delete_app_review_vote.go
- delete_app_reviews.go
- delete_app_save.go
- delete_app_subscriptions.go
- delete_app_subscriptions_in_circle.go
- delete_app_tags.go
- delete_app_token.go
- delete_app_vote.go
- delete_apps.go
- delete_default_apps.go
- delete_featured_apps.go
- exist_app_save.go
- exists_app_permission.go
- exists_app_review_vote.go
- exists_app_subscription.go
- exists_app_vote.go
- exists_circle_app.go
- exists_default_app.go
- exists_featured_app.go
- get_app.go
- get_app_counters.go
- get_app_last_used_by_user.go
- get_app_permissions.go
- get_app_permissions_in_circle.go
- get_app_review_vote.go
- get_app_reviews.go
- get_app_reviews_by_app_id.go
- get_app_reviews_by_user_id.go
- get_app_roles.go
- get_app_saved_by_user.go
- get_app_subscriptions.go
- get_app_subscriptions_in_circle.go
- get_app_tags.go
- get_app_token.go
- get_app_tokens.go
- get_app_upvoted_by_user.go
- get_apps.go
- get_apps_by_search.go
- get_apps_created_by.go
- get_apps_permissions.go
- get_apps_subscriptions.go
- get_circle_subscribers.go
- get_circles.go
- get_circles_enabled_app.go
- get_default_apps.go
- get_featured_apps.go
- get_last_used_apps.go
- get_permissions.go
- get_saved_apps.go
- get_subscriptions.go
- get_tags.go
- helpers.go
- inc_app_circle_counter.go
- inc_app_rating_counter.go
- inc_app_review_downvote.go
- inc_app_review_upvote.go
- inc_app_save_counter.go
- inc_app_score.go
- inc_app_vote_counter.go
- insert_app.go
- insert_app_review.go
- insert_app_review_vote.go
- insert_app_role.go
- insert_app_saves.go
- insert_app_token.go
- insert_app_vote.go
- insert_circle_apps.go
- insert_default_apps.go
- insert_featured_apps.go
- repo.go
- tx_manager.go
- update_app.go
- update_circle.go
- upsert_app_permission_in_circles.go
- upsert_app_permissions.go
- upsert_app_review_vote.go
- upsert_app_subscription_in_circles.go
- upsert_app_subscriptions.go
- upsert_app_tags.go
- upsert_circle.go
- upsert_last_used_app.go
- upsert_permissions.go
- upsert_subscriptions.go
- upsert_tags.go
Click to show internal directories.
Click to hide internal directories.