domain

package
v0.0.0-...-e43fd8c Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: Apache-2.0 Imports: 2 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AccountTypeGithub = "GITHUB"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Id        string
	Token     string
	UserId    string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AccessTokenDao

type AccessTokenDao struct {
	// contains filtered or unexported fields
}

func NewAccessTokenDao

func NewAccessTokenDao(db *gorm.DB) *AccessTokenDao

func (*AccessTokenDao) Create

func (at *AccessTokenDao) Create(model AccessToken) error

func (*AccessTokenDao) Delete

func (at *AccessTokenDao) Delete(id string) error

func (*AccessTokenDao) DeleteByToken

func (at *AccessTokenDao) DeleteByToken(token string) error

func (*AccessTokenDao) GetByToken

func (at *AccessTokenDao) GetByToken(token string) (AccessToken, error)

type GithubUser

type GithubUser struct {
	Id         string
	GithubId   string
	BorgUserId string
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

type GithubUserDao

type GithubUserDao struct {
	// contains filtered or unexported fields
}

func NewGithubUserDao

func NewGithubUserDao(db *gorm.DB) *GithubUserDao

func (*GithubUserDao) Create

func (gu *GithubUserDao) Create(model GithubUser) error

func (*GithubUserDao) GetByGithubId

func (gu *GithubUserDao) GetByGithubId(id string) (GithubUser, error)

type Organization

type Organization struct {
	Id        string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	CreatedBy string
	UpdatedBy string
}

type OrganizationDao

type OrganizationDao struct {
	// contains filtered or unexported fields
}

func NewOrganizationDao

func NewOrganizationDao(db *gorm.DB) *OrganizationDao

func (*OrganizationDao) Create

func (od *OrganizationDao) Create(u Organization) error

func (*OrganizationDao) GetById

func (od *OrganizationDao) GetById(id string) (Organization, error)

func (*OrganizationDao) GetByIds

func (od *OrganizationDao) GetByIds(ids []string) ([]Organization, error)

func (*OrganizationDao) GetByName

func (od *OrganizationDao) GetByName(name string) (Organization, error)

func (*OrganizationDao) MatchesInIds

func (od *OrganizationDao) MatchesInIds(
	ids []string, pattern string,
) ([]Organization, error)

func (*OrganizationDao) Update

func (od *OrganizationDao) Update(u Organization) error
type OrganizationJoinLink struct {
	Id             string
	OrganizationId string
	Ttl            int64
	CreatedAt      time.Time
	CreatedBy      string
}

func (OrganizationJoinLink) IsExpired

func (o OrganizationJoinLink) IsExpired() bool

type OrganizationJoinLinkDao

type OrganizationJoinLinkDao struct {
	// contains filtered or unexported fields
}

func NewOrganizationJoinLinkDao

func NewOrganizationJoinLinkDao(db *gorm.DB) *OrganizationJoinLinkDao

func (*OrganizationJoinLinkDao) Create

func (*OrganizationJoinLinkDao) Delete

func (od *OrganizationJoinLinkDao) Delete(id string) error

func (*OrganizationJoinLinkDao) GetById

func (*OrganizationJoinLinkDao) GetByOrganizationId

func (od *OrganizationJoinLinkDao) GetByOrganizationId(id string) (OrganizationJoinLink, error)

func (*OrganizationJoinLinkDao) Update

type User

type User struct {
	Id          string
	Login       string
	Name        string
	Email       string
	AvatarUrl   string
	AccountType string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type UserDao

type UserDao struct {
	// contains filtered or unexported fields
}

func NewUserDao

func NewUserDao(db *gorm.DB) *UserDao

func (*UserDao) Create

func (ud *UserDao) Create(u User) error

func (*UserDao) GetByEmail

func (ud *UserDao) GetByEmail(email string) (User, error)

func (*UserDao) GetByEmailOrUsername

func (ud *UserDao) GetByEmailOrUsername(str string) (User, error)

func (*UserDao) GetById

func (ud *UserDao) GetById(id string) (User, error)

func (*UserDao) GetByIds

func (ud *UserDao) GetByIds(ids []string) ([]User, error)

func (*UserDao) GetByLogin

func (ud *UserDao) GetByLogin(login string) (User, error)

func (*UserDao) Update

func (ud *UserDao) Update(u User) error

type UserOrganization

type UserOrganization struct {
	Id             string
	UserId         string
	OrganizationId string
	IsAdmin        int
	CreatedAt      time.Time
	UpdatedAt      time.Time
	CreatedBy      string
	UpdatedBy      string
}

type UserOrganizationDao

type UserOrganizationDao struct {
	// contains filtered or unexported fields
}

func NewUserOrganizationDao

func NewUserOrganizationDao(db *gorm.DB) *UserOrganizationDao

func (*UserOrganizationDao) Create

func (*UserOrganizationDao) Delete

func (ud *UserOrganizationDao) Delete(id string) error

func (*UserOrganizationDao) GetAdmins

func (ud *UserOrganizationDao) GetAdmins(organizastionId string) ([]UserOrganization, error)

func (*UserOrganizationDao) GetById

func (ud *UserOrganizationDao) GetById(id string) (UserOrganization, error)

func (*UserOrganizationDao) GetByUserAndOrganization

func (ud *UserOrganizationDao) GetByUserAndOrganization(
	user_id string,
	organization_id string,
) (UserOrganization, error)

func (*UserOrganizationDao) ListOrganizationsForUser

func (ud *UserOrganizationDao) ListOrganizationsForUser(user_id string) ([]string, error)

return list of user ids

func (*UserOrganizationDao) ListUsersInOrganization

func (ud *UserOrganizationDao) ListUsersInOrganization(organization_id string) ([]string, error)

return list of user ids

func (*UserOrganizationDao) Update

Jump to

Keyboard shortcuts

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