Documentation
¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) Authorize(r *http.Request, action policy.Action, object rbac.Objecter) bool
- func (api *API) CheckBuildUsage(_ context.Context, _ database.Store, templateVersion *database.TemplateVersion, ...) (wsbuilder.UsageCheckResponse, error)
- func (api *API) Close() error
- func (api *API) RegisterInMemoryAIBridgeProxydHTTPHandler(srv http.Handler)
- func (api *API) RequireFeatureMW(feat codersdk.FeatureName) func(http.Handler) http.Handler
- type Options
- type TemplateACLUpdateValidator
Constants ¶
View Source
const ( AIGatewayProxyPath = agplaibridge.AIGatewayRootPath + "/proxy" AIBridgeProxyPath = agplaibridge.AIBridgeRootPath + "/proxy" )
API route prefixes for the AI Gateway Proxy and legacy AI Bridge Proxy endpoints.
View Source
const ( // PubsubEventLicenses is the pubsub event that tells other replicas to // re-read licenses from the database and recompute entitlements. // // It is published and subscribed on api.ReplicaSyncPubsub (always Postgres), // not api.Pubsub. When the NATS pubsub experiment is enabled, api.Pubsub is // the embedded NATS pubsub whose cluster mesh only forms once a replica is // HA-licensed, so propagating license changes over it is circular: a fresh // replica could not learn about the license that would let it join the mesh. // ReplicaSyncPubsub is available as soon as the DB connection is, independent // of clustering or licensing. PubsubEventLicenses = "licenses" )
View Source
const TimeFormatHHMM = "15:04"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
AGPL *coderd.API
*Options
// ProxyHealth checks the reachability of all workspace proxies.
ProxyHealth *proxyhealth.ProxyHealth
// contains filtered or unexported fields
}
func New ¶
New constructs an Enterprise coderd API instance. This handler is designed to wrap the AGPL Coder code and layer Enterprise functionality on top as much as possible.
func (*API) CheckBuildUsage ¶ added in v2.25.0
func (api *API) CheckBuildUsage( _ context.Context, _ database.Store, templateVersion *database.TemplateVersion, task *database.Task, transition database.WorkspaceTransition, ) (wsbuilder.UsageCheckResponse, error)
func (*API) RegisterInMemoryAIBridgeProxydHTTPHandler ¶ added in v2.30.0
RegisterInMemoryAIBridgeProxydHTTPHandler mounts [aibridgeproxyd.Server]'s HTTP handler onto API's router, so that requests to aibridgedproxy will be relayed from Coder's API server to the in-memory aibridgedproxy.
func (*API) RequireFeatureMW ¶ added in v2.14.0
type Options ¶
type Options struct {
*coderd.Options
RBAC bool
AuditLogging bool
ConnectionLogging bool
// Whether to block non-browser connections.
BrowserOnly bool
SCIMAPIKey []byte
// UseLegacySCIM opts into the legacy SCIM handler implementation
// (imulab/go-scim based). This is provided for backward compatibility
// during the transition to the new elimity-com/scim implementation.
// It will be removed in a future release.
UseLegacySCIM bool
ExternalTokenEncryption []dbcrypt.Cipher
// ReplicaManager detects and syncs multiple Coder replicas. When provided,
// the API owns and closes it.
ReplicaManager *replicasync.Manager
// Used for high availability.
ReplicaSyncUpdateInterval time.Duration
ReplicaErrorGracePeriod time.Duration
ClusterHost string // IP or hostname to reach this specific replica
DERPServerRelayAddress string
DERPServerRegionID int
// Used for user quiet hours schedules.
DefaultQuietHoursSchedule string // cron schedule, if empty user quiet hours schedules are disabled
EntitlementsUpdateInterval time.Duration
ProxyHealthInterval time.Duration
LicenseKeys map[string]ed25519.PublicKey
// optional pre-shared key for authentication of external provisioner daemons
ProvisionerDaemonPSK string
CheckInactiveUsersCancelFunc func()
}
type TemplateACLUpdateValidator ¶ added in v2.26.0
type TemplateACLUpdateValidator codersdk.UpdateTemplateACL
func (TemplateACLUpdateValidator) Groups ¶ added in v2.26.0
func (w TemplateACLUpdateValidator) Groups() (map[string]codersdk.TemplateRole, string)
func (TemplateACLUpdateValidator) Users ¶ added in v2.26.0
func (w TemplateACLUpdateValidator) Users() (map[string]codersdk.TemplateRole, string)
func (TemplateACLUpdateValidator) ValidateRole ¶ added in v2.26.0
func (TemplateACLUpdateValidator) ValidateRole(role codersdk.TemplateRole) error
Source Files
¶
- agentfirewall.go
- aibridge.go
- aibridgeproxy.go
- aibridgeserve.go
- aigatewaykeys.go
- appearance.go
- coderd.go
- connectionlog.go
- groups.go
- idpsync.go
- licenses.go
- notifications.go
- organizations.go
- prebuilds.go
- provisionerdaemons.go
- provisionerkeys.go
- replicas.go
- roles.go
- scimroutes.go
- templates.go
- userauth.go
- users.go
- workspaceagents.go
- workspaceproxy.go
- workspaceproxycoordinate.go
- workspacequota.go
- workspacesharing.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package httpmw contains middleware for HTTP handlers.
|
Package httpmw contains middleware for HTTP handlers. |
|
Package legacyscim preserves the old imulab/go-scim based SCIM handler.
|
Package legacyscim preserves the old imulab/go-scim based SCIM handler. |
|
Package license provides the license parsing and validation logic for Coderd.
|
Package license provides the license parsing and validation logic for Coderd. |
|
x
|
|
Click to show internal directories.
Click to hide internal directories.