package
Version:
v0.0.0-...-c46e59b
Opens a new window with list of versions in this module.
Published: Mar 19, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Auth struct {
Disabled bool `mapstructure:"disabled"`
SigningSecret string `mapstructure:"signing_secret"`
TokenTTL time.Duration `mapstructure:"token_ttl"`
Users []User `mapstructure:"users"`
}
type Config struct {
Server *Server `mapstructure:"server"`
Auth *Auth `mapstructure:"auth"`
Features *Features `mapstructure:"features"`
Database *Database `mapstructure:"database"`
}
type Database struct {
StoragePath string `mapstructure:"storage_path"`
}
type Features struct {
GraphqlConsole string `mapstructure:"graphqlConsole"`
LogQueries bool `mapstructure:"log_queries"`
ApolloTracing bool `mapstructure:"apollo_tracing"`
Introspection bool `mapstructure:"introspection"`
Playground bool `mapstructure:"playground"`
}
const (
READER Role = "reader"
WRITER Role = "writer"
ADMIN Role = "admin"
)
type Server struct {
Port int `mapstructure:"port"`
RaftCluster string `mapstructure:"raft_cluster"`
RaftSecret string `mapstructure:"raft_secret"`
RaftBroadcast string `mapstructure:"raft_broadcast"`
TLSKey string `mapstructure:"tls_key"`
TLSCert string `mapstructure:"tls_cert"`
}
type User struct {
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Roles []Role `mapstructure:"roles"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.