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

Method Appearance

codersdk/deployment.go:5035–5046  ·  view source on GitHub ↗

Appearance returns the configuration that modifies the visual display of the dashboard.

(ctx context.Context)

Source from the content-addressed store, hash-verified

5033// Appearance returns the configuration that modifies the visual
5034// display of the dashboard.
5035func (c *Client) Appearance(ctx context.Context) (AppearanceConfig, error) {
5036 res, err := c.Request(ctx, http.MethodGet, "/api/v2/appearance", nil)
5037 if err != nil {
5038 return AppearanceConfig{}, err
5039 }
5040 defer res.Body.Close()
5041 if res.StatusCode != http.StatusOK {
5042 return AppearanceConfig{}, ReadBodyAsError(res)
5043 }
5044 var cfg AppearanceConfig
5045 return cfg, json.NewDecoder(res.Body).Decode(&cfg)
5046}
5047
5048func (c *Client) UpdateAppearance(ctx context.Context, appearance UpdateAppearanceConfig) error {
5049 res, err := c.Request(ctx, http.MethodPut, "/api/v2/appearance", appearance)

Callers 8

initAppearanceFunction · 0.80
vscodeSSHMethod · 0.80
TestAnnouncementBannersFunction · 0.80
TestCustomSupportLinksFunction · 0.80
TestCustomDocsURLFunction · 0.80
TestDefaultSupportLinksFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 6

TestAnnouncementBannersFunction · 0.64
TestCustomSupportLinksFunction · 0.64
TestCustomDocsURLFunction · 0.64
TestDefaultSupportLinksFunction · 0.64