subscriber

package
v0.0.0-...-1649e63 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 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 Repository

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

func NewRepo

func NewRepo(db *mongo.Database) *Repository

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, sub Subscriber) error

func (*Repository) GetAll

func (r *Repository) GetAll(ctx context.Context) ([]Subscriber, error)

func (*Repository) Save

func (r *Repository) Save(ctx context.Context, sub Subscriber) error

type Subscriber

type Subscriber struct {
	ID    primitive.ObjectID `json:"_id,omitempty"`
	Email string             `json:"email"`
}

Jump to

Keyboard shortcuts

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