You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
948 B
20 lines
948 B
package repositories
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.aiterp.net/rpdata/api/models"
|
|
)
|
|
|
|
// CharacterRepository is an interface for a database using characters.
|
|
type CharacterRepository interface {
|
|
Find(ctx context.Context, id string) (*models.Character, error)
|
|
FindNick(ctx context.Context, nick string) (*models.Character, error)
|
|
FindName(ctx context.Context, name string) (*models.Character, error)
|
|
List(ctx context.Context, filter models.CharacterFilter) ([]*models.Character, error)
|
|
Insert(ctx context.Context, character models.Character) (*models.Character, error)
|
|
Update(ctx context.Context, character models.Character, update models.CharacterUpdate) (*models.Character, error)
|
|
AddNick(ctx context.Context, character models.Character, nick string) (*models.Character, error)
|
|
RemoveNick(ctx context.Context, character models.Character, nick string) (*models.Character, error)
|
|
Delete(ctx context.Context, character models.Character) error
|
|
}
|