refactor: déplacer fichiers go source vers pkg/ et cmd/
Déplacer public/ et templates/ vers ui/ et ui/public/ Bump projet à v3, API toujours v1
This commit is contained in:
parent
e46033d4a9
commit
7d4a747774
107 changed files with 68 additions and 107 deletions
41
pkg/agecemorg/config.go
Normal file
41
pkg/agecemorg/config.go
Normal file
|
@ -0,0 +1,41 @@
|
|||
package agecemorg
|
||||
|
||||
/*
|
||||
Permet de contenir la configuration obtenue par cobra/viper
|
||||
|
||||
Example d'utilisation sans error handling:
|
||||
|
||||
```
|
||||
var cfg Config
|
||||
viper.Unmarshal(&cfg)
|
||||
```
|
||||
|
||||
`cfg` devrait alors contenir la configuration, et les données peuvent être
|
||||
obtenues simplement en utilisant la dot (.) notation
|
||||
*/
|
||||
type Config struct {
|
||||
Server struct {
|
||||
Admin struct {
|
||||
Auth bool `mapstructure:"auth"`
|
||||
Password string `mapstructure:"password"`
|
||||
Username string `mapstructure:"username"`
|
||||
} `mapstructure:"admin"`
|
||||
Api struct {
|
||||
Auth bool `mapstructure:"auth"`
|
||||
Host string `mapstructure:"host"`
|
||||
Key string `mapstructure:"key"`
|
||||
Port int `mapstructure:"port"`
|
||||
Protocol string `mapstructure:"protocol"`
|
||||
} `mapstructure:"api"`
|
||||
Documents struct {
|
||||
AccessKeyId string `mapstructure:"access_key_id"`
|
||||
Buckets map[string]string `mapstructure:"buckets"`
|
||||
Endpoint string `mapstructure:"endpoint"`
|
||||
SecretAccessKey string `mapstructure:"secret_access_key"`
|
||||
UseSSL bool `mapstructure:"use_ssl"`
|
||||
KeyId string `mapstructure:"keyid"`
|
||||
KeyValue string `mapstructure:"keyvalue"`
|
||||
} `mapstructure:"documents"`
|
||||
Port int `mapstructure:"port"`
|
||||
} `mapstructure:"server"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue