Documentation ¶
Index ¶
- Variables
- func NewAuthUserPostgresStorage(conf PostgresConf) *authUserPostgresStorage
- func NewAuthenticator() *authenticator
- func NewEndpoint(path string, handler func(http.ResponseWriter, *http.Request), ...) *endpoint
- func NewHttpRouter() *httpRouter
- func NewRedisStringStorage(conf RedisConf) *redisStringStorage
- func NewRegisterUserApp(registerUserUC usecases.RegisterUserUC) *registerUserApp
- type AuthData
- type EnvOrDefaultConf
- func (c *EnvOrDefaultConf) GetConnStr() string
- func (c *EnvOrDefaultConf) GetHost() string
- func (c *EnvOrDefaultConf) GetPort() int
- func (c *EnvOrDefaultConf) GetRedisAddr() string
- func (c *EnvOrDefaultConf) GetRedisDB() int
- func (c *EnvOrDefaultConf) GetRedisPassword() string
- func (c *EnvOrDefaultConf) GetSigningKey() string
- type HttpApp
- type HttpServer
- type JWTConfiguration
- type JWTGenerator
- type LoginApp
- type PostgresConf
- type RedisConf
- type RequestData
- type ServerConf
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT = map[string]interface{}{
"REDIS_ADDR": "localhost:6379",
"REDIS_PASSWORD": "",
"REDIS_DB": 0,
"SERVICE_HOST": "localhost",
"SERVICE_PORT": 1234,
"JWT_SIGNING_KEY": "HolaEnfermera",
"POSTGRES_CONNSTR": "postgres://postgres:123123@192.168.0.19/postgres?sslmode=disable",
}
Functions ¶
func NewAuthUserPostgresStorage ¶
func NewAuthUserPostgresStorage(conf PostgresConf) *authUserPostgresStorage
func NewAuthenticator ¶
func NewAuthenticator() *authenticator
func NewEndpoint ¶
func NewHttpRouter ¶
func NewHttpRouter() *httpRouter
func NewRedisStringStorage ¶
func NewRedisStringStorage(conf RedisConf) *redisStringStorage
func NewRegisterUserApp ¶
func NewRegisterUserApp(registerUserUC usecases.RegisterUserUC) *registerUserApp
Public constructor
Types ¶
type EnvOrDefaultConf ¶
type EnvOrDefaultConf struct{}
func NewEnvOrDefaultConf ¶
func NewEnvOrDefaultConf() *EnvOrDefaultConf
func (*EnvOrDefaultConf) GetConnStr ¶
func (c *EnvOrDefaultConf) GetConnStr() string
func (*EnvOrDefaultConf) GetHost ¶
func (c *EnvOrDefaultConf) GetHost() string
func (*EnvOrDefaultConf) GetPort ¶
func (c *EnvOrDefaultConf) GetPort() int
func (*EnvOrDefaultConf) GetRedisAddr ¶
func (c *EnvOrDefaultConf) GetRedisAddr() string
func (*EnvOrDefaultConf) GetRedisDB ¶
func (c *EnvOrDefaultConf) GetRedisDB() int
func (*EnvOrDefaultConf) GetRedisPassword ¶
func (c *EnvOrDefaultConf) GetRedisPassword() string
func (*EnvOrDefaultConf) GetSigningKey ¶
func (c *EnvOrDefaultConf) GetSigningKey() string
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func (*HttpServer) Init ¶
func (server *HttpServer) Init(conf ServerConf, router *httpRouter)
func (*HttpServer) Start ¶
func (server *HttpServer) Start()
type JWTConfiguration ¶
type JWTConfiguration interface {
GetSigningKey() string
}
type JWTGenerator ¶
type JWTGenerator struct {
// contains filtered or unexported fields
}
func NewJWTGenerator ¶
func NewJWTGenerator(conf JWTConfiguration) *JWTGenerator
type LoginApp ¶
type LoginApp struct {
// contains filtered or unexported fields
}
func (*LoginApp) GetEndpoints ¶
func (app *LoginApp) GetEndpoints() []*endpoint
type PostgresConf ¶
type PostgresConf interface {
GetConnStr() string
}
type RequestData ¶
type ServerConf ¶
Click to show internal directories.
Click to hide internal directories.