server

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: BSD-3-Clause Imports: 59 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailService added in v0.5.1

type EmailService interface {
	Notify(title, body string) error
	SendEmail(from string, to []string, subject string, body string) error
}

EmailService defines interface for sending email messages.

type Options

type Options struct {
	Name                    string
	Version                 string
	BuildInfo               string
	Brand                   string
	Listen                  string
	ListenTLS               string
	ListenInternal          string
	ListenInternalTLS       string
	TLSKey                  string
	TLSCert                 string
	Domain                  string
	Headers                 map[string]string
	SessionCookieName       string
	AssetsDir               string
	StaticDir               string
	TemplatesDir            string
	StorageDir              string
	GoogleAnalyticsID       string
	RememberMeDays          int
	DefaultFrom             string
	ContactRecipientEmail   string
	ACMEDirectoryURL        string
	ACMEDirectoryURLStaging string
	SkipDomainVerification  bool
	VerificationSubdomain   string
	TrustedDomains          []string
	ForbiddenDomains        []string
	APITrustedProxyCIDRs    []string
	APIProxyRealIPHeader    string
	APIHourlyRateLimit      int
	APIEnabled              bool

	Logger              *logging.Logger
	AccessLogger        *logging.Logger
	AuditLogger         *logging.Logger
	PackageAccessLogger *logging.Logger

	EmailService       EmailService
	RecoveryService    *recovery.Service
	MaintenanceService *maintenance.Service

	SessionService      session.Service
	UserService         user.Service
	NotificationService notification.Service
	CertificateService  certificate.Service
	PackagesService     packages.Service
	KeyService          key.Service
	GCRAStoreService    gcrastore.Service
}

Options structure contains server's configurable properties.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server contains all required properties, services and functions to provide core functionality.

func New added in v0.5.3

func New(o Options) (s *Server, err error)

New initializes new server with provided options.

func (*Server) Serve

func (s *Server) Serve() error

Serve starts servers.

func (*Server) Shutdown added in v0.4.1

func (s *Server) Shutdown(ctx context.Context)

Shutdown gracefully terminates servers.

Directories

Path Synopsis
Package config holds project and service related data and structures that define optional parameters for different parts of the service.
Package config holds project and service related data and structures that define optional parameters for different parts of the service.

Jump to

Keyboard shortcuts

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