repository

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// Postgre
	AddMember(username, group, guildID string) error
	RemoveMember(username, group, guildID string) error
	CheckIsMember(username, group, guildID string) error
	GetRandomMember(group, guildID string) (string, error)
	GetMembers(group, guildID string) ([]string, error)

	// Redis
	SetCache(username []string, group, guildID string) error
	IsMember(username, group, guildID string) (bool, error)
	RandomMember(group, guildID string) (string, error)
}

Repository interfaces

func NewMemberRepository

func NewMemberRepository(db *sql.DB, redis redis.Cmdable) Repository

NewMemberRepository is the method for construct a repository which will be registered in the handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL