models

package
v0.0.0-...-a59da6d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSite

func CreateSite(user User, repository *github.Repository, template, domain string) error

func Init

func Init() error

func RegisterUser

func RegisterUser(user *goth.User) error

Types

type Owner

type Owner struct {
	ID        int64
	Name      string
	Slug      string
	AvatarURL string
}

type Site

type Site struct {
	ID          int64
	Title       string
	Description string
	GitHubURL   string
	Template    string
	Version     string
	Domain      string
	Analytics   string
	User        *User     `orm:"rel(fk)"`
	Created     time.Time `orm:"auto_now_add;type(datetime)"`
	Updated     time.Time `orm:"auto_now;type(datetime)"`
}

type Template

type Template struct {
	ID          int64  `json:"-"`
	Path        string `json:"-",orm:"unique"`
	BasePath    string `json:"-",orm:"unique"`
	Name        string `json:"name",orm:"unique"`
	Home        string `json:"home"`
	Description string `json:"description"`
}

func AllTemplates

func AllTemplates() []*Template

func GetTemplate

func GetTemplate(basePath string) (Template, error)

type User

type User struct {
	ID        int64
	Name      string
	AvatarURL string
	Slug      string    `orm:"unique"`
	UUID      string    `orm:"unique"`
	Email     string    `orm:"unique"`
	Created   time.Time `orm:"auto_now_add;type(datetime)"`
}

func GetUser

func GetUser(slug string) (User, error)

Jump to

Keyboard shortcuts

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