From 37d8296e40abbb7a5e9d705dfd392b3b519faaf3 Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 28 Oct 2021 18:04:05 +0200 Subject: [PATCH] move channel type to own typings file --- pkg/db/connect.go | 5 ----- pkg/db/typings.go | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 pkg/db/typings.go 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"` +}