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
}
Click to show internal directories.
Click to hide internal directories.