Documentation ¶
Overview ¶
Package interceptors is middleware to alter the graphql query
Index ¶
- Variables
- func InterceptorAPIToken() ent.Interceptor
- func InterceptorGroup() ent.Interceptor
- func InterceptorHush() ent.Interceptor
- func InterceptorOrgMembers() ent.Interceptor
- func InterceptorOrganization() ent.Interceptor
- func InterceptorOrganizationSetting() ent.Interceptor
- func InterceptorPat() ent.Interceptor
- func InterceptorUser() ent.Interceptor
- func InterceptorUserSetting() ent.Interceptor
- func QueryLogger(l *zap.SugaredLogger) ent.InterceptFunc
- type SkipMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ExistOperation is the operation type for Exist queries ExistOperation = "Exist" // IDsOperation is the operation type for IDs queries IDsOperation = "IDs" )
View Source
var ( // ErrInternalServerError is returned when an internal error occurs. ErrInternalServerError = errors.New("internal server error") // ErrUnableToRetrieveUserID is returned when the user cannot be retrieved from the context ErrUnableToRetrieveUserID = errors.New("unable to retrieve user from context") )
Functions ¶
func InterceptorAPIToken ¶ added in v0.5.0
func InterceptorAPIToken() ent.Interceptor
InterceptorAPIToken is middleware to change the api token query
func InterceptorGroup ¶
func InterceptorGroup() ent.Interceptor
InterceptorGroup is middleware to change the Group query
func InterceptorHush ¶ added in v0.5.0
func InterceptorHush() ent.Interceptor
InterceptorHush keeps it secret, keeps it safe
func InterceptorOrgMembers ¶ added in v0.5.2
func InterceptorOrgMembers() ent.Interceptor
InterceptorOrgMembers is middleware to change the Org Members query
func InterceptorOrganization ¶
func InterceptorOrganization() ent.Interceptor
InterceptorOrganization is middleware to change the Organization query
func InterceptorOrganizationSetting ¶ added in v0.5.0
func InterceptorOrganizationSetting() ent.Interceptor
InterceptorOrganizationSetting is middleware to change the org setting query
func InterceptorPat ¶ added in v0.3.3
func InterceptorPat() ent.Interceptor
InterceptorPat is middleware to change the PAT query
func InterceptorUser ¶ added in v0.5.2
func InterceptorUser() ent.Interceptor
InterceptorUser returns an ent interceptor for user that filters users based on the context of the query
func InterceptorUserSetting ¶ added in v0.5.2
func InterceptorUserSetting() ent.Interceptor
func QueryLogger ¶
func QueryLogger(l *zap.SugaredLogger) ent.InterceptFunc
Types ¶
type SkipMode ¶ added in v0.5.0
type SkipMode int
SkipMode is a bit flag for the Skip annotation.
const ( // SkipOnlyQuery skips the interceptor on `Only` queries. SkipOnlyQuery SkipMode = 1 << iota // SkipAllQuery skips the interceptor on `All` queries. SkipAllQuery // SkipExistsQuery skips the interceptor on `Exists` queries. SkipExistsQuery // SkipAll is default mode to skip all. SkipAll = SkipOnlyQuery | SkipAllQuery | SkipExistsQuery )
Click to show internal directories.
Click to hide internal directories.