MCPcopy Index your code
hub / github.com/coder/coder / GetChats

Method GetChats

coderd/database/dbauthz/dbauthz.go:3271–3277  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetChatsParams)

Source from the content-addressed store, hash-verified

3269}
3270
3271func (q *querier) GetChats(ctx context.Context, arg database.GetChatsParams) ([]database.GetChatsRow, error) {
3272 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceChat.Type)
3273 if err != nil {
3274 return nil, xerrors.Errorf("(dev error) prepare sql filter: %w", err)
3275 }
3276 return q.db.GetAuthorizedChats(ctx, arg, prep)
3277}
3278
3279func (q *querier) GetChatsByChatFileID(ctx context.Context, fileID uuid.UUID) ([]database.Chat, error) {
3280 return fetchWithPostFilter(q.auth, policy.ActionRead, q.db.GetChatsByChatFileID)(ctx, fileID)

Callers 1

GetAuthorizedChatsMethod · 0.95

Calls 3

prepareSQLFilterFunction · 0.85
GetAuthorizedChatsMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected