Documentation
¶
Index ¶
- Constants
- func NewManager(repo accesslogs.Repository, store store.Store, ...) accesslogs.Manager
- func NewRepository(conn *db.Conn) accesslogs.Repository
- func OpenConn(ctx context.Context, dataDir string, mainEngine db.Engine) (*db.Conn, error)
- func RegisterEndpoints(router *mux.Router, manager accesslogs.Manager)
Constants ¶
View Source
const ( // StoreEngineEnv selects the access log store engine. Unset follows the main store engine. StoreEngineEnv = "NB_ACCESS_LOG_STORE_ENGINE" // PostgresDSNEnv is the access log Postgres DSN. Unset reuses the main store DSN. PostgresDSNEnv = "NB_ACCESS_LOG_POSTGRES_DSN" // SqliteFileEnv is the access log SQLite file, resolved against the data directory when relative. SqliteFileEnv = "NB_ACCESS_LOG_SQLITE_FILE" // MaxOpenConnsEnv sizes the access log connection pool. Unset applies NB_SQL_MAX_OPEN_CONNS. MaxOpenConnsEnv = "NB_ACCESS_LOG_SQL_MAX_OPEN_CONNS" )
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
func NewManager(repo accesslogs.Repository, store store.Store, permissionsManager permissions.Manager, geo geolocation.Geolocation) accesslogs.Manager
func NewRepository ¶ added in v0.81.0
func NewRepository(conn *db.Conn) accesslogs.Repository
NewRepository returns the access log repository backed by conn.
func OpenConn ¶ added in v0.82.0
OpenConn opens and migrates the access log database. Unless configured otherwise, it follows mainEngine: SQLite uses its own file in dataDir and Postgres reuses the main DSN.
func RegisterEndpoints ¶
func RegisterEndpoints(router *mux.Router, manager accesslogs.Manager)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.