mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: use appearance.Fetcher in agentapi (#11770)
This PR updates the Agent API to use the appearance.Fetcher, which is set by entitlement code in Enterprise coderd. This brings the agentapi into compliance with the Enterprise feature.
This commit is contained in:
@@ -104,3 +104,19 @@ func SDKAppFromProto(protoApp *WorkspaceApp) (codersdk.WorkspaceApp, error) {
|
||||
Health: health,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func SDKServiceBannerFromProto(sbp *ServiceBanner) codersdk.ServiceBannerConfig {
|
||||
return codersdk.ServiceBannerConfig{
|
||||
Enabled: sbp.GetEnabled(),
|
||||
Message: sbp.GetMessage(),
|
||||
BackgroundColor: sbp.GetBackgroundColor(),
|
||||
}
|
||||
}
|
||||
|
||||
func ServiceBannerFromSDK(sb codersdk.ServiceBannerConfig) *ServiceBanner {
|
||||
return &ServiceBanner{
|
||||
Enabled: sb.Enabled,
|
||||
Message: sb.Message,
|
||||
BackgroundColor: sb.BackgroundColor,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user