models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInvalidURL = errors.New("invalid URL") // Error message for invalid URL
)

ErrorInvalidURL is a global variable that holds an error. This error is returned when an invalid URL is encountered in the application.

Functions

This section is empty.

Types

type URL

type URL struct {
	Original  string     // The original URL
	Hash      string     // The hashed version of the original URL
	AddedAt   time.Time  // The time when the URL was added
	UpdatedAt *time.Time // The time when the URL was last updated, nil if not updated
}

URL is a struct that represents a URL in the application. It has four fields: Original, Hash, AddedAt, and UpdatedAt. Original is a string that holds the original URL. Hash is a string that holds the hashed version of the original URL. AddedAt is a time.Time value that holds the time when the URL was added to the application. UpdatedAt is a pointer to a time.Time value that holds the time when the URL was last updated in the application. If the URL has not been updated, UpdatedAt is nil.

Jump to

Keyboard shortcuts

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