mongo_repository

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandRepository

type BrandRepository interface {
	Create(ctx context.Context, input *CreateBrandParams, opts ...*options.InsertOneOptions) (*mongo_document.Brand, error)
	FindOneBy(ctx context.Context, input *FindOneBrandByParams, opts ...*options.FindOneOptions) (*mongo_document.Brand, error)
	Update(ctx context.Context, brandId primitive.ObjectID, input *UpdateBrandParams, opts ...*options.UpdateOptions) (bool, error)
}

func NewBrandRepository

func NewBrandRepository(client mongo_client.MongoClient) BrandRepository

type BrandRepositoryImpl

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

func (*BrandRepositoryImpl) Create

func (*BrandRepositoryImpl) FindOneBy

func (*BrandRepositoryImpl) Update

type CompetitorRepository

type CompetitorRepository interface {
	Create(ctx context.Context, input *CreateCompetitorParams, opts ...*options.InsertOneOptions) (*mongo_document.Competitor, error)
}

func NewCompetitorRepository

func NewCompetitorRepository(client mongo_client.MongoClient) CompetitorRepository

type CompetitorRepositoryImpl

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

func (*CompetitorRepositoryImpl) Create

type CreateBrandParams

type CreateBrandParams struct {
	Email      string
	Status     string
	BrandTerms []string
}

type CreateCompetitorParams

type CreateCompetitorParams struct {
	Term     string
	Device   string
	Domain   string
	FoundAt  primitive.Timestamp
	BrandID  primitive.ObjectID
	Location string
}

type FindOneBrandByParams

type FindOneBrandByParams struct {
	ID     string
	Email  string
	Status string
}

type UpdateBrandParams

type UpdateBrandParams struct {
	Email      string               `bson:"email,omitempty"`
	Status     string               `bson:"status,omitempty"`
	Results    []primitive.ObjectID `bson:"results,omitempty"`
	BrandTerms []string             `bson:"brand_terms,omitempty"`
}

Jump to

Keyboard shortcuts

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