Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration interface { // GetLifeCycle retrieves the configured life cycle. GetLifeCycle() LifeCycle // GetRepoType retrieves the configured repo type. GetRepoType() UserRepositoryType // GetTimeout retrieves the configured request timeout. GetTimeout() time.Duration // GetPort retrieves the configured port. GetPort() int // GetInitDataSet retrieves the path to an initial dataset to load on app launch, mostly for testing and dev use. GetInitDataSet() string // GetPgUrl retrieves the configured url string for connecting to PostgreSQL. GetPgUrl() string // GetTokenSecretKey a shared secret key for signing tokens GetTokenSecretKey() string // GetTokenPrivateKey retrieves the the private key used to sign tokens. GetTokenPrivateKey() *rsa.PrivateKey // GetTokenPublicKey retrieves public key used to validate JWT tokens. GetTokenPublicKey() *rsa.PublicKey }
Configuration provides methods for retrieving aspects of the applications configuration.
func GetConfiguration ¶
func GetConfiguration() (Configuration, error)
GetConfiguration constructs a Configuration based on environment variables.
type UserRepositoryType ¶
type UserRepositoryType int
UserRepositoryType represents a type of UserRepository
const ( // InMemoryRepo represents a UserRepository that is stored entirely in memory. InMemoryRepo UserRepositoryType = 0 // PostgreSqlRepo represents a UserRepository that utilizes a PostgreSQL database. PostgreSqlRepo UserRepositoryType = iota )
func (UserRepositoryType) String ¶
func (prt UserRepositoryType) String() string
Click to show internal directories.
Click to hide internal directories.