gopay/internal/config/config.go
2024-06-03 12:42:58 +01:00

49 lines
1.2 KiB
Go

// Copyright 2024 perp (supernets)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package config
// Configuration
type Config struct {
Auth *Auth
Server *Server
Database *Database
Log *Log
}
// Auth configuration
type Auth struct {
Disabled bool `toml:"disabled"`
}
// Server configuration
type Server struct {
Address string `toml:"address"`
ReadTimeout int `toml:"read_timeout"`
WriteTimeout int `toml:"write_timeout"`
}
// Database configuration
type Database struct {
Driver string `toml:"driver"`
URL string `toml:"url"`
Max int `toml:"max"`
Idle int `toml:"idle"`
}
// Log configuration
type Log struct {
Level string `toml:"level"`
}