mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 00:36:14 -06:00
parent
ac9adb172b
commit
6f5c045284
183 changed files with 7391 additions and 5414 deletions
|
|
@ -21,10 +21,9 @@ package gotosocial
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-fed/activity/pub"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cache"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/federation"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/router"
|
||||
)
|
||||
|
||||
|
|
@ -38,23 +37,21 @@ type Gotosocial interface {
|
|||
// New returns a new gotosocial server, initialized with the given configuration.
|
||||
// An error will be returned the caller if something goes wrong during initialization
|
||||
// eg., no db or storage connection, port for router already in use, etc.
|
||||
func New(db db.DB, cache cache.Cache, apiRouter router.Router, federationAPI pub.FederatingActor, config *config.Config) (Gotosocial, error) {
|
||||
func New(db db.DB, apiRouter router.Router, federator federation.Federator, config *config.Config) (Gotosocial, error) {
|
||||
return &gotosocial{
|
||||
db: db,
|
||||
cache: cache,
|
||||
apiRouter: apiRouter,
|
||||
federationAPI: federationAPI,
|
||||
config: config,
|
||||
db: db,
|
||||
apiRouter: apiRouter,
|
||||
federator: federator,
|
||||
config: config,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// gotosocial fulfils the gotosocial interface.
|
||||
type gotosocial struct {
|
||||
db db.DB
|
||||
cache cache.Cache
|
||||
apiRouter router.Router
|
||||
federationAPI pub.FederatingActor
|
||||
config *config.Config
|
||||
db db.DB
|
||||
apiRouter router.Router
|
||||
federator federation.Federator
|
||||
config *config.Config
|
||||
}
|
||||
|
||||
// Start starts up the gotosocial server. If something goes wrong
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue