add new dao impl
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package public
|
||||
|
||||
import (
|
||||
pubmodel "dorisbot/database/models/public"
|
||||
)
|
||||
|
||||
// CommandDAO -
|
||||
type CommandDAO interface {
|
||||
Create(c *pubmodel.Command) error
|
||||
Delete(key, platform, binding string) error
|
||||
GetByKey(key string) ([]pubmodel.Command, error)
|
||||
GetByKeyPlatform(key, platform string) ([]pubmodel.Command, error)
|
||||
GetByKeyPlatformBinding(key, platform, binding string) ([]pubmodel.Command, error)
|
||||
GetByPlatformBinding(platform, binding string) ([]pubmodel.Command, error)
|
||||
GetByKeyBinding(key, binding string) ([]pubmodel.Command, error)
|
||||
}
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
type FacebookDAO interface {
|
||||
Create(fb *pubmodel.FacebookPage) error
|
||||
UpdatePost(fb *pubmodel.FacebookPage, postID string) error
|
||||
GetByID(id string) (pubmodel.FacebookPage, error)
|
||||
GetByID(id string) (pubmodel.FacebookPage, bool, error)
|
||||
GetAll() ([]pubmodel.FacebookPage, error)
|
||||
Delete(id string) error
|
||||
GetChannels() ([]dsmodel.Channel, error)
|
||||
GetChannels(id string) ([]dsmodel.Channel, error)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package public
|
||||
|
||||
import (
|
||||
dsmodel "dorisbot/database/models/discord"
|
||||
pubmodel "dorisbot/database/models/public"
|
||||
)
|
||||
|
||||
// InstagramDAO -
|
||||
type InstagramDAO interface {
|
||||
Create(ig *pubmodel.Instagram) error
|
||||
UpdatePost(ig *pubmodel.Instagram, postID string) error
|
||||
GetByID(id string) (pubmodel.Instagram, bool, error)
|
||||
GetAll() ([]pubmodel.Instagram, error)
|
||||
Delete(id string) error
|
||||
GetChannels(id string) ([]dsmodel.Channel, error)
|
||||
}
|
||||
Reference in New Issue
Block a user