url

package
v0.0.0-...-52ea9fc Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HASH_KEY = "Hash:%s"

Variables

This section is empty.

Functions

func NewUrlRepo

func NewUrlRepo(etcd etcd.Etcd) urlRepo

Types

type CreateUrlService

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

func NewCreateUrlService

func NewCreateUrlService(repo SaveUrlRepo) CreateUrlService

func (CreateUrlService) GetKind

func (s CreateUrlService) GetKind() string

func (CreateUrlService) Save

func (s CreateUrlService) Save(ctx context.Context, record *memo.Memo) (*memo.Memo, error)

type GetUrlRepo

type GetUrlRepo interface {
	FetchByID(context.Context, string) (*memo.Memo, error)
}

type GetUrlService

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

func NewGetUrlService

func NewGetUrlService(repo GetUrlRepo) GetUrlService

func (GetUrlService) FetchByID

func (s GetUrlService) FetchByID(ctx context.Context, id string) (*memo.Memo, error)

func (GetUrlService) GetKind

func (s GetUrlService) GetKind() string

type SaveUrlRepo

type SaveUrlRepo interface {
	FetchByHash(context.Context, *memo.Memo) (*memo.Memo, error)
	Save(context.Context, *memo.Memo) (*memo.Memo, error)
}

Jump to

Keyboard shortcuts

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