model

package
v0.0.0-...-5f5a93c Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chapter

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

func NewChapterFromRepository

func NewChapterFromRepository(
	id ChapterId,
	startAt int,
	topic string,
	thumbnailLink string,
) *Chapter

func (*Chapter) Id

func (c *Chapter) Id() ChapterId

func (*Chapter) StartAt

func (c *Chapter) StartAt() int
func (c *Chapter) ThumbnailLink() string

func (*Chapter) Topic

func (c *Chapter) Topic() string

type ChapterId

type ChapterId ulid.ULID

func NewChapterId

func NewChapterId[T string | []byte](ulidExp T) (*ChapterId, error)

NewChapterId generate a new ChapterId from a string or []byte representation of a ULID.

func (ChapterId) String

func (s ChapterId) String() string

type Resource

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

func NewResourceFromRepository

func NewResourceFromRepository(
	id ResourceId,
	title string,
	ordering int,
	description string,
	link string,
) *Resource

func (*Resource) Description

func (r *Resource) Description() string

func (*Resource) Id

func (r *Resource) Id() ResourceId
func (r *Resource) Link() string

func (*Resource) Ordering

func (r *Resource) Ordering() int

func (*Resource) Title

func (r *Resource) Title() string

type ResourceId

type ResourceId ulid.ULID

func NewResourceId

func NewResourceId[T string | []byte](ulidExp T) (*ResourceId, error)

NewResourceId generate a new ResourceId from a string or []byte representation of a ULID.

func (ResourceId) ByteSlice

func (s ResourceId) ByteSlice() []byte

func (ResourceId) String

func (s ResourceId) String() string

type Subject

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

func NewSubjectFromRepository

func NewSubjectFromRepository(
	id SubjectId,
	category string,
	title string,
	videoIds []VideoId,
	location string,
	resourceIds []ResourceId,
	relatedSubjectIds []SubjectId,
	department string,
	firstHeldOn time.Time,
	faculty string,
	language string,
	freeDescription string,
	syllabusId *SyllabusId,
	series string,
	academicField string,
	thumbnailLink string,
) *Subject

func (*Subject) AcademicField

func (s *Subject) AcademicField() string

func (*Subject) Category

func (s *Subject) Category() string

func (*Subject) Department

func (s *Subject) Department() string

func (*Subject) Faculty

func (s *Subject) Faculty() string

func (*Subject) FirstHeldOn

func (s *Subject) FirstHeldOn() time.Time

func (*Subject) FreeDescription

func (s *Subject) FreeDescription() string

func (*Subject) Id

func (s *Subject) Id() SubjectId

func (*Subject) Language

func (s *Subject) Language() string

func (*Subject) Location

func (s *Subject) Location() string

func (*Subject) RelatedSubjectIds

func (s *Subject) RelatedSubjectIds() []SubjectId

func (*Subject) ResourceIds

func (s *Subject) ResourceIds() []ResourceId

func (*Subject) Series

func (s *Subject) Series() string

func (*Subject) SyllabusId

func (s *Subject) SyllabusId() *SyllabusId
func (s *Subject) ThumbnailLink() string

func (*Subject) Title

func (s *Subject) Title() string

func (*Subject) VideoIds

func (s *Subject) VideoIds() []VideoId

type SubjectId

type SubjectId ulid.ULID

func NewSubjectId

func NewSubjectId[T string | []byte](ulidExp T) (*SubjectId, error)

NewSubjectId generate a new SubjectId from a string or []byte representation of a ULID.

func (SubjectId) ByteSlice

func (s SubjectId) ByteSlice() []byte

func (SubjectId) String

func (s SubjectId) String() string

type Subpage

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

func NewSubpageFromRepository

func NewSubpageFromRepository(
	id SubpageId,
	content string,
) *Subpage

func (*Subpage) Content

func (s *Subpage) Content() string

func (*Subpage) Id

func (s *Subpage) Id() SubpageId

type SubpageId

type SubpageId ulid.ULID

func NewSubpageId

func NewSubpageId[T string | []byte](ulidExp T) (*SubpageId, error)

NewSubpageId generate a new SubpageId from a string or []byte representation of a ULID.

func (SubpageId) String

func (s SubpageId) String() string

type Syllabus

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

func NewSyllabusFromRepository

func NewSyllabusFromRepository(
	id SyllabusId,
	faculty string,
	language string,
	subjectNumbering string,
	academicYear int16,
	semester string,
	numCredit int8,
	courseFormat string,
	assignedGrade string,
	targetedAudience string,
	courseDayPeriod string,
	outline string,
	objective string,
	lessonPlan string,
	gradingMethod string,
	courseRequirement string,
	outClassLearning string,
	reference string,
	remark string,
	subpages []Subpage,
) *Syllabus

func (*Syllabus) AcademicYear

func (s *Syllabus) AcademicYear() int16

func (*Syllabus) AssignedGrade

func (s *Syllabus) AssignedGrade() string

func (*Syllabus) CourseDayPeriod

func (s *Syllabus) CourseDayPeriod() string

func (*Syllabus) CourseFormat

func (s *Syllabus) CourseFormat() string

func (*Syllabus) CourseRequirement

func (s *Syllabus) CourseRequirement() string

func (*Syllabus) Faculty

func (s *Syllabus) Faculty() string

func (*Syllabus) GradingMethod

func (s *Syllabus) GradingMethod() string

func (*Syllabus) Id

func (s *Syllabus) Id() SyllabusId

func (*Syllabus) Language

func (s *Syllabus) Language() string

func (*Syllabus) LessonPlan

func (s *Syllabus) LessonPlan() string

func (*Syllabus) NumCredit

func (s *Syllabus) NumCredit() int8

func (*Syllabus) Objective

func (s *Syllabus) Objective() string

func (*Syllabus) OutClassLearning

func (s *Syllabus) OutClassLearning() string

func (*Syllabus) Outline

func (s *Syllabus) Outline() string

func (*Syllabus) Reference

func (s *Syllabus) Reference() string

func (*Syllabus) Remark

func (s *Syllabus) Remark() string

func (*Syllabus) Semester

func (s *Syllabus) Semester() string

func (*Syllabus) SubjectNumbering

func (s *Syllabus) SubjectNumbering() string

func (*Syllabus) Subpages

func (s *Syllabus) Subpages() []Subpage

func (*Syllabus) TargetedAudience

func (s *Syllabus) TargetedAudience() string

type SyllabusId

type SyllabusId ulid.ULID

func NewSyllabusId

func NewSyllabusId[T string | []byte](ulidExp T) (*SyllabusId, error)

func (SyllabusId) ByteSlice

func (s SyllabusId) ByteSlice() []byte

func (SyllabusId) String

func (s SyllabusId) String() string

type Translation

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

func NewTranslationFromRepository

func NewTranslationFromRepository(
	id TranslationId,
	languageCode string,
	translation string,
) *Translation

func (*Translation) Id

func (t *Translation) Id() TranslationId

func (*Translation) LanguageCode

func (t *Translation) LanguageCode() string

func (*Translation) Translation

func (t *Translation) Translation() string

type TranslationId

type TranslationId ulid.ULID

func NewTranslationId

func NewTranslationId[T string | []byte](ulidExp T) (*TranslationId, error)

NewTranslationId generate a new TranslationId from a string or []byte representation of a ULID.

func (TranslationId) ByteSlice

func (s TranslationId) ByteSlice() []byte

func (TranslationId) String

func (s TranslationId) String() string

type Video

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

func NewVideoFromRepository

func NewVideoFromRepository(
	id VideoId,
	title string,
	ordering int,
	link string,
	chapters []Chapter,
	faculty string,
	lecturedOn time.Time,
	videoLength time.Duration,
	language string,
	transcription string,
	translations []Translation,
) *Video

func (*Video) Chapters

func (v *Video) Chapters() []Chapter

func (*Video) Faculty

func (v *Video) Faculty() string

func (*Video) Id

func (v *Video) Id() VideoId

func (*Video) Language

func (v *Video) Language() string

func (*Video) LecturedOn

func (v *Video) LecturedOn() time.Time
func (v *Video) Link() string

func (*Video) Ordering

func (v *Video) Ordering() int

func (*Video) Title

func (v *Video) Title() string

func (*Video) Transcription

func (v *Video) Transcription() string

func (*Video) Translations

func (v *Video) Translations() []Translation

func (*Video) VideoLength

func (v *Video) VideoLength() time.Duration

type VideoId

type VideoId ulid.ULID

func NewVideoId

func NewVideoId[T string | []byte](ulidExp T) (*VideoId, error)

NewVideoId generate a new VideoId from a string or []byte representation of a ULID.

func (VideoId) ByteSlice

func (s VideoId) ByteSlice() []byte

func (VideoId) String

func (s VideoId) String() string

Jump to

Keyboard shortcuts

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