Documentation
¶
Index ¶
- func CombineFilterWithAccessibleIds(filterIds []*int64, accessibleIds []*int64) []*int64
- func EnsureListOptions(options *entity.ListOptions) *entity.ListOptions
- func EnsurePaginated(filter *entity.Paginated)
- func GetCurrentUniqueUserId(ctx context.Context) (string, error)
- func GetCurrentUserId(ctx context.Context, db database.Database) (int64, error)
- func GetPageInfo[T entity.HasCursor](res []T, cursors []string, pageSize int, currentCursor *string) *entity.PageInfo
- func GetPages(firstCursor *string, cursors []string, pageSize int) ([]entity.Page, entity.Page)
- func GetTestConfig(authEnabled bool) *util.Config
- func GetUserIdByUniqueId(ctx context.Context, db database.Database, uniqueUserId string) (int64, error)
- func Int64Ptr(i int64) *int64
- func NewAdminContext() context.Context
- type HandlerContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineFilterWithAccessibleIds ¶ added in v1.51.0
CombineFilterWithAccessibleIds combines filterIds and accessibleIds based on the following rules: - If accessibleIds is empty, return filterIds (full access) - If accessibleIds contains only -1, return [-1] (no access) - If filterIds is empty, return accessibleIds (use accessibleIds as filter) - Otherwise, calculate & return the intersection of filterIds and accessibleIds
func EnsureListOptions ¶ added in v1.25.0
func EnsureListOptions(options *entity.ListOptions) *entity.ListOptions
func EnsurePaginated ¶
func GetCurrentUniqueUserId ¶ added in v1.54.0
func GetCurrentUserId ¶
func GetPageInfo ¶
func GetTestConfig ¶ added in v1.47.0
func GetUserIdByUniqueId ¶ added in v1.54.0
func NewAdminContext ¶ added in v1.26.0
Types ¶
type HandlerContext ¶ added in v1.24.0
type HandlerContext struct {
DB database.Database
EventReg event.EventRegistry
Cache cache.Cache
Authz openfga.Authorization
}
Click to show internal directories.
Click to hide internal directories.