Documentation
¶
Index ¶
- Variables
- type Alias
- type Repository
- type Service
- func (s *Service) Create(ctx context.Context, contentID int, aliasStr string) error
- func (s *Service) DeleteByContentID(ctx context.Context, contentID int) error
- func (s *Service) FindAll(ctx context.Context) ([]*Alias, error)
- func (s *Service) FindByAlias(ctx context.Context, aliasStr string) (*Alias, error)
- func (s *Service) FindByContentID(ctx context.Context, contentID int) ([]*Alias, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAliasAlreadyExists = errors.New("alias already exists")
View Source
var ErrAliasNotFound = errors.New("alias not found")
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface {
Create(ctx context.Context, a *Alias) error
DeleteByContentID(ctx context.Context, contentID int) error
FindByAlias(ctx context.Context, alias string) (*Alias, error)
FindByContentID(ctx context.Context, contentID int) ([]*Alias, error)
FindAll(ctx context.Context) ([]*Alias, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo Repository) *Service
func (*Service) DeleteByContentID ¶
func (*Service) FindByAlias ¶
Click to show internal directories.
Click to hide internal directories.