eq_repo

package
v0.0.0-...-4a875e6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EqCollection = "eq"

Variables

This section is empty.

Functions

This section is empty.

Types

type Eq

type Eq struct {
	ID             string `bson:"_id"`
	Name           string
	Activity       string
	Publish_status bool
	LastUpdated    primitive.DateTime `bson:"last_updated,omitempty"`
}

type IEqRepo

type IEqRepo interface {
	QueryEq(ctx context.Context) ([]*Eq, error)
	UpdateEqPublished(eq *Eq) error
	UpdateEqConsumed(eq *Eq) error
}

type Repo

type Repo struct {
	*mongo.Database
}

func (*Repo) QueryEq

func (r *Repo) QueryEq(ctx context.Context) ([]*Eq, error)

func (*Repo) UpdateEqConsumed

func (r *Repo) UpdateEqConsumed(eq *Eq) error

func (*Repo) UpdateEqPublished

func (r *Repo) UpdateEqPublished(eq *Eq) error

Jump to

Keyboard shortcuts

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