Documentation ¶
Overview ¶
Copyright 2017 Applatix, Inc.
Index ¶
- type ServerContext
- func (sc *ServerContext) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (sc *ServerContext) GetDefaultReport(userID string) (*userdb.Report, error)
- func (sc *ServerContext) GetDisplayNameAliases(dimensionName string, report *userdb.Report) map[string]string
- func (sc *ServerContext) GetUserReportStatus(userID string, reportID string) ([]*costdb.IngestStatus, error)
- func (sc *ServerContext) NotifyUpdate() error
- func (sc *ServerContext) ReloadCertificate(publicCertificate, privateKey string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerContext ¶
type ServerContext struct { IngestdURL string CostDB *costdb.CostDatabase UserDB *userdb.UserDatabase SessionManager *userdb.SessionManager AssetsDir string Certificate *tls.Certificate }
ServerContext provides context wrapper around the application server
func NewServerContext ¶
func NewServerContext(ingestdURL string, costdbURL string, userDB *userdb.UserDatabase, assetsDir string) (*ServerContext, error)
NewServerContext returns a new ServerContext instance
func (*ServerContext) GetCertificateFunc ¶
func (sc *ServerContext) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc will be set to tls.Config's GetCertificate member to retrieve current SSL certificate
func (*ServerContext) GetDefaultReport ¶
func (sc *ServerContext) GetDefaultReport(userID string) (*userdb.Report, error)
GetDefaultReport returns a users default report
func (*ServerContext) GetDisplayNameAliases ¶
func (sc *ServerContext) GetDisplayNameAliases(dimensionName string, report *userdb.Report) map[string]string
GetDisplayNameAliases returns a mapping of account name aliases
func (*ServerContext) GetUserReportStatus ¶
func (sc *ServerContext) GetUserReportStatus(userID string, reportID string) ([]*costdb.IngestStatus, error)
GetUserReportStatus returns current statuses of report processing
func (*ServerContext) NotifyUpdate ¶
func (sc *ServerContext) NotifyUpdate() error
NotifyUpdate will notify the ingestd service that changes have been made to the reports table
func (*ServerContext) ReloadCertificate ¶
func (sc *ServerContext) ReloadCertificate(publicCertificate, privateKey string) error
ReloadCertificate reloads SSL certificate after an update
Click to show internal directories.
Click to hide internal directories.