Documentation ¶
Index ¶
- Constants
- type DiscordChannel
- type DiscordServer
- type Notification
- type PGXStore
- func (db *PGXStore) GetDiscordChannel(ctx context.Context, channelID int) (*DiscordChannel, error)
- func (db *PGXStore) GetDiscordChannelByExternalID(ctx context.Context, channelID string) (*DiscordChannel, error)
- func (db *PGXStore) GetDiscordServerByExternalID(ctx context.Context, serverID string) (*DiscordServer, error)
- func (db *PGXStore) GetNotification(ctx context.Context, postID, channelID, ruleID int) (*Notification, error)
- func (db *PGXStore) GetNotificationCount(ctx context.Context, postID, channelID, ruleID int) (int, error)
- func (db *PGXStore) GetPostByExternalID(ctx context.Context, postID string) (*Post, error)
- func (db *PGXStore) GetRules(ctx context.Context, subreddit int) ([]*Rule, error)
- func (db *PGXStore) GetSubredditByExternalID(ctx context.Context, subredditID string) (*Subreddit, error)
- func (db *PGXStore) GetSubreddits(ctx context.Context) ([]*Subreddit, error)
- func (db *PGXStore) InsertDiscordChannel(ctx context.Context, channelID string, serverID int) (*DiscordChannel, error)
- func (db *PGXStore) InsertDiscordServer(ctx context.Context, serverID string) (*DiscordServer, error)
- func (db *PGXStore) InsertNotification(ctx context.Context, postID, channelID, ruleID int) (*Notification, error)
- func (db *PGXStore) InsertPost(ctx context.Context, postID string) (*Post, error)
- func (db *PGXStore) InsertRule(ctx context.Context, rule Rule) (*Rule, error)
- func (db *PGXStore) InsertSubreddit(ctx context.Context, subredditID string) (*Subreddit, error)
- type Post
- type Rule
- type Store
- type Subreddit
Constants ¶
View Source
const ( EnvPostgresURI = "postgres.address" EnvPostgresDatabase = "postgres.database" EnvPostgresUser = "postgres.user" EnvPostgresPassword = "postgres.password" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordChannel ¶
type DiscordServer ¶
type PGXStore ¶
func (*PGXStore) GetDiscordChannel ¶
func (*PGXStore) GetDiscordChannelByExternalID ¶
func (*PGXStore) GetDiscordServerByExternalID ¶
func (*PGXStore) GetNotification ¶
func (*PGXStore) GetNotificationCount ¶
func (*PGXStore) GetPostByExternalID ¶
func (*PGXStore) GetSubredditByExternalID ¶
func (*PGXStore) GetSubreddits ¶
func (*PGXStore) InsertDiscordChannel ¶
func (*PGXStore) InsertDiscordServer ¶
func (*PGXStore) InsertNotification ¶
func (*PGXStore) InsertPost ¶
func (*PGXStore) InsertRule ¶
type Store ¶
type Store interface { InsertDiscordServer(ctx context.Context, serverID string) (*DiscordServer, error) InsertDiscordChannel(ctx context.Context, channelID string, serverID int) (*DiscordChannel, error) InsertNotification(ctx context.Context, postID, channelID, ruleID int) (*Notification, error) InsertSubreddit(ctx context.Context, subredditID string) (*Subreddit, error) InsertRule(ctx context.Context, rule Rule) (*Rule, error) InsertPost(ctx context.Context, postID string) (*Post, error) GetDiscordServerByExternalID(ctx context.Context, serverID string) (*DiscordServer, error) GetSubredditByExternalID(ctx context.Context, subreddit string) (*Subreddit, error) GetDiscordChannel(ctx context.Context, channelID int) (*DiscordChannel, error) GetRules(ctx context.Context, subreddit int) ([]*Rule, error) GetSubreddits(ctx context.Context) ([]*Subreddit, error) GetNotificationCount(ctx context.Context, postID, channelID, ruleID int) (int, error) }
Click to show internal directories.
Click to hide internal directories.