models

package
v0.0.0-...-ede1b7c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message, DeveloperMessage string
	Code                      int
}

APIError is an error that contains information for API Repsonses

func (APIError) Error

func (e APIError) Error() string

func (APIError) FullError

func (e APIError) FullError() string

FullError returns a string of all the information for the APIError

type Account

type Account struct {
	// Username and Email are unique Identifiers
	Username, Password, Name, Email, Salt string
	ProjectIds                            []string
}

Account contains the information for each user

func (Account) Validate

func (account Account) Validate() error

Validate account method

type Evolution

type Evolution struct {
	Number    int
	Tasks     []Task
	ProjectID string
}

Evolution contains evolution information for a project

type Project

type Project struct {
	ID               string
	Name             string
	Description      string
	Status           string
	CurrentEvolution Evolution
	Evolutions       []Evolution
}

Project contains a representation of a project

func (Project) Validate

func (project Project) Validate() error

Validate checks if the model is valid

type Session

type Session struct {
	Token      string
	Username   string
	Expiration time.Time
	RememberMe bool
}

Session represents the contents of the cookie for the browser

type Task

type Task struct {
	ID              uint64
	ProjectID       string
	Task            string
	Completed       bool
	EvolutionNumber int
}

Task contains a representation of a task

Jump to

Keyboard shortcuts

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