bmessage

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadEvent

type DownloadEvent int
const (
	DownloadStart DownloadEvent = iota
	DownloadProgress
	DownloadEnd
	DownloadError
)

func (DownloadEvent) MarshalJSON

func (do DownloadEvent) MarshalJSON() ([]byte, error)

func (DownloadEvent) String

func (do DownloadEvent) String() string

type ImageDownloadMessage

type ImageDownloadMessage struct {
	Event         DownloadEvent     `json:"event"`
	Metadata      ImageMetadata     `json:"metadata"`
	ContentLength units.MetricBytes `json:"content_length"`
	Downloaded    units.MetricBytes `json:"downloaded"`
	Subreddit     string            `json:"subreddit"`
	PostURL       string            `json:"post_url"`
	PostID        string            `json:"post_id"`
	Error         error             `json:"error"`
}

func (ImageDownloadMessage) MarshalJSON

func (im ImageDownloadMessage) MarshalJSON() ([]byte, error)

type ImageKind

type ImageKind int
const (
	KindImage ImageKind = iota
	KindThumbnail
)

func (ImageKind) MarshalJSON

func (im ImageKind) MarshalJSON() ([]byte, error)

func (ImageKind) String

func (im ImageKind) String() string

type ImageMetadata

type ImageMetadata struct {
	Kind   ImageKind
	URL    string
	Height int64
	Width  int64
}

Jump to

Keyboard shortcuts

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