Documentation
¶
Overview ¶
Package config provides the forum configuration file structure, initialization and reading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Address string `hcl:"address" envconfig:"BEBOP_ADDRESS"`
BaseURL string `hcl:"base_url" envconfig:"BEBOP_BASE_URL"`
Title string `hcl:"title" envconfig:"BEBOP_TITLE"`
JWT struct {
Secret string `hcl:"secret" envconfig:"BEBOP_JWT_SECRET"`
} `hcl:"jwt"`
FileStorage struct {
Type string `hcl:"type" envconfig:"BEBOP_FILE_STORAGE_TYPE"`
Local struct {
Dir string `hcl:"dir" envconfig:"BEBOP_FILE_STORAGE_LOCAL_DIR"`
} `hcl:"local"`
GoogleCloudStorage struct {
ServiceAccountFile string `hcl:"service_account_file" envconfig:"BEBOP_FILE_STORAGE_GCS_SERVICE_ACCOUNT_FILE"`
Bucket string `hcl:"bucket" envconfig:"BEBOP_FILE_STORAGE_GCS_BUCKET"`
} `hcl:"google_cloud_storage"`
AmazonS3 struct {
AccessKey string `hcl:"access_key" envconfig:"BEBOP_FILE_STORAGE_S3_ACCESS_KEY"`
SecretKey string `hcl:"secret_key" envconfig:"BEBOP_FILE_STORAGE_S3_SECRET_KEY"`
Region string `hcl:"region" envconfig:"BEBOP_FILE_STORAGE_S3_REGION"`
Bucket string `hcl:"bucket" envconfig:"BEBOP_FILE_STORAGE_S3_BUCKET"`
} `hcl:"amazon_s3"`
CovenantS3 struct {
Database string `hcl:"database" envconfig:"BEBOP_STORE_COVENANTSQL_DATABASE"`
Config string `hcl:"config" envconfig:"BEBOP_STORE_COVENANTSQL_CONFIG"`
MasterKey string `hcl:"masterkey" envconfig:"BEBOP_STORE_COVENANTSQL_MASTERKEY"`
} `hcl:"covenant_s3"`
} `hcl:"file_storage"`
Store struct {
Type string `hcl:"type" envconfig:"BEBOP_STORE_TYPE"`
CovenantSQL struct {
Database string `hcl:"database" envconfig:"BEBOP_STORE_COVENANTSQL_DATABASE"`
Config string `hcl:"config" envconfig:"BEBOP_STORE_COVENANTSQL_CONFIG"`
MasterKey string `hcl:"masterkey" envconfig:"BEBOP_STORE_COVENANTSQL_MASTERKEY"`
} `hcl:"covenantsql"`
} `hcl:"store"`
OAuth struct {
Google struct {
ClientID string `hcl:"client_id" envconfig:"BEBOP_OAUTH_GOOGLE_CLIENT_ID"`
Secret string `hcl:"secret" envconfig:"BEBOP_OAUTH_GOOGLE_SECRET"`
} `hcl:"google"`
Facebook struct {
ClientID string `hcl:"client_id" envconfig:"BEBOP_OAUTH_FACEBOOK_CLIENT_ID"`
Secret string `hcl:"secret" envconfig:"BEBOP_OAUTH_FACEBOOK_SECRET"`
} `hcl:"facebook"`
Github struct {
ClientID string `hcl:"client_id" envconfig:"BEBOP_OAUTH_GITHUB_CLIENT_ID"`
Secret string `hcl:"secret" envconfig:"BEBOP_OAUTH_GITHUB_SECRET"`
} `hcl:"github"`
} `hcl:"oauth"`
}
Config is a forum configuration struct.
Click to show internal directories.
Click to hide internal directories.