Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSnippet ¶
AddSnippet stores a new snippet in the database.
func RemoveSnippet ¶
RemoveSnippet removes the matching snippet from the database.
func UpdateSnippet ¶
Update stores the updated snippet in the database.
Types ¶
type Snippet ¶
type Snippet struct {
ID string `gorm:"primaryKey"`
CreatedAt time.Time
UpdatedAt time.Time
Command string `gorm:"not null"`
Description string
}
func GetSnippet ¶
GetSnippet retrieves the snippet with the provided id.
func (*Snippet) DisplayText ¶
DisplayText returns the main fields of the snippet as a "friendly" string.
Click to show internal directories.
Click to hide internal directories.