domain

package
v0.0.0-...-b5678d6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDomainService

type AuthDomainService interface {
	GetUserIDByToken(ctx context.Context, token string) (uuid.UUID, error)
}

type Category

type Category struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	Title     string    `json:"title"`
	Pinned    bool      `json:"pinned"`
	Priority  int32     `json:"priority"`
	UpdatedAt time.Time `json:"updated_at"`
	CreatedAt time.Time `json:"created_at"`
}

type CategoryRepository

type CategoryRepository interface {
	ListCategories(ctx context.Context, arg *ListCategoriesParams) ([]*Category, error)
	GetCategory(ctx context.Context, userID uuid.UUID, id uuid.UUID) (*Category, error)
	CreateCategory(ctx context.Context, arg *CreateCategoryParams) (*Category, error)
	UpdateCategory(ctx context.Context, arg *UpdateCategoryParams) (*Category, error)
	DeleteCategory(ctx context.Context, userID uuid.UUID, id uuid.UUID) error
}

type CategoryUseCase

type CategoryUseCase interface {
	ListCategories(ctx context.Context, arg *ListCategoriesParams) ([]*Category, error)
	GetCategory(ctx context.Context, userID uuid.UUID, id uuid.UUID) (*Category, error)
	CreateCategory(ctx context.Context, arg *CreateCategoryParams) (*Category, error)
	UpdateCategory(ctx context.Context, arg *UpdateCategoryParams) (*Category, error)
	DeleteCategory(ctx context.Context, userID uuid.UUID, id uuid.UUID) error
}

type CreateCategoryParams

type CreateCategoryParams struct {
	UserID   uuid.UUID
	Title    string
	Pinned   bool
	Priority int32
}

type ListCategoriesParams

type ListCategoriesParams struct {
	UserID uuid.UUID
	Limit  *int32
	Offset *int32
}

type UpdateCategoryParams

type UpdateCategoryParams struct {
	ID       uuid.UUID
	UserID   uuid.UUID
	Title    string
	Pinned   bool
	Priority int32
}

Jump to

Keyboard shortcuts

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