pgts3store

package
v0.0.0-...-d203c01 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements ts3.Store interface backed by postgresql and sqlx.

func New

func New(db *sqlx.DB) *Store

New creates a new Store.

func (*Store) ActiveUsersCharIDs

func (s *Store) ActiveUsersCharIDs() []int32

ActiveUsersCharIDs returns EveCharIDs of users with `Active` set to true.

func (*Store) CreateUser

func (s *Store) CreateUser(u *ts3.User)

CreateUser stores a ts3.User record.

func (*Store) Drop

func (s *Store) Drop()

Drop placeholder.

func (*Store) Init

func (s *Store) Init()

Init prepares db for usage.

func (*Store) SetUserInactiveByUID

func (s *Store) SetUserInactiveByUID(uid string)

SetUserInactiveByUID sets `active` to false for provided uid.

func (*Store) TS3UIDExists

func (s *Store) TS3UIDExists(uid string) bool

TS3UIDExists checks if record with provided uid exists.

func (*Store) UpdateUser

func (s *Store) UpdateUser(u *ts3.User)

UpdateUser updates a ts3.User record.

func (*Store) UpdateUserByUID

func (s *Store) UpdateUserByUID(u *ts3.User)

UpdateUserByUID updates a ts3.User record.

func (*Store) Users

func (s *Store) Users() []*ts3.User

Users returns all ts3.User records.

Jump to

Keyboard shortcuts

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