ui

package
v0.54.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Name               string                          `toml:"name" comment:"Name of this CDS UI Service\n Enter a name to enable this service" json:"name"`
	Staticdir          string                          `toml:"staticdir" default:"./ui_static_files" comment:"This directory must contain the dist directory." json:"staticdir"`
	BaseURL            string                          `` /* 143-byte string literal not displayed */
	DeployURL          string                          `` /* 246-byte string literal not displayed */
	SentryURL          string                          `toml:"sentryURL" commented:"true" comment:"Sentry URL. Optional" json:"-"`
	HTTP               service.HTTPRouterConfiguration `toml:"http" comment:"######################\n CDS UI HTTP Configuration \n######################" json:"http"`
	URL                string                          `toml:"url" comment:"Public URL of this UI service." default:"http://localhost:8080" json:"url"`
	API                service.APIServiceConfiguration `toml:"api" comment:"######################\n CDS API Settings \n######################" json:"api"`
	HooksURL           string                          `toml:"hooksURL" comment:"Hooks µService URL" default:"http://localhost:8083" json:"hooksURL"`
	CDNURL             string                          `toml:"cdnURL" comment:"CDN µService URL" default:"http://localhost:8089" json:"cdnURL"`
	EnableServiceProxy bool                            `` /* 193-byte string literal not displayed */
}

Configuration is the ui configuration structure

type Service

type Service struct {
	service.Common
	Cfg     Configuration
	Router  *api.Router
	Server  *http.Server
	HTMLDir string
	DocsDir string
}

Service is the stuct representing a ui µService

func New

func New() *Service

New returns a new service

func (*Service) ApplyConfiguration

func (s *Service) ApplyConfiguration(config interface{}) error

ApplyConfiguration apply an object of type hooks.Configuration after checking it

func (*Service) BeforeStart

func (s *Service) BeforeStart(ctx context.Context) error

Serve will start the http ui server

func (*Service) CheckConfiguration

func (s *Service) CheckConfiguration(config interface{}) error

CheckConfiguration checks the validity of the configuration object

func (*Service) Init

func (s *Service) Init(config interface{}) (cdsclient.ServiceConfig, error)

func (*Service) Serve

func (s *Service) Serve(ctx context.Context) error

func (*Service) Status

func (s *Service) Status(ctx context.Context) *sdk.MonitoringStatus

Status returns sdk.MonitoringStatus, implements interface service.Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL