Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuntimeConfig ¶
type RuntimeConfig struct { StorageClient *storage.Client // client used to connect to the storage in order to read and write files RdbClient *redis.Client MongoClient *mongo.Client MongoCtx context.Context CtxCancel context.CancelFunc ArchiveIDs datastructs.Set SourceBucketList []dbutil.SourceBucket SourceBuckets map[string]dbutil.SourceBucket }
RuntimeConfig holds pointers to storage clients and some in memory lists
func InitRuntimeConfig ¶
func InitRuntimeConfig(sc *ServerConfig) *RuntimeConfig
type ServerConfig ¶
type ServerConfig struct { ProjectID string // google cloud project-id that contains bucket resources ArchiveBaseURL string // url where zip files will be accessible from SourceBucketName string // name of bucket where provided files are stored SourceBucketPrefix string // only returns files within this directory in the bucket ArchiveBucketName string // name of bucket where archive files will be written to ArchiveBucketPrefix string // path to directory in the bucket to write archive files to SourceLocalDir string // path to directory on local machine with available files ArchiveLocalDir string // path to directory on local machine to write archive files SourceAPIURL string // URL to API giving access to provided files DbConnector string // link to connect to mongoDB database DbName string RdbAddr string // what address and port redis should connect to Port string // port to start api listening on Mode string // mode that gin is running in (use as mode for entire application) ServiceEmailAddress string // email address for sending the form and download link ServiceEmailPassword string // password for email address }
ServerConfig holds all the deployment specific environment variables and settings it gets initialised by a function and should be globally accessible
func InitServerConfig ¶
func InitServerConfig() *ServerConfig
InitServerConfig initializes the serverConfig struct with all of the environment variables
Click to show internal directories.
Click to hide internal directories.