repository

package
v0.0.0-...-00d8e56 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Site

type Site struct {
	ID       uuid.UUID
	Url      string `gorm:"unique;not null"`
	Category string
	Status   string
	ParentID *uuid.UUID
	Parent   *Site `gorm:"foreignkey:ParentID"`
}

type SiteRepository

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

func NewSiteRepository

func NewSiteRepository() *SiteRepository

func (*SiteRepository) GetByUrl

func (r *SiteRepository) GetByUrl(url string) (*Site, error)

func (*SiteRepository) GetWithParentsByUrl

func (r *SiteRepository) GetWithParentsByUrl(url string) *Site

func (*SiteRepository) Save

func (r *SiteRepository) Save(url, category string, parentID *uuid.UUID) (*uuid.UUID, error)

func (*SiteRepository) UpdateStatusByUrl

func (r *SiteRepository) UpdateStatusByUrl(url, status string) error

Jump to

Keyboard shortcuts

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