Documentation ¶
Index ¶
Constants ¶
View Source
const ( PASTE_KEEP_FOR_MINUTES = 1 PASTE_KEEP_FOR_HOURS = 2 PASTE_KEEP_FOR_DAYS = 3 PASTE_KEEP_FOR_MONTHS = 4 )
Variables ¶
View Source
var ( PASTE_KEEPS_CORELLATION = map[string]int{ "M": PASTE_KEEP_FOR_MINUTES, "h": PASTE_KEEP_FOR_HOURS, "d": PASTE_KEEP_FOR_DAYS, "m": PASTE_KEEP_FOR_MONTHS, } )
Functions ¶
This section is empty.
Types ¶
type Paste ¶
type Paste struct { ID int `db:"id" json:"id"` Title string `db:"title" json:"title"` Data string `db:"data" json:"data"` CreatedAt *time.Time `db:"created_at" json:"created_at"` KeepFor int `db:"keep_for" json:"keep_for"` KeepForUnitType int `db:"keep_for_unit_type" json:"keep_for_unit_type"` Language string `db:"language" json:"language"` Private bool `db:"private" json:"private"` Password string `db:"password" json:"password"` PasswordSalt string `db:"password_salt" json:"password_salt"` }
Paste represents paste itself.
func (*Paste) CreatePassword ¶
CreatePassword creates password for current paste.
func (*Paste) GenerateCryptedCookieValue ¶
GenerateCryptedCookieValue generates crypted cookie value for paste.
func (*Paste) GetExpirationTime ¶
func (*Paste) VerifyPassword ¶
VerifyPassword verifies that provided password is valid.
Click to show internal directories.
Click to hide internal directories.