store

package
v0.0.0-...-4b998cf Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveUser

func SaveUser(user User) error

SaveUser saves user info

Types

type BuildInfo

type BuildInfo struct {
	BuildTime     time.Time
	BuildDuration time.Duration
	BuildStatus   string
	BuildLog      string
	BuildErrorLog string
	BuildPath     string
}

BuildInfo type

type Project

type Project struct {
	Name          string
	Icon          string
	Description   string
	LastBuildInfo BuildInfo
	BuildsInfo    []BuildInfo
}

Project type

type User

type User struct {
	Username string
	// Email     string
	Token         oauth2.Token
	AvatarURL     string
	GithubProfile string
	Projects      []Project
}

User type

func GetUser

func GetUser(username string) (user User, err error)

GetUser returns an user info

func (User) GetProject

func (u User) GetProject(name string) (*Project, error)

GetProject gets a project from the user by it's name

func (*User) RemoveProject

func (u *User) RemoveProject(name string)

RemoveProject from the user.

Jump to

Keyboard shortcuts

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