redirections

package
v0.0.0-...-8a3df02 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadRoutes

func LoadRoutes(r chi.Router, config config.Config, store *store.PostgresStore)

Types

type PostgresRepository

type PostgresRepository struct {
	// contains filtered or unexported fields
}

func GetNewRlinkRepository

func GetNewRlinkRepository(store *store.PostgresStore) *PostgresRepository

func (*PostgresRepository) GetLinkByCode

func (repo *PostgresRepository) GetLinkByCode(ctx context.Context, code string) (*Rlink, error)

type RedirectionsHandler

type RedirectionsHandler struct {
	// contains filtered or unexported fields
}

func (RedirectionsHandler) GetLinkByCode

func (l RedirectionsHandler) GetLinkByCode(w http.ResponseWriter, r *http.Request)

type RedirectionsService

type RedirectionsService struct {
	Repository redirectionsRepository
}

func (*RedirectionsService) GetLinkByCode

func (l *RedirectionsService) GetLinkByCode(ctx context.Context, code string) (*Rlink, error)
type Rlink struct {
	Url string `db:"url" validate:"http_url" json:"url"`
}

Jump to

Keyboard shortcuts

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