Documentation ¶
Index ¶
- Constants
- Variables
- func NewServer(logger *zap.Logger, db *sql.DB, opts ...Option) *common.Server
- type Option
- func WithAuditMiddleware(auditMiddleware *ginaudit.Middleware) Option
- func WithAuthConfig(config *ginjwt.AuthConfig) Option
- func WithDebug(debug bool) Option
- func WithListen(listen string) Option
- func WithNotifier(n notifier.Notifier) Option
- func WithShutdownTimeout(t time.Duration) Option
- func WithStorageDriver(d storage.DirectoryAdmin) Option
- func WithUnix(unix string) Option
Constants ¶
View Source
const ( // DefaultTreeManagerListen is the default listen address for the TreeManager. DefaultTreeManagerListen = ":8080" // DefaultTreeManagerUnix is the default unix socket for the TreeManager. DefaultTreeManagerUnix = "" // DefaultTreeManagerDebug is the default debug flag for the TreeManager. DefaultTreeManagerDebug = false // DefaultTreeManagerShutdownTimeout is the default shutdown timeout for the TreeManager. DefaultTreeManagerShutdownTimeout = 5 * time.Second )
Variables ¶
View Source
var DefaultTreeManagerNotifier = noop.NewNotifier()
DefaultTreeManagerNotifier is the default notifier for the TreeManager.
Functions ¶
Types ¶
type Option ¶ added in v0.0.6
type Option func(*treeManagerConfig)
func WithAuditMiddleware ¶ added in v0.0.10
func WithAuditMiddleware(auditMiddleware *ginaudit.Middleware) Option
func WithAuthConfig ¶ added in v0.0.10
func WithAuthConfig(config *ginjwt.AuthConfig) Option
WithAuthConfig sets the jwt auth config.
func WithListen ¶ added in v0.0.6
WithListen sets the listen address for the server.
func WithNotifier ¶ added in v0.0.6
WithNotifier sets the notifier for the server.
func WithShutdownTimeout ¶ added in v0.0.6
WithShutdownTimeout sets the shutdown timeout for the server.
func WithStorageDriver ¶ added in v0.0.6
func WithStorageDriver(d storage.DirectoryAdmin) Option
WithStorageDriver sets the storage driver for the server.
Click to show internal directories.
Click to hide internal directories.