character

package
v0.0.0-...-31a4683 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterRepository

type CharacterRepository struct {
	*sqlx.DB
}

func NewCharacterRepository

func NewCharacterRepository(db *sqlx.DB) *CharacterRepository

func (*CharacterRepository) AddCharacterToList

func (db *CharacterRepository) AddCharacterToList(userId, targetId, listId int) error

func (*CharacterRepository) Adomonish

func (db *CharacterRepository) Adomonish(targetId int, data *model.AdomonishData) error

func (*CharacterRepository) Ban

func (db *CharacterRepository) Ban(targetId int, data *model.BanData) error

func (*CharacterRepository) Block

func (db *CharacterRepository) Block(userId, targetId int) error

func (*CharacterRepository) CheckUsernameExists

func (db *CharacterRepository) CheckUsernameExists(username string) (exists bool, err error)

func (*CharacterRepository) CreateAdministrator

func (db *CharacterRepository) CreateAdministrator(id int, hashedPassword, name, nickname, username, notificationToken string) error

func (*CharacterRepository) CreateCharacter

func (db *CharacterRepository) CreateCharacter(name, nickname, username, password, notificationToken string) (id int, err error)

func (*CharacterRepository) CreateDummyCharacters

func (db *CharacterRepository) CreateDummyCharacters(number int, name, nickname, summary, profile, password string, notificationTokenGenerator func() string) error

func (*CharacterRepository) CreateLayerGroup

func (db *CharacterRepository) CreateLayerGroup(characterId, groupId int, name string) (id int, err error)

func (*CharacterRepository) CreateLayeringGroup

func (db *CharacterRepository) CreateLayeringGroup(characterId int, name string) (id int, err error)

func (*CharacterRepository) CreateList

func (db *CharacterRepository) CreateList(characterId int, name string) (listId int, err error)

func (*CharacterRepository) CreateProcessSchema

func (db *CharacterRepository) CreateProcessSchema(characterId, groupId int, process *model.CharacterIconProcessSchema) (id int, err error)

func (*CharacterRepository) DeleteCharacter

func (db *CharacterRepository) DeleteCharacter(characterId int) error

func (*CharacterRepository) DeleteLayerGroup

func (db *CharacterRepository) DeleteLayerGroup(characterId, groupId int) error

func (*CharacterRepository) DeleteLayerItems

func (db *CharacterRepository) DeleteLayerItems(characterId int, itemIds *[]int) error

func (*CharacterRepository) DeleteLayeringGroup

func (db *CharacterRepository) DeleteLayeringGroup(characterId int, groupId int) error

func (*CharacterRepository) DeleteList

func (db *CharacterRepository) DeleteList(userId, listId int) error

func (*CharacterRepository) DeleteProcessSchema

func (db *CharacterRepository) DeleteProcessSchema(characterId, processId int) error

func (*CharacterRepository) DeleteUploadedImages

func (db *CharacterRepository) DeleteUploadedImages(characterId int, imageIds *[]int, uploadDir string) error

TODO: 明らかに肥大化しすぎなのでdomainとinterface/storageに適切に分割する

func (*CharacterRepository) ExchangeEmailToId

func (db *CharacterRepository) ExchangeEmailToId(email string) (id int, err error)

func (*CharacterRepository) ExchangeNotificationTokenToId

func (db *CharacterRepository) ExchangeNotificationTokenToId(token string) (id int, err error)

func (*CharacterRepository) ExchangeUsernameToId

func (db *CharacterRepository) ExchangeUsernameToId(username string) (id int, err error)

func (*CharacterRepository) ExecTx

func (db *CharacterRepository) ExecTx(f func(tx *sqlx.Tx) error) error

func (*CharacterRepository) Follow

func (db *CharacterRepository) Follow(userId, targetId int) (userName string, webhook string, err error)

func (*CharacterRepository) Mute

func (db *CharacterRepository) Mute(userId, targetId int) error

func (*CharacterRepository) RegisterGoogleData

func (db *CharacterRepository) RegisterGoogleData(characterId int, googleId string) error

func (*CharacterRepository) RegisterTwitterData

func (db *CharacterRepository) RegisterTwitterData(characterId int, twitterId string) error

func (*CharacterRepository) RemoveCharacterFromList

func (db *CharacterRepository) RemoveCharacterFromList(userId, targetId, listId int) error

func (*CharacterRepository) RenameList

func (db *CharacterRepository) RenameList(listId int, newName string) error

func (*CharacterRepository) RetrieveBlockList

func (db *CharacterRepository) RetrieveBlockList(id int) (list *[]model.GeneralCharacterListItem, err error)

func (*CharacterRepository) RetrieveCharacterIcons

func (db *CharacterRepository) RetrieveCharacterIcons(id int) (icons *[]model.Icon, err error)

func (*CharacterRepository) RetrieveCharacterList

func (db *CharacterRepository) RetrieveCharacterList(id *int, start, end int) (list *[]model.AllCharacterListItem, maxId int, err error)

func (*CharacterRepository) RetrieveCharacterNickname

func (db *CharacterRepository) RetrieveCharacterNickname(characterId int) (nickname string, err error)

func (*CharacterRepository) RetrieveCharacterProfileImages

func (db *CharacterRepository) RetrieveCharacterProfileImages(id int) (images *[]model.ProfileImage, err error)

func (*CharacterRepository) RetrieveCharacterSuggestions

func (db *CharacterRepository) RetrieveCharacterSuggestions(id int, searchText string, excludeOwn bool) (suggestions *model.CharacterSuggestionsData, err error)

func (*CharacterRepository) RetrieveConfirmCode

func (db *CharacterRepository) RetrieveConfirmCode(id int) (code, email string, err error)

func (*CharacterRepository) RetrieveCredentials

func (db *CharacterRepository) RetrieveCredentials(id int) (password, notificationToken string, isAdministrator bool, err error)

func (*CharacterRepository) RetrieveCredentialsByGoogle

func (db *CharacterRepository) RetrieveCredentialsByGoogle(googleId string) (characterId int, notificationToken string, err error)

func (*CharacterRepository) RetrieveCredentialsByTwitter

func (db *CharacterRepository) RetrieveCredentialsByTwitter(twitterId string) (characterId int, notificationToken string, err error)

func (*CharacterRepository) RetrieveEmailRegistratedCharacters

func (db *CharacterRepository) RetrieveEmailRegistratedCharacters(targetCharacters *[]int) (characters *[]model.CharacterEmailRegistratedData, err error)

func (*CharacterRepository) RetrieveFollowList

func (db *CharacterRepository) RetrieveFollowList(userId, targetId int) (list *[]model.GeneralCharacterListItem, err error)

func (*CharacterRepository) RetrieveFollowerList

func (db *CharacterRepository) RetrieveFollowerList(userId, targetId int) (list *[]model.GeneralCharacterListItem, err error)

func (*CharacterRepository) RetrieveHomeData

func (db *CharacterRepository) RetrieveHomeData(userId int) (home *model.HomeData, err error)

func (*CharacterRepository) RetrieveInitialData

func (db *CharacterRepository) RetrieveInitialData(id int) (existsUnreadNotification, existsUnreadMail bool, err error)

func (*CharacterRepository) RetrieveLayeringGroup

func (db *CharacterRepository) RetrieveLayeringGroup(characterId, groupId int) (layeringGroup *model.CharacterIconLayeringGroup, err error)

func (*CharacterRepository) RetrieveLayeringGroupOverviews

func (db *CharacterRepository) RetrieveLayeringGroupOverviews(characterId int) (overviews *[]model.CharacterIconLayeringGroupOverview, err error)

func (*CharacterRepository) RetrieveList

func (db *CharacterRepository) RetrieveList(listId int) (listName string, characters []model.CharacterOverview, err error)

func (*CharacterRepository) RetrieveListOwner

func (db *CharacterRepository) RetrieveListOwner(listId int) (characterId int, err error)

func (*CharacterRepository) RetrieveListSuggestions

func (db *CharacterRepository) RetrieveListSuggestions(characterId int, searchText string, listId int) (suggestions *model.CharacterSuggestionsData, err error)

func (*CharacterRepository) RetrieveLists

func (db *CharacterRepository) RetrieveLists(id int) (lists *[]model.ListOverview, err error)

func (*CharacterRepository) RetrieveMuteList

func (db *CharacterRepository) RetrieveMuteList(id int) (list *[]model.GeneralCharacterListItem, err error)

func (*CharacterRepository) RetrieveNotifications

func (db *CharacterRepository) RetrieveNotifications(id, start, number int) (notifications []model.Notification, isContinue bool, err error)

func (*CharacterRepository) RetrieveOtherSettings

func (db *CharacterRepository) RetrieveOtherSettings(characterId int) (settings *model.CharacterOtherSettingsState, err error)

func (*CharacterRepository) RetrievePassword

func (db *CharacterRepository) RetrievePassword(id int) (password string, err error)

func (*CharacterRepository) RetrieveProfile

func (db *CharacterRepository) RetrieveProfile(userId *int, targetId int) (*model.Profile, error)

func (*CharacterRepository) RetrieveProfileEditData

func (db *CharacterRepository) RetrieveProfileEditData(id int) (data *model.ProfileEditData, err error)

func (*CharacterRepository) RetrieveProhibitionRelatedData

func (db *CharacterRepository) RetrieveProhibitionRelatedData(targetId int) (data *[]model.ProhibitionRelatedData, err error)

func (*CharacterRepository) RetrieveRelatedFollowerList

func (db *CharacterRepository) RetrieveRelatedFollowerList(userId, targetId int) (list *[]model.GeneralCharacterListItem, err error)

func (*CharacterRepository) RetrieveUploadedImages

func (db *CharacterRepository) RetrieveUploadedImages(id int) (images *[]model.UploadedImage, err error)

func (*CharacterRepository) SaveUploadImageData

func (db *CharacterRepository) SaveUploadImageData(id int, images []*bytes.Buffer, imageType service.ImageTypeId, uploadDir string) (*[]string, error)

TODO: 明らかに責任範囲外を担当しているのでdomainとinterface/storageに適切に分割する

func (*CharacterRepository) SetConfirmCode

func (db *CharacterRepository) SetConfirmCode(id int, email, code string, expireMinutes int) error

func (*CharacterRepository) SetPasswordResetCode

func (db *CharacterRepository) SetPasswordResetCode(id int, email, code string, expireMinutes int) error

func (*CharacterRepository) Unban

func (db *CharacterRepository) Unban(targetId int, data *model.UnbanData) error

func (*CharacterRepository) Unblock

func (db *CharacterRepository) Unblock(userId, targetId int) error

func (*CharacterRepository) UndeleteCharacter

func (db *CharacterRepository) UndeleteCharacter(id int) error

func (*CharacterRepository) Unfollow

func (db *CharacterRepository) Unfollow(userId, targetId int) error

func (*CharacterRepository) UnlinkGoogle

func (db *CharacterRepository) UnlinkGoogle(characterId int) error

func (*CharacterRepository) UnlinkTwitter

func (db *CharacterRepository) UnlinkTwitter(characterId int) error

func (*CharacterRepository) Unmute

func (db *CharacterRepository) Unmute(userId, targetId int) error

func (*CharacterRepository) UnregisterEmail

func (db *CharacterRepository) UnregisterEmail(characterId int) error

func (*CharacterRepository) UpdateEmail

func (db *CharacterRepository) UpdateEmail(id int, email string) error

func (*CharacterRepository) UpdateIcons

func (db *CharacterRepository) UpdateIcons(id int, icons *[]model.Icon, insertOnly bool) error

func (*CharacterRepository) UpdateLayerGroupName

func (db *CharacterRepository) UpdateLayerGroupName(characterId, groupId int, name string) error

func (*CharacterRepository) UpdateLayerGroupOrders

func (db *CharacterRepository) UpdateLayerGroupOrders(characterId, groupId int, orders *[]model.CharacterIconLayerGroupOrder) error

func (*CharacterRepository) UpdateLayerItems

func (db *CharacterRepository) UpdateLayerItems(characterId, groupId int, items *[]model.CharacterIconLayerItemEditData) (result *[]model.CharacterIconLayerItem, err error)

func (*CharacterRepository) UpdateLayeringGroupName

func (db *CharacterRepository) UpdateLayeringGroupName(characterId, groupId int, name string) error

func (*CharacterRepository) UpdateNotificationChecked

func (db *CharacterRepository) UpdateNotificationChecked(characterId int) error

func (*CharacterRepository) UpdateOtherSettings

func (db *CharacterRepository) UpdateOtherSettings(characterId int, settings *model.CharacterOtherSettings) error

func (*CharacterRepository) UpdatePassword

func (db *CharacterRepository) UpdatePassword(id int, password string) error

func (*CharacterRepository) UpdatePasswordByResetCode

func (db *CharacterRepository) UpdatePasswordByResetCode(id int, code, password string) error

func (*CharacterRepository) UpdateProfile

func (db *CharacterRepository) UpdateProfile(id int, profile *model.ProfileEditData) error

func (*CharacterRepository) UpdateProfileImages

func (db *CharacterRepository) UpdateProfileImages(id int, images *[]model.ProfileImage) error

Source Files

Jump to

Keyboard shortcuts

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