services

package
v3.4.232 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Services used by API endpoint handlers and other bits of code. This is a collection of common things needed by code, such as:

  • Access to an instance of logger
  • AWS S3 API
  • The current Mongo DB connection
  • Facilities to send user notifications
  • API configuration

among others

Index

Constants

This section is empty.

Variables

View Source
var ApiVersion string

NOTE: these 2 vars are set during compilation in CI build (see Makefile)

View Source
var GitHash string

Functions

This section is empty.

Types

type APIServices

type APIServices struct {
	// Configuration read in on startup
	Config config.APIConfig

	// Default logger
	Log logger.ILogger

	// Anything talking to S3 should use this
	S3 s3iface.S3API

	// AWS SNS
	SNS awsutil.SNSInterface

	// Anything accessing files should use this
	FS fileaccess.FileAccess

	// Validation of JWT tokens
	JWTReader jwtparser.IJWTReader

	// ID generator
	IDGen idgen.IDGenerator

	// Timestamp retriever - so can be mocked for unit tests
	TimeStamper timestamper.ITimeStamper

	// Our mongo db connection
	MongoDB *mongo.Database
}

Jump to

Keyboard shortcuts

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