repositories

package
v0.0.0-...-777d464 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	LinkId    string    `json:"linkId" firestore:"linkId"`
	Url       string    `json:"url" firestore:"url"`
	Clicked   int       `json:"clicked" firestore:"clicked"`
	Type      string    `json:"type" firestore:"type"`
	CreatedAt time.Time `json:"createdAt" firestore:"createdAt"`
}

type LinkRepository

type LinkRepository interface {
	GetAll() ([]Link, error)
	GetById(string) (*Link, error)
	GetByUrl(string) (*Link, error)
	Create(Link) error
	Update(Link) error
}

func NewLinkRepositoryFirestore

func NewLinkRepositoryFirestore(ctx context.Context, client *firestore.Client) LinkRepository

Jump to

Keyboard shortcuts

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