repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Setup

func Setup(dialect string, connectionString string) error

Types

type AccessesRepository

type AccessesRepository interface {
	SaveAllianceAndCorpRole(allianceId, corporationId int64, role *model.Role) error
	SaveAllianceRole(allianceId int64, role *model.Role) error
	SaveCorporationRole(corporationId int64, role *model.Role) error
	SaveCharacterRole(characterId int64, role *model.Role) error
	SaveAllianceCharacterLeadershipRole(allianceId, characterId int64, role *model.Role) error
	SaveCorporationCharacterLeadershipRole(corporationId, characterId int64, role *model.Role) error

	DeleteAllianceAndCorpRole(allianceId, corporationId int64, role *model.Role) (int64, error)
	DeleteAllianceRole(allianceId int64, role *model.Role) (int64, error)
	DeleteCorporationRole(corporationId int64, role *model.Role) (int64, error)
	DeleteCharacterRole(characterId int64, role *model.Role) (int64, error)
	DeleteAllianceCharacterLeadershipRole(allianceId, characterId int64, role *model.Role) (int64, error)
	DeleteCorporationCharacterLeadershipRole(corporationId, characterId int64, role *model.Role) (int64, error)

	FindByChatId(chatId string) ([]string, error)
}
var AccessRepo AccessesRepository

type AllianceRepository

type AllianceRepository interface {
	Save(alliance *model.Alliance) error
	FindByAllianceId(allianceId int64) *model.Alliance
	FindAll() []*model.Alliance
	Delete(allianceId int64) error
}
var AllianceRepo AllianceRepository

type AuthenticationCodeRepository

type AuthenticationCodeRepository interface {
	Save(character *model.Character, authCode string) error
}
var AuthenticationCodeRepo AuthenticationCodeRepository

type CharacterRepository

type CharacterRepository interface {
	Save(character *model.Character) error
	FindByCharacterId(characterId int64) *model.Character
	FindByAutenticationCode(authCode string) *model.Character
	FindAll() []*model.Character
	Delete(characterId int64) error
}
var CharacterRepo CharacterRepository

type CorporationRepository

type CorporationRepository interface {
	Save(corporation *model.Corporation) error
	FindByCorporationId(corporationId int64) *model.Corporation
	FindAll() []*model.Corporation
	Delete(corporationId int64) error
}
var CorporationRepo CorporationRepository

type RoleRepository

type RoleRepository interface {
	Save(role *model.Role) error
	FindByRoleName(roleName string) *model.Role
	FindAll() []*model.Role
	Delete(roleName string) error
}
var RoleRepo RoleRepository

type UserRepository

type UserRepository interface {
	Save(user *model.User) error
	FindByChatId(chatId string) *model.User
	LinkCharacterToUserByAuthCode(authCode string, user *model.User) error
}
var UserRepo UserRepository

Jump to

Keyboard shortcuts

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