Documentation
¶
Index ¶
- type Client
- type CourseStorage
- type Session
- type StudentStorage
- func (s *StudentStorage) AddStudent(st *envy.Student) error
- func (s *StudentStorage) Enroll(st *envy.Student, c *envy.Course) error
- func (s *StudentStorage) Exists(st *envy.Student) (bool, error)
- func (s *StudentStorage) List() ([]*envy.Student, error)
- func (s *StudentStorage) RemoveStudent(*envy.Student) error
- func (s *StudentStorage) Student(id int) (*envy.Student, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Filename to the BoltDB database. Path string // Validator Validator envy.Validator // Returns the current time. Now func() time.Time // contains filtered or unexported fields }
Client represents a client to the underlying BoltDB data store.
type CourseStorage ¶
type CourseStorage struct {
// contains filtered or unexported fields
}
func (*CourseStorage) RemoveCourse ¶
func (c *CourseStorage) RemoveCourse(*envy.Course) error
type Session ¶
Session represents an authenticable connection to the database.
func (*Session) CourseStorage ¶
func (s *Session) CourseStorage() envy.CourseStorage
CourseStorage returns the service associated with this session
func (*Session) SetCourseToken ¶
func (*Session) StudentStorage ¶
func (s *Session) StudentStorage() envy.StudentStorage
StudentStorage returns the service associated with this session
type StudentStorage ¶
type StudentStorage struct {
// contains filtered or unexported fields
}
StudentStorage represents a service for managing students
func (*StudentStorage) AddStudent ¶
func (s *StudentStorage) AddStudent(st *envy.Student) error
func (*StudentStorage) RemoveStudent ¶
func (s *StudentStorage) RemoveStudent(*envy.Student) error
Click to show internal directories.
Click to hide internal directories.