mongo

package
v0.0.0-...-5c9d423 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrite = fmt.Errorf("error write to MongoDB")

Functions

This section is empty.

Types

type Config

type Config struct {
	URI string
	// contains filtered or unexported fields
}

Config - config

type Store

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

Store implementation of db interface

func New

func New(ctx context.Context, store db.DB) (*Store, error)

New store

func (*Store) Add

func (s *Store) Add(ctx context.Context, source *v1.Link) (*v1.Link, error)

Add - add

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

Delete - delete

func (*Store) Get

func (s *Store) Get(ctx context.Context, id string) (*v1.Link, error)

Get - get

func (*Store) List

func (s *Store) List(ctx context.Context, params *types.FilterLink) (*v1.Links, error)

List - list

func (*Store) Update

func (s *Store) Update(_ context.Context, _ *v1.Link) (*v1.Link, error)

Update - update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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