package
0.0.70
Repository: https://github.com/advdv/stdgo.git
Documentation: pkg.go.dev

# Functions

AnonymousUserID configures the id that will be used in the setting when the user is not authenticated.
AuthenticatedOrganizations returns the organization and roles from the context or panic.
AuthenticatedOrganizationsSetting configures the transaction-scoped postgres setting that will cary which organizations the user is autthenticated for.
AuthenticatedUser returns the user that the context is authenticated for.
AuthenticatedUserSetting configures the transaction-scoped postgres setting that will cary which user is authenticated for.
DiscourageSequentialScans will dis-incentivize the query planner to use sequential scans for all transactions.
NewDriver inits the driver.
NoTestForMaxQueryPlanCosts returns whether the cost check is disabled.
TestForMaxQueryPlanCosts will enable EXPLAIN on every query that is executed with the driver and fail when the cost of the resulting query is above the maximum.
TxExecQueryLoggingLevel configures the level at which transaction's exec and query sql logs are send to the logger.
WithAuthenticatedOrganizations declares on the context that any calls carrying the context has access to these organizations with the provided role.
WithAuthenticatedUser declares on the context that it is has access to a user with the provided id.
WithNoTestForMaxQueryPlanCosts allow disabling the plan cost check.

# Structs

Driver is an opionated Ent driver that wraps a base driver but only allows interactions with the database to be done through a transaction with specific isolation properties and auth settings applied properly.
OrganizationRole describes a role in an organization.
Tx wraps a Ent transaction to provide us with the ability to hook any sql before it's being executed.

# Type aliases

No description provided by the author