Documentation ¶
Index ¶
- type DataStore
- type SqliteStore
- func (store *SqliteStore) Close() error
- func (store *SqliteStore) Connect() error
- func (store *SqliteStore) FetchMessages(ctx context.Context, steamID steamid.SID64) (model.UserMessageCollection, error)
- func (store *SqliteStore) FetchNames(ctx context.Context, steamID steamid.SID64) (model.UserNameHistoryCollection, error)
- func (store *SqliteStore) GetPlayer(ctx context.Context, steamID steamid.SID64, player *model.Player) error
- func (store *SqliteStore) Init() error
- func (store *SqliteStore) LoadOrCreatePlayer(ctx context.Context, steamID steamid.SID64, player *model.Player) error
- func (store *SqliteStore) SaveMessage(ctx context.Context, message *model.UserMessage) error
- func (store *SqliteStore) SaveName(ctx context.Context, steamID steamid.SID64, name string) error
- func (store *SqliteStore) SavePlayer(ctx context.Context, state *model.Player) error
- func (store *SqliteStore) SearchPlayers(ctx context.Context, opts model.SearchOpts) (model.PlayerCollection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore interface { Close() error Connect() error Init() error SaveName(ctx context.Context, steamID steamid.SID64, name string) error SaveMessage(ctx context.Context, message *model.UserMessage) error SavePlayer(ctx context.Context, state *model.Player) error SearchPlayers(ctx context.Context, opts model.SearchOpts) (model.PlayerCollection, error) FetchNames(ctx context.Context, sid64 steamid.SID64) (model.UserNameHistoryCollection, error) FetchMessages(ctx context.Context, sid steamid.SID64) (model.UserMessageCollection, error) LoadOrCreatePlayer(ctx context.Context, steamID steamid.SID64, player *model.Player) error GetPlayer(ctx context.Context, steamID steamid.SID64, player *model.Player) error }
type SqliteStore ¶
type SqliteStore struct {
// contains filtered or unexported fields
}
func (*SqliteStore) Close ¶
func (store *SqliteStore) Close() error
func (*SqliteStore) Connect ¶
func (store *SqliteStore) Connect() error
func (*SqliteStore) FetchMessages ¶
func (store *SqliteStore) FetchMessages(ctx context.Context, steamID steamid.SID64) (model.UserMessageCollection, error)
func (*SqliteStore) FetchNames ¶
func (store *SqliteStore) FetchNames(ctx context.Context, steamID steamid.SID64) (model.UserNameHistoryCollection, error)
func (*SqliteStore) Init ¶
func (store *SqliteStore) Init() error
func (*SqliteStore) LoadOrCreatePlayer ¶
func (*SqliteStore) SaveMessage ¶
func (store *SqliteStore) SaveMessage(ctx context.Context, message *model.UserMessage) error
func (*SqliteStore) SavePlayer ¶
func (*SqliteStore) SearchPlayers ¶
func (store *SqliteStore) SearchPlayers(ctx context.Context, opts model.SearchOpts) (model.PlayerCollection, error)
Click to show internal directories.
Click to hide internal directories.