server

package
v0.2.1-0...-9c16218 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 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 Config

type Config struct {
	HTTPAddr                   string
	CORSAllowedOrigins         []string
	CORSDebug                  bool
	OAuth2IssuerURI            string
	OAuth2Audience             string
	OAuth2Scopes               []string
	OAuth2PKCEClientID         string
	OAuth2PKCERedirectEndpoint string
}

Config describes server configuration.

type Server

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

Server contains the state of the server.

func New

func New(ctx context.Context, c *core.Core, cfg Config) (s Server, err error)

New returns a new Server.

func (*Server) NewRouter

func (s *Server) NewRouter(c Config) (http.Handler, error)

NewRouter configures router and returns it.

func (Server) Run

func (s Server) Run()

Run is the main routine for the Server.

func (Server) Stop

func (s Server) Stop(ctx context.Context) error

Stop is used to gracefully stop the Server.

Jump to

Keyboard shortcuts

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