dofuspg

package module
v0.0.0-...-fb28cd4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

dofuspg

dofuspg is a PostgreSQL database implementation of the dofus.Storer interface.

Requirements

Installation

go get -u -v https://github.com/kralamoure/dofuspg

Documentation

Overview

Package dofuspg is a PostgreSQL database implementation of the dofus.Storer interface (https://github.com/kralamoure/dofus).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	// contains filtered or unexported fields
}

func NewDb

func NewDb(pool *pgxpool.Pool) (*Db, error)

func (*Db) Account

func (r *Db) Account(ctx context.Context, id string) (account dofus.Account, err error)

func (*Db) AccountByName

func (r *Db) AccountByName(ctx context.Context, name string) (account dofus.Account, err error)

func (*Db) Accounts

func (r *Db) Accounts(ctx context.Context) (accounts map[string]dofus.Account, err error)

func (*Db) AccountsByUserId

func (r *Db) AccountsByUserId(ctx context.Context, userId string) (accounts map[string]dofus.Account, err error)

func (*Db) CreateAccount

func (r *Db) CreateAccount(ctx context.Context, account dofus.Account) (id string, err error)

func (*Db) CreateUser

func (r *Db) CreateUser(ctx context.Context, user dofus.User) (id string, err error)

func (*Db) SetAccountLastAccessAndLastIP

func (r *Db) SetAccountLastAccessAndLastIP(ctx context.Context, id string, lastAccess time.Time, lastIP string) error

func (*Db) User

func (r *Db) User(ctx context.Context, id string) (user dofus.User, err error)

func (*Db) UserAddChatChannels

func (r *Db) UserAddChatChannels(ctx context.Context, id string, chatChannels ...dofustyp.ChatChannel) error

func (*Db) UserByNickname

func (r *Db) UserByNickname(ctx context.Context, nickname string) (user dofus.User, err error)

func (*Db) UserRemoveChatChannels

func (r *Db) UserRemoveChatChannels(ctx context.Context, id string, chatChannels ...dofustyp.ChatChannel) error

func (*Db) Users

func (r *Db) Users(ctx context.Context) (users map[string]dofus.User, err error)

Jump to

Keyboard shortcuts

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