repository

package
v0.0.0-...-f3969ab Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecordRepository

type RecordRepository interface {
	IsIdUsed(id uint64) bool
	SaveRecord(record *schema.Record) error
	LoadRecord(id uint64) (*schema.Record, error)
}

func CreateNewRecordRepositoryWith

func CreateNewRecordRepositoryWith(
	db *gorm.DB,
	logger *logrus.Logger,
) RecordRepository

type UrlRepository

type UrlRepository interface {
	GetOriginUrlWith(ctx context.Context, shortenedId string) (*pb.GetOriginUrlResponse, error)
	CreateRecordWith(ctx context.Context, originUrl string, expireAt time.Time) (*pb.CreateRecordResponse, error)
}

func CreateUrlRepositoryWith

func CreateUrlRepositoryWith(
	recordServiceClient pb.RecordServiceClient,
	logger *logrus.Logger,
) UrlRepository

Jump to

Keyboard shortcuts

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