tags

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

templ: version: v0.2.513

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	List(ctx context.Context, walletId int) ([]*models.Tag, error)
	Create(ctx context.Context, walletId int, name string) (*models.Tag, error)
	Get(ctx context.Context, tagId int) (*models.Tag, error)
	Update(ctx context.Context, tagId int, name string) (*models.Tag, error)
	Delete(ctx context.Context, tagId int) error
}

type RepositoryImpl

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

func NewRepository

func NewRepository(db *sqlx.DB) *RepositoryImpl

func (*RepositoryImpl) Create

func (t *RepositoryImpl) Create(ctx context.Context, walletId int, name string) (*models.Tag, error)

func (*RepositoryImpl) Delete

func (t *RepositoryImpl) Delete(ctx context.Context, tagId int) error

func (*RepositoryImpl) Get

func (t *RepositoryImpl) Get(ctx context.Context, tagId int) (*models.Tag, error)

func (*RepositoryImpl) GetIds

func (t *RepositoryImpl) GetIds(ctx context.Context, ids []int) ([]*models.Tag, error)

func (*RepositoryImpl) List

func (t *RepositoryImpl) List(ctx context.Context, walletId int) ([]*models.Tag, error)

func (*RepositoryImpl) Update

func (t *RepositoryImpl) Update(ctx context.Context, tagId int, name string) (*models.Tag, error)

type Tags

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

func New

func New(
	walletRepository WalletRepository,
	repository Repository,
	log *slog.Logger,
) *Tags

func (*Tags) Mount

func (t *Tags) Mount(router chi.Router)

type WalletRepository

type WalletRepository interface {
	ForUser(ctx context.Context, userId int) ([]*models.Wallet, error)
	HasPermission(ctx context.Context, walletId, userId int) (bool, error)
}

Jump to

Keyboard shortcuts

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