snippet

package
v0.0.0-...-6e73f26 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeSchema

func InitializeSchema(dbPath string) error

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *database.Database) *Manager

func (*Manager) CreateSnippet

func (m *Manager) CreateSnippet(title, description, tags, code string, language string) error

func (*Manager) GetAllSnippets

func (m *Manager) GetAllSnippets() ([]database.Snippet, error)

func (*Manager) GetSnippetByID

func (m *Manager) GetSnippetByID(id int) (database.Snippet, error)

func (*Manager) SearchSnippets

func (m *Manager) SearchSnippets(keyword string) ([]database.Snippet, error)

func (*Manager) UpdateSnippet

func (m *Manager) UpdateSnippet(id int, title, description, tags, code, language string) error

Jump to

Keyboard shortcuts

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