handlers

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HWAll represents all items in the collection.
	HWAll = iota
	// HWUpdated represents problems that were already on the
	// user's filesystem, where one or more new files have been added.
	HWUpdated
	// HWNew represents problems that did not yet exist on the
	// user's filesystem.
	HWNew
)

Variables

This section is empty.

Functions

func Configure

func Configure(ctx *cli.Context)

Configure stores settings in a JSON file. If a setting is not passed as an argument, default values are used.

func Debug

func Debug(ctx *cli.Context)

Debug provides information about the user's environment and configuration.

func Demo added in v1.7.1

func Demo(ctx *cli.Context)

Demo returns one problem for each active track.

func Fetch added in v1.7.1

func Fetch(ctx *cli.Context)

Fetch returns exercism problems.

func Login

func Login(ctx *cli.Context)

Login interactively stores exercism API configuration. Delete when nobody is using 1.6.x anymore.

func Logout

func Logout(ctx *cli.Context)

Logout deletes the config file. Delete when nobody is using 1.6.x anymore.

func Restore added in v1.7.1

func Restore(ctx *cli.Context)

Restore returns a user's solved problems.

func Submit added in v1.7.1

func Submit(ctx *cli.Context)

Submit posts an iteration to the api

func Unsubmit added in v1.7.1

func Unsubmit(ctx *cli.Context)

Unsubmit deletes an iteration from the api. If no iteration is specified, the most recent iteration is deleted.

Types

type HWFilter added in v1.7.1

type HWFilter int

HWFilter is used to categorize homework items.

type Homework added in v1.7.1

type Homework struct {
	Items []*Item
	// contains filtered or unexported fields
}

Homework is a collection of problems that were fetched from the APIs.

func NewHomework added in v1.7.1

func NewHomework(problems []*api.Problem, c *config.Config) *Homework

NewHomework decorates a problem set with some additional data based on the user's system.

func (*Homework) ItemsMatching added in v1.7.1

func (hw *Homework) ItemsMatching(filter HWFilter) []*Item

ItemsMatching returns a subset of the set of problems.

func (*Homework) Report added in v1.7.1

func (hw *Homework) Report(filter HWFilter)

Report outputs a list of the problems in the set. It prints the track name, the problem name, and the full path to the problem on the user's filesystem.

func (*Homework) Save added in v1.7.1

func (hw *Homework) Save() error

Save saves all problems in the problem set.

func (*Homework) Summarize added in v1.7.1

func (hw *Homework) Summarize()

Summarize prints a full report of new and updated items in the set.

type Item added in v1.7.1

type Item struct {
	*api.Problem
	// contains filtered or unexported fields
}

Item is a problem that has been fetched from the APIs. It contains some data specific to this particular request and user in order to give a useful report to the user about what has been fetched.

func (*Item) Matches added in v1.7.1

func (it *Item) Matches(filter HWFilter) bool

Matches determines whether or not this item matches the given filter.

func (*Item) Path added in v1.7.1

func (it *Item) Path() string

Path is the location of this item on the user's filesystem.

func (*Item) Save added in v1.7.1

func (it *Item) Save() error

Save writes the embedded problem to the filesystem.

Jump to

Keyboard shortcuts

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