server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2017 Applatix, Inc.

Index

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

Jump to

Keyboard shortcuts

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