(ctx context.Context, qc *queryContext)
| 2016 | } |
| 2017 | |
| 2018 | func authorizeRequest(ctx context.Context, qc *queryContext) error { |
| 2019 | if err := authorizeQuery(ctx, &qc.dqlRes, qc.graphql); err != nil { |
| 2020 | return err |
| 2021 | } |
| 2022 | |
| 2023 | // TODO(Aman): can be optimized to do the authorization in just one func call |
| 2024 | for _, gmu := range qc.gmuList { |
| 2025 | if err := authorizeMutation(ctx, gmu); err != nil { |
| 2026 | return err |
| 2027 | } |
| 2028 | } |
| 2029 | |
| 2030 | return nil |
| 2031 | } |
| 2032 | |
| 2033 | func getHash(ns, startTs uint64) string { |
| 2034 | h := sha256.New() |
no test coverage detected