domain

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileHash added in v0.5.0

func CalculateFileHash(r io.Reader) (string, error)

CalculateFileHash generates the SHA-256 fingerprint for the actual NZB bytes. This is used for content-based deduplication and manual upload IDs.

func GenerateCompositeID added in v0.5.0

func GenerateCompositeID(source, guid string) string

GenerateCompositeID creates the SHA-256 PK for Indexer results. This ensure all IDs in the database are a consistent 64-character hex string.

Types

type Release added in v0.5.0

type Release struct {
	ID              string    `json:"id"`
	Title           string    `json:"title"`
	Password        string    `json:"password"`
	GUID            string    `json:"guid"`
	Source          string    `json:"source"`
	DownloadURL     string    `json:"downloadUrl"`
	Size            int64     `json:"size"`
	PublishDate     time.Time `json:"publishDate"`
	Category        string    `json:"category"`
	CachePresent    bool      `json:"cache_present"`
	CacheBlobSize   int64     `json:"cache_blob_size"`
	CacheVerifiedAt time.Time `json:"cache_verified_at"`
	RedirectAllowed bool
	Poster          string
}

Release represents a searchable NZB release.

type Segment added in v0.5.0

type Segment struct {
	Number      int
	Bytes       int64
	MessageID   string
	MissingFrom map[string]bool
}

Segment represents an individual article to be fetched from Usenet

Jump to

Keyboard shortcuts

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