Documentation
¶
Index ¶
- type Logger
- func (logger *Logger) Debugc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Errorc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Infoc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Warnc(c *gin.Context, msg string, keysAndValues ...interface{})
- type Router
- type Server
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger handles all logging from application
func (*Logger) Debugc ¶ added in v0.2.6
Debugc wraps Debugw provided by zap, adding data from gin request context
func (*Logger) Errorc ¶ added in v0.2.6
Errorc wraps Errorw provided by zap, adding data from gin request context
type Server ¶
type Server struct {
Logger *Logger
Router *Router
RepositoryIndex *repo.Index
StorageBackend storage.Backend
StorageCache []storage.Object
AllowOverwrite bool
TlsCert string
TlsKey string
ChartPostFormFieldName string
ProvPostFormFieldName string
// contains filtered or unexported fields
}
Server contains a Logger, Router, storage backend and object cache
func NewServer ¶
func NewServer(options ServerOptions) (*Server, error)
NewServer creates a new Server instance
type ServerOptions ¶
type ServerOptions struct {
StorageBackend storage.Backend
LogJSON bool
Debug bool
EnableAPI bool
AllowOverwrite bool
EnableMetrics bool
ChartURL string
TlsCert string
TlsKey string
Username string
Password string
ChartPostFormFieldName string
ProvPostFormFieldName string
}
ServerOptions are options for constructing a Server
Click to show internal directories.
Click to hide internal directories.