LinkerMongo

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLinkerMongoRepo

func NewLinkerMongoRepo(coll *mongo.Collection) (domain.LinkerRepo, error)

Types

type LinkInfo

type LinkInfo struct {
	Url     string
	Hash    string
	Counter int64
}

type LinkerRepo

type LinkerRepo struct {
	Coll *mongo.Collection
}

func (LinkerRepo) Count

func (collection LinkerRepo) Count(hash string) (int64, error)

func (LinkerRepo) Create

func (collection LinkerRepo) Create(url string) (string, error)

func (LinkerRepo) Get

func (collection LinkerRepo) Get(hash string) (string, error)

func (LinkerRepo) GetByField

func (collection LinkerRepo) GetByField(field string, value string) (*LinkInfo, error)

func (LinkerRepo) GetByHash

func (collection LinkerRepo) GetByHash(hash string) (*LinkInfo, error)

func (LinkerRepo) GetByUrl

func (collection LinkerRepo) GetByUrl(url string) (*LinkInfo, error)

Jump to

Keyboard shortcuts

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