Documentation ¶
Index ¶
- func ParseInsertErr(err error) error
- func ParseReadErr(err error) error
- type Queries
- func (qry *Queries) Account(ctx context.Context, id string) (*models.AccountInfo, error)
- func (qry *Queries) Auth(ctx context.Context, username string) (*models.Auth, error)
- func (qry *Queries) BeginTX(ctx context.Context) (repository.IRepository, zosql.ISQLTX, error)
- func (qry *Queries) Contacts(ctx context.Context, authID string, types ...string) ([]*models.Contact, error)
- func (qry *Queries) CreateAccountInfo(ctx context.Context, id, name string) (*models.AccountInfo, error)
- func (qry *Queries) CreateAuth(ctx context.Context, username, passphrase string) (*models.Auth, error)
- func (qry *Queries) CreateContact(ctx context.Context, contact *models.Contact) error
- func (qry *Queries) DeleteContact(ctx context.Context, authID, contact string) error
- func (qry *Queries) OpenConn() (*sql.DB, error)
- func (qry *Queries) SetPrimaryContact(ctx context.Context, authID, contact string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseInsertErr ¶
ParseInsertErr is a function to decide common sql error bassed on posible error when sql perform insert query
func ParseReadErr ¶
ParseReadErr is a function to decide common sql error bassed on posible error when sql perform select query
Types ¶
type Queries ¶
Queries is extended type of database/Queries
func (*Queries) BeginTX ¶
func (qry *Queries) BeginTX(ctx context.Context) (repository.IRepository, zosql.ISQLTX, error)
BeginTX is a function to start transaction
func (*Queries) Contacts ¶
func (qry *Queries) Contacts(ctx context.Context, authID string, types ...string) ([]*models.Contact, error)
Contacts is a repo to get user contacts
func (*Queries) CreateAccountInfo ¶
func (qry *Queries) CreateAccountInfo(ctx context.Context, id, name string) (*models.AccountInfo, error)
CreateAccountInfo is a function to insert data into table account_nfo
func (*Queries) CreateAuth ¶
func (qry *Queries) CreateAuth(ctx context.Context, username, passphrase string) (*models.Auth, error)
CreateAuth is a function to insert data into table auth
func (*Queries) CreateContact ¶
CreateContact is a repo to insert contact data
func (*Queries) DeleteContact ¶
DeleteContact is repo to delete user contact
Click to show internal directories.
Click to hide internal directories.