models

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Beginner     = "beginner"
	Intermediate = "intermediate"
	Advanced     = "advanced"
	Expert       = "expert"
)
View Source
const Config = `twitter: {{.Twitter}}
author: {{.Author}}
email: {{.Email}}
moduledir: {{.ModuleDir}}
coursedir: {{.CourseDir}}
`

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Twitter   string
	Author    string
	Email     string
	ModuleDir string
	CourseDir string
}

type Course

type Course struct {
	Name              string    `json:"name"`
	ShortName         string    `json:"short_name"`
	Instructor        string    `json:"instructor"`
	InstructorEmail   string    `json:"instructor_email"`
	InstructorTwitter string    `json:"instructor_twitter"`
	OutputDirectory   string    `json:"output_directory"`
	Secret            string    `json:"secret"`
	Socket            string    `json:"socket"`
	Modules           []*Module `json:"modules"`
}

func NewCourse

func NewCourse(cmd *cobra.Command) *Course

type Lesson

type Lesson struct {
	ShortName     string `json:"short_name"`
	Description   string `json:"description"`
	Topic         string `json:"topic"`
	Author        string `json:"author"`
	AuthorEmail   string `json:"author_email"`
	AuthorTwitter string `json:"author_twitter"`
}

func NewLesson

func NewLesson(cmd *cobra.Command, name, description string, importPath string) Lesson

func (Lesson) NumberedPath

func (m Lesson) NumberedPath(i int) string

func (Lesson) String

func (m Lesson) String() string

type Level

type Level string

type Module

type Module struct {
	ShortName        string    `json:"short_name"`
	Description      string    `json:"description"`
	Topic            string    `json:"topic"`
	Level            Level     `json:"level"`
	Author           string    `json:"author"`
	AuthorEmail      string    `json:"author_email"`
	AuthorTwitter    string    `json:"author_twitter"`
	SourceRepository string    `json:"source_repository"`
	Lessons          []*Lesson `json:"lessons"`
}

func NewModule

func NewModule(cmd *cobra.Command, description string, importPath string) Module

func (Module) NumberedPath

func (m Module) NumberedPath(i int) string

func (Module) String

func (m Module) String() string

Jump to

Keyboard shortcuts

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