serve

package
v0.0.0-...-c846bbc Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ServiceID = "serve"

Variables

This section is empty.

Functions

func MetricsServe

func MetricsServe(opts MetricsServeOptions, httpServer HTTPServerInterface) error

func Serve

func Serve(opts ServeOptions, httpServer HTTPServerInterface) error

Types

type HTTPServer

type HTTPServer struct{}

func (*HTTPServer) Run

func (h *HTTPServer) Run(conf supporthttp.Config)

type HTTPServerInterface

type HTTPServerInterface interface {
	Run(conf supporthttp.Config)
}

type MetricsServeOptions

type MetricsServeOptions struct {
	Port        int
	Environment string

	MonitorService monitor.MonitorServiceInterface
	MetricType     monitor.MetricType
}

type ServeOptions

type ServeOptions struct {
	Environment           string
	GitCommit             string
	Port                  int
	Version               string
	InstanceName          string
	MonitorService        monitor.MonitorServiceInterface
	MtnDBConnectionPool   db.DBConnectionPool
	AdminDBConnectionPool db.DBConnectionPool
	EC256PublicKey        string
	EC256PrivateKey       string
	Models                *data.Models
	CorsAllowedOrigins    []string

	EmailMessengerClient message.MessengerClient
	MessageDispatcher    message.MessageDispatcherInterface
	SEP24JWTSecret       string

	BaseURL                         string
	ResetTokenExpirationHours       int
	NetworkPassphrase               string
	NetworkType                     utils.NetworkType
	SubmitterEngine                 engine.SubmitterEngine
	Sep10SigningPublicKey           string
	Sep10SigningPrivateKey          string
	AnchorPlatformBaseSepURL        string
	AnchorPlatformBasePlatformURL   string
	AnchorPlatformOutgoingJWTSecret string
	AnchorPlatformAPIService        anchorplatform.AnchorPlatformAPIServiceInterface
	CrashTrackerClient              crashtracker.CrashTrackerClient
	ReCAPTCHASiteKey                string
	ReCAPTCHASiteSecretKey          string
	DisableMFA                      bool
	DisableReCAPTCHA                bool
	PasswordValidator               *authUtils.PasswordValidator
	EnableScheduler                 bool

	DistributionAccountService  services.DistributionAccountServiceInterface
	DistAccEncryptionPassphrase string
	EventProducer               events.Producer
	MaxInvitationResendAttempts int
	SingleTenantMode            bool
	CircleService               circle.ServiceInterface
	// contains filtered or unexported fields
}

func (*ServeOptions) SetupDependencies

func (opts *ServeOptions) SetupDependencies() error

SetupDependencies uses the serve options to setup the dependencies for the server.

func (*ServeOptions) ValidateSecurity

func (opts *ServeOptions) ValidateSecurity() error

ValidateSecurity validates the MFA and ReCAPTCHA security options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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