Documentation ¶
Overview ¶
templ: version: v0.2.513
templ: version: v0.2.513
Index ¶
- type Repository
- func (w *Repository) AddMember(ctx context.Context, walletId, userId int) error
- func (w *Repository) Create(ctx context.Context, userId int, name string) (*models.Wallet, error)
- func (w *Repository) Delete(ctx context.Context, walletId int) error
- func (w *Repository) ForId(ctx context.Context, walletId int) (*models.Wallet, error)
- func (w *Repository) ForUser(ctx context.Context, userId int) ([]*models.Wallet, error)
- func (w *Repository) HasPermission(ctx context.Context, walletId, userId int) (bool, error)
- func (w *Repository) Members(ctx context.Context, walletId int) ([]*models.Member, error)
- func (w *Repository) RemoveMember(ctx context.Context, walletId int, userId string) error
- func (w *Repository) SetName(ctx context.Context, walletId int, name string) error
- type RepositoryInterface
- type UserRepository
- type Wallets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
func (*Repository) AddMember ¶
func (w *Repository) AddMember(ctx context.Context, walletId, userId int) error
func (*Repository) HasPermission ¶
func (*Repository) RemoveMember ¶
type RepositoryInterface ¶
type RepositoryInterface interface { ForUser(ctx context.Context, userId int) ([]*models.Wallet, error) Create(ctx context.Context, userId int, name string) (*models.Wallet, error) HasPermission(ctx context.Context, walletId, userId int) (bool, error) ForId(ctx context.Context, walletId int) (*models.Wallet, error) Members(ctx context.Context, walletId int) ([]*models.Member, error) SetName(ctx context.Context, walletId int, name string) error AddMember(ctx context.Context, walletId, userId int) error RemoveMember(ctx context.Context, walletId int, userId string) error Delete(ctx context.Context, walletId int) error }
type UserRepository ¶
Click to show internal directories.
Click to hide internal directories.