postgres

package
v0.0.0-...-89c1cf6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Users

type Users struct {
	DB *sql.DB
}

func (*Users) AddToken

func (u *Users) AddToken(accountID, userID int64, name string) (*model.AccessToken, error)

func (*Users) Auth

func (u *Users) Auth(accountID int64, token string, pat bool) (*model.Account, *model.User, error)

func (*Users) Cancel

func (u *Users) Cancel(id int64) error

func (*Users) ChangePassword

func (repo *Users) ChangePassword(id, accountID int64, passwd string) error

func (*Users) ChangePlan

func (u *Users) ChangePlan(id int64, plan string, yearly bool) error

func (*Users) ConvertToPaid

func (u *Users) ConvertToPaid(id int64, stripeID, subID, plan string, yearly bool, seats int) error

func (*Users) GetByStripe

func (u *Users) GetByStripe(stripeID string) (*model.Account, error)

func (*Users) GetDetail

func (u *Users) GetDetail(id int64) (*model.Account, error)

func (*Users) GetUserByEmail

func (u *Users) GetUserByEmail(email string) (*model.User, error)

func (*Users) RemoveToken

func (u *Users) RemoveToken(accountID, userID, tokenID int64) error

func (*Users) SetSeats

func (u *Users) SetSeats(id int64, seats int) error

func (*Users) SignUp

func (u *Users) SignUp(email, password string) (*model.Account, error)

type Webhooks

type Webhooks struct {
	DB *sql.DB
}

func (*Webhooks) Add

func (wh *Webhooks) Add(accountID int64, events, url string) error

func (*Webhooks) AllSubscriptions

func (wh *Webhooks) AllSubscriptions(event string) ([]model.Webhook, error)

func (*Webhooks) Delete

func (wh *Webhooks) Delete(accountID int64, event, url string) error

func (*Webhooks) List

func (wh *Webhooks) List(accountID int64) ([]model.Webhook, error)

Jump to

Keyboard shortcuts

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