models

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (err error)

Connect connect to the database

Types

type HistoryRepoForksNum

type HistoryRepoForksNum struct {
	gorm.Model
	UserID   uint64
	RepoID   uint64
	ForksNum uint64
}

HistoryRepoForksNum ..

func (*HistoryRepoForksNum) Create

func (s *HistoryRepoForksNum) Create() error

Create ..

type HistoryRepoIssuesNum added in v1.1.0

type HistoryRepoIssuesNum struct {
	gorm.Model
	UserID    uint64
	RepoID    uint64
	IssuesNum uint64
}

HistoryRepoIssuesNum ..

func (*HistoryRepoIssuesNum) Create added in v1.1.0

func (s *HistoryRepoIssuesNum) Create() error

Create ..

type HistoryRepoStarredNum

type HistoryRepoStarredNum struct {
	gorm.Model
	UserID     uint64
	RepoID     uint64
	StarredNum uint64
}

HistoryRepoStarredNum ..

func (*HistoryRepoStarredNum) Create

func (s *HistoryRepoStarredNum) Create() error

Create ..

type HistoryRepoWatchersNum

type HistoryRepoWatchersNum struct {
	gorm.Model
	UserID      uint64
	RepoID      uint64
	WatchersNum uint64
}

HistoryRepoWatchersNum ..

func (*HistoryRepoWatchersNum) Create

func (s *HistoryRepoWatchersNum) Create() error

Create ..

type HistoryUserFollowersNum

type HistoryUserFollowersNum struct {
	gorm.Model
	UserID       uint64
	FollowersNum uint64
}

HistoryUserFollowersNum ..

func (*HistoryUserFollowersNum) Create

func (s *HistoryUserFollowersNum) Create() error

Create ..

type HistoryUserFollowingNum

type HistoryUserFollowingNum struct {
	gorm.Model
	UserID       uint64
	FollowingNum uint64
}

HistoryUserFollowingNum ..

func (*HistoryUserFollowingNum) Create

func (s *HistoryUserFollowingNum) Create() error

Create ..

type HistoryUserGistNum

type HistoryUserGistNum struct {
	gorm.Model
	UserID  uint64
	GistNum uint64
}

HistoryUserGistNum ..

func (*HistoryUserGistNum) Create

func (s *HistoryUserGistNum) Create() error

Create ..

type HistoryUserReposNum

type HistoryUserReposNum struct {
	gorm.Model
	UserID   uint64
	ReposNum uint64
}

HistoryUserReposNum ..

func (*HistoryUserReposNum) Create

func (s *HistoryUserReposNum) Create() error

Create ..

type IssueComments added in v1.1.0

type IssueComments struct {
	gorm.Model
	UserID uint64
	RepoID uint64
	Number uint64
	Body   []byte
}

IssueComments ..

func (*IssueComments) Create added in v1.1.0

func (s *IssueComments) Create() error

Create ..

type Log

type Log struct {
	gorm.Model
	Type     string
	Mark     string
	Method   string
	URL      string
	Response []byte `gorm:"size:65535"`
	ErrMsg   []byte
}

Log ..

func (*Log) Create

func (log *Log) Create() (err error)

Create ..

func (*Log) GetOutDate

func (log *Log) GetOutDate() bool

GetOutDate ..

type Logger

type Logger struct{}

Logger default logger

func (Logger) Print

func (logger Logger) Print(values ...interface{})

Print ..

type Repo

type Repo struct {
	gorm.Model
	UserID      uint64
	RepoID      uint64
	Name        string
	Homepage    string
	Language    string
	Size        uint64
	Licence     string
	Description string
	Stargazers  string
	Watchers    string
}

Repo ..

func (*Repo) Create

func (repo *Repo) Create() (err error)

Create ..

func (*Repo) FindByID

func (repo *Repo) FindByID(id uint) (u *Repo, err error)

FindByID ..

func (*Repo) FindByRepoID added in v1.1.0

func (repo *Repo) FindByRepoID(id uint64) (r *Repo, err error)

FindByRepoID ..

func (*Repo) IsEmpty

func (repo *Repo) IsEmpty() (isEmpty bool, err error)

IsEmpty ..

func (*Repo) IsExist

func (repo *Repo) IsExist() (isExist bool, err error)

IsExist ..

func (*Repo) Update

func (repo *Repo) Update() (err error)

Update ..

type RepoIssues added in v1.1.0

type RepoIssues struct {
	gorm.Model
	UserID   uint64
	RepoID   uint64
	Number   uint64
	Comments uint64
	Title    string
	Body     []byte
}

RepoIssues issues

func (*RepoIssues) Create added in v1.1.0

func (f *RepoIssues) Create() (err error)

Create ..

func (*RepoIssues) FindByID added in v1.1.0

func (f *RepoIssues) FindByID(id uint) (u *RepoIssues, err error)

FindByID ..

func (*RepoIssues) IsExist added in v1.1.0

func (f *RepoIssues) IsExist() (isExist bool, err error)

IsExist ..

func (*RepoIssues) Update added in v1.1.0

func (f *RepoIssues) Update() (err error)

Update ..

type RepoStargazers

type RepoStargazers struct {
	gorm.Model
	UserID  uint64
	Version string
	RepoID  uint64
}

RepoStargazers followers

func (*RepoStargazers) Create

func (f *RepoStargazers) Create() (err error)

Create ..

func (*RepoStargazers) IsExist

func (f *RepoStargazers) IsExist() (isExist bool, err error)

IsExist ..

func (*RepoStargazers) Update

func (f *RepoStargazers) Update() (err error)

Update ..

type RepoWatchers

type RepoWatchers struct {
	gorm.Model
	UserID  uint64
	Version string
	RepoID  uint64
}

RepoWatchers followers

func (*RepoWatchers) Create

func (f *RepoWatchers) Create() (err error)

Create ..

func (*RepoWatchers) IsExist

func (f *RepoWatchers) IsExist() (isExist bool, err error)

IsExist ..

func (*RepoWatchers) Update

func (f *RepoWatchers) Update() (err error)

Update ..

type User

type User struct {
	gorm.Model
	UserID    uint64
	Login     string
	Type      string
	Location  string
	Email     string
	Followers string
	Following string
}

User ..

func (*User) Create

func (user *User) Create() (err error)

Create ..

func (*User) FindByID

func (user *User) FindByID(id uint) (u *User, err error)

FindByID ..

func (*User) FindByUserID

func (user *User) FindByUserID(id uint64) (u *User, err error)

FindByUserID ..

func (*User) IsEmpty

func (user *User) IsEmpty() (isEmpty bool, err error)

IsEmpty ..

func (*User) IsExist

func (user *User) IsExist() (isExist bool, err error)

IsExist ..

func (*User) Update

func (user *User) Update() (err error)

Update ..

type UserFollowers

type UserFollowers struct {
	gorm.Model
	UserID         uint64
	Version        string
	FollowerUserID uint64
}

UserFollowers followers

func (*UserFollowers) Create

func (f *UserFollowers) Create() (err error)

Create ..

func (*UserFollowers) IsExist

func (f *UserFollowers) IsExist() (isExist bool, err error)

IsExist ..

func (*UserFollowers) Update

func (f *UserFollowers) Update() (err error)

Update ..

type UserFollowing

type UserFollowing struct {
	gorm.Model
	UserID          uint64
	Version         string
	FollowingUserID uint64
}

UserFollowing ..

func (*UserFollowing) Create

func (f *UserFollowing) Create() (err error)

Create ..

func (*UserFollowing) IsExist

func (f *UserFollowing) IsExist() (isExist bool, err error)

IsExist ..

func (*UserFollowing) Update

func (f *UserFollowing) Update() (err error)

Update ..

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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