-
Notifications
You must be signed in to change notification settings - Fork 0
/
querier.go
24 lines (21 loc) · 1.18 KB
/
querier.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package db
import (
"context"
models "github.com/android-project-46group/api-server/db/my_models"
"github.com/android-project-46group/api-server/util"
)
type Querier interface {
InsertApiKey(ctx context.Context, key string) error
FindApiKeyByName(ctx context.Context, key string) (*models.APIKey, error)
GetAllGroups(ctx context.Context) ([]*models.Group, error)
GetAllBlogs(ctx context.Context, groupName string) ([]MemberBlogBind, error)
GetAllFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)
GetFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)
FindGroupByName(ctx context.Context, groupName string) (*models.Group, error)
FindLocaleByName(ctx context.Context, name string) (*models.Locale, error)
GetAllMemberInfos(ctx context.Context, groupName string, localeId int, sortKey util.SortKey, desc bool) ([]MemberInfoBind, error)
GetAllPositions(ctx context.Context, groupName string) ([]MemberInfoBind, error)
GetPositionFromTitle(ctx context.Context, title string) ([]PositionMemberBind, error)
GetAllSongs(ctx context.Context, groupName string) (models.SongSlice, error)
GetCenter(ctx context.Context, title string) []string
}