category

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreationErrKey             = "err.category.creation"
	ErrCategoryIDCantBeEmpty   = errors.NewIllegalInputError("err.category.id.shouldNotEmpty", "category id should not empty")
	ErrCategoryNameCantBeEmpty = errors.NewIllegalInputError("err.category.name.shouldNotEmpty", "category name should not empty")
)

Functions

func IllegalCreationInputError added in v1.4.3

func IllegalCreationInputError(err error) error

Types

type Category

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

func NewCategory

func NewCategory(id string, name string) (category *Category, err error)

func (Category) ID

func (c Category) ID() string

func (Category) Name

func (c Category) Name() string

type Repository

type Repository interface {
	Create(ctx context.Context, entity *Category) error
	Update(ctx context.Context, id string, entity *Category) error
	Load(ctx context.Context, id string) (entity *Category, err error)
}

Jump to

Keyboard shortcuts

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