domain

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrChikitoNotFound       = errors.New("no chikito was found")
	ErrPublicIDAlreadyExists = errors.New("public id already exists")
)

Functions

This section is empty.

Types

type Chikito

type Chikito struct {
	CreatedAt   time.Time
	UpdatedAt   time.Time
	PublicID    string
	URL         string
	Description string
	ID          int32
}

func (Chikito) Compare

func (c Chikito) Compare(c2 Chikito) bool

type ChikitoCreate

type ChikitoCreate struct {
	PublicID    string
	URL         string
	Description string
}

type ChikitoRepository

type ChikitoRepository interface {
	CreateChikito(ctx context.Context, chikito *ChikitoCreate) (*Chikito, error)
	GetChikito(ctx context.Context, id string) (*Chikito, error)
}

type ChikitoUsecase

type ChikitoUsecase interface {
	Create(ctx context.Context, url, description string) (*Chikito, error)
	Get(ctx context.Context, id string) (*Chikito, error)
}

Jump to

Keyboard shortcuts

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