models

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paste

type Paste struct {
	ID            string     `json:"id" bson:"_id"`
	CreatedAt     time.Time  `json:"created_at" bson:"created_at"`
	ExpiresAt     *time.Time `json:"expires_at" bson:"expires_at,omitempty"`
	Size          int64      `json:"size" bson:"size"`
	ContentType   string     `json:"content_type" bson:"content_type"`
	BurnAfterRead bool       `json:"burn_after_read" bson:"burn_after_read"`
	ReadCount     int        `json:"read_count" bson:"read_count"`
	Content       []byte     `json:"-" bson:"content"` // Not exposed in JSON
}

Paste represents a paste/clipboard entry in the system

func (*Paste) IsExpired

func (p *Paste) IsExpired() bool

IsExpired checks if the paste has expired

func (*Paste) ShouldBurn

func (p *Paste) ShouldBurn() bool

ShouldBurn returns true if this paste should be deleted after reading

Jump to

Keyboard shortcuts

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