########################
# Server configuration #
########################
[Server]
# Set server log-level
# Must be one of: DEBUG, INFO, WARN, ERROR
# Default: INFO
# ENV: EZSHARE_SERVER_LOGLEVEL
LogLevel = "INFO"

# Server hostname
# Used for generating links
# Required
# ENV: EZSHARE_SERVER_HOSTNAME
Hostname = "localhost"

# Endpoint reachable by clients
# Fetched by clients for automatic setup
# Required
# ENV: EZSHARE_SERVER_GRPCENDPOINT
GRPCEndpoint = "localhost:50051"

# File store configuration
[Server.FileStore]
# How server stores file
# Must be one of: filesystem, memory, bolt
# Required
# ENV: EZSHARE_SERVER_FILESTORE_TYPE
Type = "bolt"

[Server.FileStore.Bolt]
# Where the bolt-db is stored
# Required if store-type is bolt
# ENV: EZSHARE_SERVER_FILESTORE_BOLT_PATH
Path = "/data/files.db"

[Server.FileStore.Filesystem]
# Where files are stored
# Required if store-type is filesystem
# ENV: EZSHARE_SERVER_FILESTORE_FILESYSTEM_DIR
Dir = "/data"

[Server.DataStore]
# What store to use for users, certs and binaries
# Must be one of: memory, bolt
# Required
# ENV: EZSHARE_SERVER_DATASTORE_TYPE
Type = "bolt"

[Server.DataStore.Bolt]
# Path to bolt database-file
# Required if Server.Datastore is bolt
# ENV: EZSHARE_SERVER_DATASTORE_BOLT_PATH
Path = "/data/users.db"

# GRPC Configuration
[Server.GRPC]
# Address to listen to
# Default: :50051
# ENV: EZSHARE_SERVER_GRPC_LISTENADDR
ListenAddr = ":50051"

# GRPC Certificate Configuration
[Server.GRPC.CACerts]
# Path of PEM-encoded certificate file
# ENV: EZSHARE_SERVER_GRPC_CACERTS_CERTIFICATEPATH
CertificatePath = ""
# Path of PEM-encoded private key
# Must be of type ecdsa
CertificateKeyPath = ""
# ENV: EZSHARE_SERVER_GRPC_CACERTS_CERTIFICATEKEYPATH

[Server.GRPC.Certs]
# Path of PEM-encoded certificate file
# ENV: EZSHARE_SERVER_GRPC_CERTS_CERTIFICATEPATH
CertificatePath = ""
# Path of PEM-encoded private key
# Must be of type ecdsa
# ENV: EZSHARE_SERVER_GRPC_CERTS_CERTIFICATEKEYPATH
CertificateKeyPath = ""

[Server.HTTP]
# Address to listen to
# Default: :8089
# ENV: EZSHARE_SERVER_HTTP_LISTENADDR
ListenAddr = ":8089"


########################
# Client configuration #
########################
[Client]
# Server used if not specified using command-line
# ENV: EZSHARE_CLIENT_DEFAULTSERVER
DefaultServer = "localhost:50051"
# Path to PEM-encoder server-certificate
# ENV: EZSHARE_CLIENT_SERVERCERTPATH
ServerCertPath = ""

[Client.Certs]
# Path of PEM-encoded certificate file
# ENV: EZSHARE_CLIENT_CERTS_CERTIFICATEPATH
CertificatePath = ""
# Path of PEM-encoded private key
# Must be of type ecdsa
# ENV: EZSHARE_CLIENT_CERTS_CERTIFICATEKEYPATH
CertificateKeyPath  = ""