Documentation
¶
Index ¶
- type Chirp
- type DB
- func (db *DB) CreateChirp(body string) (Chirp, error)
- func (db *DB) CreateUser(email string, password string) (User, error)
- func (db *DB) GetChirp(chirpId int) (Chirp, error)
- func (db *DB) GetChirps() ([]Chirp, error)
- func (db *DB) GetUser(email string) (*User, error)
- func (db *DB) GetUserById(userId int) *User
- func (db *DB) UpdateUser(id int, email string, password string) error
- type DBStructure
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func NewDB ¶
NewDB creates a new database connection and creates the database file if it doesn't exist
func (*DB) CreateChirp ¶
CreateChirp creates a new chirp and saves it to disk
func (*DB) GetUserById ¶
type DBStructure ¶
Click to show internal directories.
Click to hide internal directories.