Documentation ¶
Index ¶
- type MemUrlEntryRepository
- func (s *MemUrlEntryRepository) GetFromToken(ctx context.Context, token entity.UrlToken) (*entity.UrlEntry, error)
- func (s *MemUrlEntryRepository) GetFromUrl(ctx context.Context, url entity.Url) (*entity.UrlEntry, error)
- func (s *MemUrlEntryRepository) SaveUrl(ctx context.Context, url entity.Url) (*entity.UrlEntry, error)
- func (s *MemUrlEntryRepository) SaveVisit(ctx context.Context, token entity.UrlToken) error
- type PGXUrlEntryRepository
- func (s *PGXUrlEntryRepository) GetFromToken(ctx context.Context, token entity.UrlToken) (*entity.UrlEntry, error)
- func (s *PGXUrlEntryRepository) GetFromUrl(ctx context.Context, url entity.Url) (*entity.UrlEntry, error)
- func (s *PGXUrlEntryRepository) SaveUrl(ctx context.Context, url entity.Url) (*entity.UrlEntry, error)
- func (s *PGXUrlEntryRepository) SaveVisit(ctx context.Context, token entity.UrlToken) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemUrlEntryRepository ¶
type MemUrlEntryRepository struct {
// contains filtered or unexported fields
}
MemUrlEntryRepository is a in memory repository that will repository the url entries
func NewMemUrlEntryRepository ¶
func NewMemUrlEntryRepository() *MemUrlEntryRepository
NewMemUrlEntryRepository will create a new in memory repository
func (*MemUrlEntryRepository) GetFromToken ¶
func (s *MemUrlEntryRepository) GetFromToken(ctx context.Context, token entity.UrlToken) (*entity.UrlEntry, error)
GetFromToken will return the url entry for the given token
func (*MemUrlEntryRepository) GetFromUrl ¶
func (s *MemUrlEntryRepository) GetFromUrl(ctx context.Context, url entity.Url) (*entity.UrlEntry, error)
GetFromUrl will return the url entry for the given url
type PGXUrlEntryRepository ¶
type PGXUrlEntryRepository struct {
// contains filtered or unexported fields
}
func NewPGXUrlEntryRepository ¶
func NewPGXUrlEntryRepository(db *pgxpool.Pool) *PGXUrlEntryRepository
func (*PGXUrlEntryRepository) GetFromToken ¶
func (*PGXUrlEntryRepository) GetFromUrl ¶
Click to show internal directories.
Click to hide internal directories.