server

package
v0.0.0-...-64a628e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package server is for setting up the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGQLResponseMiddleware

func NewGQLResponseMiddleware() graphql.ResponseMiddleware

NewGQLResponseMiddleware returns a handler with a request based logger

func Serve

func Serve(config *viper.Viper)

Serve runs the server

Types

type OktaClientConfig

type OktaClientConfig struct {
	AltJobCodes  bool
	OktaClientID string
	OktaIssuer   string
}

OktaClientConfig is the okta client configuration

type Server

type Server struct {
	Config *viper.Viper
	// contains filtered or unexported fields
}

Server holds dependencies for running the EASi server

func NewServer

func NewServer(config *viper.Viper) *Server

NewServer sets up the dependencies for a server

func (Server) CheckEmailClient

func (s Server) CheckEmailClient(client email.Client)

CheckEmailClient sends a email to test it is configured properly this method will panic on failures

func (Server) NewCEDARClientCheck

func (s Server) NewCEDARClientCheck()

NewCEDARClientCheck checks if CEDAR clients are not connectable

func (Server) NewDBConfig

func (s Server) NewDBConfig() storage.DBConfig

NewDBConfig returns a new DBConfig and check required fields

func (Server) NewEmailConfig

func (s Server) NewEmailConfig() email.Config

NewEmailConfig returns a new email.Config and checks required fields

func (Server) NewFlagConfig

func (s Server) NewFlagConfig() flags.Config

NewFlagConfig checks if Launch Darkly config exists

func (Server) NewLocalAuthIsEnabled

func (s Server) NewLocalAuthIsEnabled() bool

NewLocalAuthIsEnabled returns if local auth is enabled

func (Server) NewOktaAPIClientCheck

func (s Server) NewOktaAPIClientCheck()

NewOktaAPIClientCheck checks if the Okta API client is configured

func (Server) NewOktaClientConfig

func (s Server) NewOktaClientConfig() OktaClientConfig

NewOktaClientConfig returns the okta client config

func (Server) NewS3Config

func (s Server) NewS3Config() upload.Config

NewS3Config returns a new s3.Config and checks required fields

func (Server) NewSESConfig

func (s Server) NewSESConfig() appses.Config

NewSESConfig returns a new email.Config and checks required fields

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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