tab

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDTO

type CreateDTO struct {
	Href     string `validate:"required"`
	UserID   uint
	Position uint
}

func (*CreateDTO) Ok

func (d *CreateDTO) Ok(l ut.Translator) (map[string]string, bool)

func (*CreateDTO) ToEntity

func (d *CreateDTO) ToEntity() (*Tab, error)

type FindParams

type FindParams struct {
	SortBy []string
}

type Repository

type Repository interface {
	Count(ctx context.Context) (int64, error)
	GetAll(ctx context.Context, params *FindParams) ([]*Tab, error)
	GetUserTabs(ctx context.Context, userID uint) ([]*Tab, error)
	GetByID(ctx context.Context, id uint) (*Tab, error)
	Create(ctx context.Context, data *Tab) error
	Update(ctx context.Context, data *Tab) error
	Delete(ctx context.Context, id uint) error
	DeleteUserTabs(ctx context.Context, userID uint) error
}

type Tab

type Tab struct {
	ID       uint
	Href     string
	UserID   uint
	Position uint
}

type UpdateDTO

type UpdateDTO struct {
	Href     string `validate:"required"`
	Position uint
}

func (*UpdateDTO) Ok

func (d *UpdateDTO) Ok(l ut.Translator) (map[string]string, bool)

func (*UpdateDTO) ToEntity

func (d *UpdateDTO) ToEntity(id uint) (*Tab, error)

Jump to

Keyboard shortcuts

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