Documentation ¶
Index ¶
- func HandleHealthCheck(w http.ResponseWriter, r *http.Request)
- func HandleHealthCheckWithCallback(healthCallback func() string) func(w http.ResponseWriter, r *http.Request)
- func HandleRuntimeStats(w http.ResponseWriter, r *http.Request)
- func Hash(password string) (string, error)
- func Match(password, hash string) bool
- func NewGinEngine(conf *Config, logger *zap.Logger, blunder *blunder.Blunder, ...) *gin.Engine
- func NewHTTPServer(lc fx.Lifecycle, conf *Config, log *zap.Logger, app *gin.Engine) *http.Server
- func NewLogger() *zap.Logger
- func NewMongoClient(conf *Config) *mongo.Client
- func NewSentry(conf *Config) *sentry.Client
- func ReusableReader(r io.Reader) io.Reader
- type AppConfiguration
- type Config
- type MailClient
- type MailConfiguration
- type MongoConfiguration
- type MongoRepository
- func (r *MongoRepository) Create(ctx context.Context, v interface{}) (primitive.ObjectID, error)
- func (r *MongoRepository) DeleteById(ctx context.Context, id primitive.ObjectID) (bool, error)
- func (r *MongoRepository) GetById(ctx context.Context, id primitive.ObjectID, v interface{}) (bool, error)
- func (r *MongoRepository) GetStringFieldForId(ctx context.Context, id primitive.ObjectID, field string) (string, error)
- func (r *MongoRepository) SetFieldAndWipeOtherForId(ctx context.Context, id primitive.ObjectID, fieldToSet string, value string, ...) error
- func (r *MongoRepository) UpdateById(ctx context.Context, id primitive.ObjectID, updateBody bson.M) error
- type SentryConfiguration
- type ServerConfiguration
- type SwaggerConfiguration
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHealthCheck ¶
func HandleHealthCheck(w http.ResponseWriter, r *http.Request)
func HandleHealthCheckWithCallback ¶
func HandleHealthCheckWithCallback(healthCallback func() string) func(w http.ResponseWriter, r *http.Request)
healthcheck handler with custom callback for printing service specific additional info
func HandleRuntimeStats ¶
func HandleRuntimeStats(w http.ResponseWriter, r *http.Request)
func NewGinEngine ¶
func NewHTTPServer ¶
func NewMongoClient ¶
Types ¶
type AppConfiguration ¶
type Config ¶
type Config struct { Server ServerConfiguration Mongo MongoConfiguration Sentry SentryConfiguration Mail MailConfiguration App AppConfiguration Swagger SwaggerConfiguration }
type MailClient ¶
type MailClient struct {
// contains filtered or unexported fields
}
func NewMailCleint ¶
func NewMailCleint(conf *Config, log *zap.Logger) *MailClient
type MailConfiguration ¶
type MongoConfiguration ¶
type MongoRepository ¶
type MongoRepository struct { Client *mongo.Client Database *mongo.Database Collection *mongo.Collection }
func NewMongoRepository ¶
func NewMongoRepository(client *mongo.Client, dbname string, collectionName string) *MongoRepository
func (*MongoRepository) DeleteById ¶
func (*MongoRepository) GetStringFieldForId ¶
func (*MongoRepository) SetFieldAndWipeOtherForId ¶
func (*MongoRepository) UpdateById ¶
type SentryConfiguration ¶
type SentryConfiguration struct {
DNS string
}
type ServerConfiguration ¶
type SwaggerConfiguration ¶
type SwaggerConfiguration struct {
Host string
}
type UserClaims ¶
type UserClaims struct { jwt.StandardClaims Role string `json:"role"` RoleId string `json:"roleId"` Rights []string `json:"rights"` IsAdmin bool `json:"isAdmin"` IsVerified bool `json:"isVerified"` }
func (UserClaims) Valid ¶ added in v0.0.11
func (c UserClaims) Valid() error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package docs Code generated by swaggo/swag.
|
Package docs Code generated by swaggo/swag. |
pkg
|
|
Click to show internal directories.
Click to hide internal directories.