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

Method GetServiceBanner

coderd/agentapi/announcement_banners.go:19–25  ·  view source on GitHub ↗

Deprecated: GetServiceBanner has been deprecated in favor of GetAnnouncementBanners.

(ctx context.Context, _ *proto.GetServiceBannerRequest)

Source from the content-addressed store, hash-verified

17
18// Deprecated: GetServiceBanner has been deprecated in favor of GetAnnouncementBanners.
19func (a *AnnouncementBannerAPI) GetServiceBanner(ctx context.Context, _ *proto.GetServiceBannerRequest) (*proto.ServiceBanner, error) {
20 cfg, err := (*a.appearanceFetcher.Load()).Fetch(ctx)
21 if err != nil {
22 return nil, xerrors.Errorf("fetch appearance: %w", err)
23 }
24 return agentsdk.ProtoFromServiceBanner(cfg.ServiceBanner), nil
25}
26
27func (a *AnnouncementBannerAPI) GetAnnouncementBanners(ctx context.Context, _ *proto.GetAnnouncementBannersRequest) (*proto.GetAnnouncementBannersResponse, error) {
28 cfg, err := (*a.appearanceFetcher.Load()).Fetch(ctx)

Callers

nothing calls this directly

Calls 4

ProtoFromServiceBannerFunction · 0.92
FetchMethod · 0.65
LoadMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected