1234567891011121314151617181920212223242526 |
- package domain
- var shortURLRepository ShortURLRepository
- var targetURLRepository TargetURLRepository
- type ShortURLRepository interface {
- GetTarget(su ShortURL) (TargetURL, error)
- }
- type TargetURLRepository interface {
-
- GetShort(tu TargetURL) (su ShortURL, isNew bool, err error)
- }
- func RegisterRepositories(sur ShortURLRepository, tur TargetURLRepository) {
- shortURLRepository = sur
- targetURLRepository = tur
- }
|