Files
Gokapi/internal/models/AwsConfig.go
Marc Ole Bulling 3595a18dbd Replace CLI/env based setup with web UI setup, add OAuth2 (#33)
* Initial commit websetup

* Added writing cloudstorage credentials

* Clean up old configuration generation

* Added Oauth2 OpenID Connect support

* Bugfixes and fixed tests

* Refactoring

* Refactoring, added first tests

* Added documentation

* Refactoring, updated docs

* Added tests

* Added option to reshow setup for reconfiguring Gokapi instance

* Added docs and tests
2021-12-31 01:40:10 +01:00

19 lines
529 B
Go

package models
// AwsConfig contains all configuration values / credentials for AWS cloud storage
type AwsConfig struct {
Bucket string `yaml:"Bucket"`
Region string `yaml:"Region"`
KeyId string `yaml:"KeyId"`
KeySecret string `yaml:"KeySecret"`
Endpoint string `yaml:"Endpoint"`
}
// IsAllProvided returns true if all required variables have been set for using AWS S3 / Backblaze
func (c *AwsConfig) IsAllProvided() bool {
return c.Bucket != "" &&
c.Region != "" &&
c.KeyId != "" &&
c.KeySecret != ""
}