Documentation
¶
Index ¶
- type Database
- func (database *Database) Close() error
- func (db *Database) CreateRepoTable(dbname string) error
- func (db *Database) DeleteRepoByID(id int64) error
- func (db *Database) GetAllRepos() ([]*Repository, error)
- func (db *Database) GetRepoByID(id int64) (*Repository, error)
- func (db *Database) UpsertRepo(r *Repository) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func (*Database) CreateRepoTable ¶
func (*Database) DeleteRepoByID ¶
func (*Database) GetAllRepos ¶
func (db *Database) GetAllRepos() ([]*Repository, error)
func (*Database) GetRepoByID ¶
func (db *Database) GetRepoByID(id int64) (*Repository, error)
func (*Database) UpsertRepo ¶
func (db *Database) UpsertRepo(r *Repository) error
UpsertRepo updates or inserts a new repository entry in the database.
type Repository ¶
type Repository struct {
Id int64
Name string
Url string
Description sql.NullString
Language sql.NullString
Stars sql.NullString
}
Click to show internal directories.
Click to hide internal directories.