Documentation
¶
Index ¶
Constants ¶
View Source
const ( StorageTypeFile = StorageType("file") StorageTypePostgres = StorageType("postgres") StorageTypeMongoDB = StorageType("mongodb") StorageTypeS3 = StorageType("s3") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Paste ¶
type Paste struct { ID string `json:"id" bson:"_id"` Content string `json:"content" bson:"content"` DeletionToken string `json:"deletionToken,omitempty" bson:"deletionToken"` // Required for legacy paste storage support ModificationToken string `json:"modificationToken,omitempty" bson:"modificationToken"` Created int64 `json:"created" bson:"created"` Metadata map[string]interface{} `json:"metadata" bson:"metadata"` }
Paste represents a saved paste
func (*Paste) CheckModificationToken ¶
CheckModificationToken checks whether or not the given modification token is correct
func (*Paste) HashModificationToken ¶
HashModificationToken hashes the current modification token of a paste
type StorageType ¶
type StorageType string
StorageType represents a type of storage a paste can be stored with
Click to show internal directories.
Click to hide internal directories.