Documentation
¶
Index ¶
- type Chirp
- type DB
- func (db *DB) CreateChirp(body string, authorId int) error
- func (db *DB) CreateRevokedToken(token string) error
- func (db *DB) CreateUser(email string, password string) error
- func (db *DB) DeleteChirp(id int) error
- func (db *DB) GetChirps() ([]Chirp, error)
- func (db *DB) GetRevokedTokens() (map[string]time.Time, error)
- func (db *DB) GetUsers() ([]User, error)
- func (db *DB) UpdateIsRed(id int, state bool) error
- func (db *DB) UpdateUser(email string, password string, id int) 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
}
object to read and write from database file
func (*DB) CreateRevokedToken ¶
func (*DB) DeleteChirp ¶
Click to show internal directories.
Click to hide internal directories.