urls

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewURLModel

func NewURLModel() func(NewURLModelParam) *URLModel

Types

type NewURLModelParam

type NewURLModelParam struct {
	fx.In

	Logger *lib.Logger
	BBolt  *dao.BBolt
}

type URLModel

type URLModel struct {
	Logger    *lib.Logger
	BBolt     *dao.BBolt
	URLBucket *bbolt.Bucket
}

func (*URLModel) FindOneShortURLByURL

func (m *URLModel) FindOneShortURLByURL(url string) mo.Result[urlsType.ShortURL]

func (*URLModel) FindOneURLByShortURL

func (m *URLModel) FindOneURLByShortURL(shortURL string) mo.Result[urlsType.FullURL]

func (*URLModel) New

func (m *URLModel) New(fullURL string) mo.Result[string]

func (*URLModel) NormalizeURL

func (m *URLModel) NormalizeURL(urlString string) (string, error)

func (*URLModel) RevokeOneShortURL

func (m *URLModel) RevokeOneShortURL(shortURL string) mo.Result[bool]

Jump to

Keyboard shortcuts

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