diff --git a/pkg/db/connect.go b/pkg/db/connect.go index 5a72164..a3833d1 100644 --- a/pkg/db/connect.go +++ b/pkg/db/connect.go @@ -11,11 +11,6 @@ import ( "go.mongodb.org/mongo-driver/mongo/options" ) -type Channel struct { - Name string `bson:"name,omitempty"` - Connect bool `bson:"connect,omitempty"` -} - func Connect(cfg *config.Config) *mongo.Client { client, err := mongo.NewClient(options.Client().ApplyURI(cfg.MongoURI)) if err != nil { diff --git a/pkg/db/typings.go b/pkg/db/typings.go new file mode 100644 index 0000000..408eed3 --- /dev/null +++ b/pkg/db/typings.go @@ -0,0 +1,6 @@ +package db + +type Channel struct { + Name string `bson:"name,omitempty"` + Connect bool `bson:"connect,omitempty"` +}