Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByProject ¶
func ByProject(idColumn string) ent.Interceptor
ByProject returns an ent.Interceptor to intercept a SQL query statement, it works with WithProjectInterceptor. ByProject means the query resources must own by the projects of the contextual subject.
func ByProjectOptional ¶
func ByProjectOptional(idColumn string) ent.Interceptor
ByProjectOptional returns an ent.Interceptor to intercept a SQL query statement, it works with WithProjectInterceptor. ByProjectOptional means the query resources should own by the projects of the contextual subject, or global.
func BySubject ¶
func BySubject(idColumn string) ent.Interceptor
BySubject returns an ent.Interceptor to intercept a SQL query statement, it works with WithSubjectInterceptor.
func WithProjectInterceptor ¶
WithProjectInterceptor values the given context to indicate DAO that must embed the owned projects of the contextual subject into the WHERE clause of the SQL query statement. WithProjectInterceptor only works with those schemas using the ent.Interceptor created by ByProject.
func WithSubjectInterceptor ¶
WithSubjectInterceptor values the given context to indicate DAO that must embed the contextual subject ID into the WHERE clause of the SQL query statement. WithSubjectInterceptor only works with those schemas using the ent.Interceptor created by BySubject.
Types ¶
This section is empty.