Documentation ¶
Overview ¶
Package ui implements the GRPC UI service.
Index ¶
- type Config
- type Service
- func (s *Service) ApplyLandscapeConfig(ctx context.Context, landscapeConfig *agentapi.LandscapeConfig) (*agentapi.LandscapeSource, error)
- func (s *Service) ApplyProToken(ctx context.Context, info *agentapi.ProAttachInfo) (_ *agentapi.SubscriptionInfo, err error)
- func (s *Service) GetConfigSources(ctx context.Context, empty *agentapi.Empty) (*agentapi.ConfigSources, error)
- func (s *Service) NotifyPurchase(ctx context.Context, empty *agentapi.Empty) (info *agentapi.SubscriptionInfo, errs error)
- func (s *Service) Ping(ctx context.Context, request *agentapi.Empty) (*agentapi.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { SetUserSubscription(ctx context.Context, token string) error SetStoreSubscription(ctx context.Context, token string) error Subscription() (string, config.Source, error) SetUserLandscapeConfig(ctx context.Context, token string) error LandscapeClientConfig() (string, config.Source, error) }
Config is a provider for the subscription configuration.
type Service ¶
type Service struct { agentapi.UnimplementedUIServer // contains filtered or unexported fields }
Service it the UI GRPC service implementation.
func New ¶
func New(ctx context.Context, config Config, db *database.DistroDB, args ...contracts.Option) (s Service)
New returns a new service handling the UI API.
func (*Service) ApplyLandscapeConfig ¶
func (s *Service) ApplyLandscapeConfig(ctx context.Context, landscapeConfig *agentapi.LandscapeConfig) (*agentapi.LandscapeSource, error)
ApplyLandscapeConfig handles the gRPC call to set landscape configuration.
func (*Service) ApplyProToken ¶
func (s *Service) ApplyProToken(ctx context.Context, info *agentapi.ProAttachInfo) (_ *agentapi.SubscriptionInfo, err error)
ApplyProToken handles the gRPC call to pro attach all distros using a token provided by the GUI.
func (*Service) GetConfigSources ¶
func (s *Service) GetConfigSources(ctx context.Context, empty *agentapi.Empty) (*agentapi.ConfigSources, error)
GetConfigSources handles the gRPC call to return the type of subscription and Landscape config sources.
func (*Service) NotifyPurchase ¶
func (s *Service) NotifyPurchase(ctx context.Context, empty *agentapi.Empty) (info *agentapi.SubscriptionInfo, errs error)
NotifyPurchase handles the client notification of a successful purchase through MS Store.
Click to show internal directories.
Click to hide internal directories.