model

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clip

type Clip struct {
	ID        string    `json:"id"`
	Type      ClipType  `json:"type"`
	Hash      string    `json:"hash"`
	Content   string    `json:"content,omitempty"`  // text only
	FileName  string    `json:"fileName,omitempty"` // original filename for download, image only
	DiskName  string    `json:"diskName,omitempty"` // on-disk filename ({id}.ext), image only
	FileSize  int64     `json:"fileSize,omitempty"` // image only
	MimeType  string    `json:"mimeType,omitempty"` // image only
	ExpiresAt time.Time `json:"expiresAt"`
	CreatedAt time.Time `json:"createdAt"`
}

Clip is persisted as a JSON file: {storePath}/{id}.json

type ClipType

type ClipType string
const (
	ClipTypeText  ClipType = "text"
	ClipTypeImage ClipType = "image"
)

Jump to

Keyboard shortcuts

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