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

Method GetWorkspaceProxyByHostname

coderd/database/querier.go:903–903  ·  view source on GitHub ↗

Finds a workspace proxy that has an access URL or app hostname that matches the provided hostname. This is to check if a hostname matches any workspace proxy. The hostname must be sanitized to only contain [a-zA-Z0-9.-] before calling this query. The scheme, port and path should be stripped.

(ctx context.Context, arg GetWorkspaceProxyByHostnameParams)

Source from the content-addressed store, hash-verified

901 // this query. The scheme, port and path should be stripped.
902 //
903 GetWorkspaceProxyByHostname(ctx context.Context, arg GetWorkspaceProxyByHostnameParams) (WorkspaceProxy, error)
904 GetWorkspaceProxyByID(ctx context.Context, id uuid.UUID) (WorkspaceProxy, error)
905 GetWorkspaceProxyByName(ctx context.Context, name string) (WorkspaceProxy, error)
906 GetWorkspaceResourceByID(ctx context.Context, id uuid.UUID) (WorkspaceResource, error)

Callers 5

TestProxyByHostnameFunction · 0.65
TestSystemFunctionsMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 2

TestProxyByHostnameFunction · 0.52
TestSystemFunctionsMethod · 0.52