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

Method GetWorkspaceAppByAgentIDAndSlug

coderd/database/dbauthz/dbauthz.go:5074–5081  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetWorkspaceAppByAgentIDAndSlugParams)

Source from the content-addressed store, hash-verified

5072}
5073
5074func (q *querier) GetWorkspaceAppByAgentIDAndSlug(ctx context.Context, arg database.GetWorkspaceAppByAgentIDAndSlugParams) (database.WorkspaceApp, error) {
5075 // If we can fetch the workspace, we can fetch the apps. Use the authorized call.
5076 if _, err := q.GetWorkspaceByAgentID(ctx, arg.AgentID); err != nil {
5077 return database.WorkspaceApp{}, err
5078 }
5079
5080 return q.db.GetWorkspaceAppByAgentIDAndSlug(ctx, arg)
5081}
5082
5083func (q *querier) GetWorkspaceAppStatusesByAppIDs(ctx context.Context, ids []uuid.UUID) ([]database.WorkspaceAppStatus, error) {
5084 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 2

GetWorkspaceByAgentIDMethod · 0.95

Tested by

no test coverage detected