model

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migration

func Migration(ctx context.Context, db *gorm.DB) error

Types

type ApodData

type ApodData struct {
	gorm.Model
	Date           string `gorm:"unique"`
	Copyright      string
	Explanation    string
	HdUrl          string
	MediaType      string
	ServiceVersion string
	Title          string
	Url            string
	ThumbnailUrl   string
}

type Webpage

type Webpage struct {
	gorm.Model
	URL         string `gorm:"unique"`
	Canonical   string
	Title       string
	Description string
	ImageURL    string
	Published   sql.NullTime
}

func (Webpage) GetPublished

func (wp Webpage) GetPublished() *time.Time

GetPublished returns pointer of time.Time for Webpage.Published.

func (*Webpage) SetPublished

func (wp *Webpage) SetPublished(tm *time.Time)

Jump to

Keyboard shortcuts

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