mongo

package
v0.0.0-...-d94bdb8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

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

func New

func New(ctx context.Context) (*MongoDB, error)

func (*MongoDB) Close

func (db *MongoDB) Close(ctx context.Context) error

func (*MongoDB) Create

func (db *MongoDB) Create(ctx context.Context, link *link.Link) error

func (*MongoDB) DeleteByToken

func (db *MongoDB) DeleteByToken(ctx context.Context, token string) error

func (*MongoDB) GetBySlug

func (db *MongoDB) GetBySlug(ctx context.Context, slug string) (*link.Link, error)

func (*MongoDB) GetByToken

func (db *MongoDB) GetByToken(ctx context.Context, token string) (*link.Link, error)

func (*MongoDB) IncBySlug

func (db *MongoDB) IncBySlug(ctx context.Context, slug string) error

func (*MongoDB) UpdateByToken

func (db *MongoDB) UpdateByToken(ctx context.Context, token string, updated *link.Link) error

Jump to

Keyboard shortcuts

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