Version: v0.1.0-a6 Latest Latest

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

Go to latest
Published: Apr 12, 2019 License: GPL-3.0 Imports: 7 Imported by: 0




This section is empty.


This section is empty.


func NewStoreError

func NewStoreError(path string, in string, err error) *model.AppError

NewStoreError define which status code to return given the SQL error that has been throwd


type SQLStore

type SQLStore struct {
	DB *sqlx.DB

SQLStore struct

func (*SQLStore) Close

func (s *SQLStore) Close() *model.AppError

Close store

func (*SQLStore) DeleteCategory

func (s *SQLStore) DeleteCategory(categoryName string) *model.AppError

DeleteCategory query

func (*SQLStore) DeleteSoftware

func (s *SQLStore) DeleteSoftware(softwareID uint64) *model.AppError

DeleteSoftware query

func (*SQLStore) DeleteSoftwareCategory

func (s *SQLStore) DeleteSoftwareCategory(softwareID uint64, categoryName string) *model.AppError

DeleteSoftwareCategory query

func (*SQLStore) DeleteSubscription

func (s *SQLStore) DeleteSubscription(userID, softwareID uint64) *model.AppError

DeleteSubscription query

func (*SQLStore) DeleteSubscriptionTag

func (s *SQLStore) DeleteSubscriptionTag(userID, softwareID, tagID uint64) *model.AppError

DeleteSubscriptionTag query

func (*SQLStore) DeleteUser

func (s *SQLStore) DeleteUser(userID uint64) *model.AppError

DeleteUser query

func (*SQLStore) DeleteUserTag

func (s *SQLStore) DeleteUserTag(userID uint64, tagID uint64) *model.AppError

DeleteUserTag query

func (*SQLStore) GetCategories

func (s *SQLStore) GetCategories() (*model.Categories, *model.AppError)

GetCategories query

func (*SQLStore) GetCategorySoftwares

func (s *SQLStore) GetCategorySoftwares(categoryName string) (*model.Softwares, *model.AppError)

GetCategorySoftwares query

func (*SQLStore) GetSoftware

func (s *SQLStore) GetSoftware(softwareID uint64) (*model.Software, *model.AppError)

GetSoftware query

func (*SQLStore) GetSoftwareByName

func (s *SQLStore) GetSoftwareByName(name string) (*model.Software, *model.AppError)

GetSoftwareByName query

func (*SQLStore) GetSoftwareByURL

func (s *SQLStore) GetSoftwareByURL(url string) (*model.Software, *model.AppError)

GetSoftwareByURL query

func (*SQLStore) GetSoftwareCategories

func (s *SQLStore) GetSoftwareCategories(softwareID uint64) (*model.Categories, *model.AppError)

GetSoftwareCategories query

func (*SQLStore) GetSoftwares

func (s *SQLStore) GetSoftwares() (*model.Softwares, *model.AppError)

GetSoftwares query

func (*SQLStore) GetSoftwaresByCreator

func (s *SQLStore) GetSoftwaresByCreator(userID uint64) (*model.Softwares, *model.AppError)

GetSoftwaresByCreator query

func (*SQLStore) GetSubscription

func (s *SQLStore) GetSubscription(userID, softwareID uint64) (*model.Subscription, *model.AppError)

GetSubscription query

func (*SQLStore) GetSubscriptionTags

func (s *SQLStore) GetSubscriptionTags(userID, softwareID uint64) (*model.Tags, *model.AppError)

GetSubscriptionTags query

func (*SQLStore) GetSubscriptions

func (s *SQLStore) GetSubscriptions(userID uint64) (*model.Subscriptions, *model.AppError)

GetSubscriptions query

func (*SQLStore) GetUser

func (s *SQLStore) GetUser(userID uint64) (*model.User, *model.AppError)

GetUser query

func (*SQLStore) GetUserByEmail

func (s *SQLStore) GetUserByEmail(email string) (*model.User, *model.AppError)

GetUserByEmail query

func (*SQLStore) GetUserByName

func (s *SQLStore) GetUserByName(username string) (*model.User, *model.AppError)

GetUserByName query

func (*SQLStore) GetUserTag

func (s *SQLStore) GetUserTag(userID uint64, tagID uint64) (*model.Tag, *model.AppError)

GetUserTag query

func (*SQLStore) GetUserTags

func (s *SQLStore) GetUserTags(userID uint64) (*model.Tags, *model.AppError)

GetUserTags query

func (*SQLStore) GetUsers

func (s *SQLStore) GetUsers() (*model.Users, *model.AppError)

GetUsers query

func (*SQLStore) GetUsersWithSubscriptionTo

func (s *SQLStore) GetUsersWithSubscriptionTo(softwareID uint64) (*model.Users, *model.AppError)

GetUsersWithSubscriptionTo query

func (*SQLStore) Init

func (s *SQLStore) Init(dbType string, dbSource string) *model.AppError

Init store

func (*SQLStore) IsMigrated

func (s *SQLStore) IsMigrated() bool

IsMigrated check wether the database is empty

func (*SQLStore) Migrate

func (s *SQLStore) Migrate() *model.AppError

Migrate store

func (*SQLStore) SaveCategory

func (s *SQLStore) SaveCategory(o *model.Category) *model.AppError

SaveCategory query

func (*SQLStore) SaveSoftware

func (s *SQLStore) SaveSoftware(o *model.Software) (uint64, *model.AppError)

SaveSoftware query

func (*SQLStore) SaveSoftwareCategory

func (s *SQLStore) SaveSoftwareCategory(softwareID uint64, categoryName string) *model.AppError

SaveSoftwareCategory query

func (*SQLStore) SaveSubscription

func (s *SQLStore) SaveSubscription(userID, softwareID uint64, o *model.Subscription) *model.AppError

SaveSubscription query

func (*SQLStore) SaveSubscriptionTag

func (s *SQLStore) SaveSubscriptionTag(userID, softwareID, tagID uint64) *model.AppError

SaveSubscriptionTag query

func (*SQLStore) SaveUser

func (s *SQLStore) SaveUser(o *model.User) (uint64, *model.AppError)

SaveUser query

func (*SQLStore) SaveUserTag

func (s *SQLStore) SaveUserTag(userID uint64, o *model.Tag) (uint64, *model.AppError)

SaveUserTag query

func (*SQLStore) SearchSoftwares

func (s *SQLStore) SearchSoftwares(query string) (*model.Softwares, *model.AppError)

SearchSoftwares query

func (*SQLStore) UpdateSoftware

func (s *SQLStore) UpdateSoftware(o *model.Software) *model.AppError

UpdateSoftware query

func (*SQLStore) UpdateSubscription

func (s *SQLStore) UpdateSubscription(userID, softwareID uint64, o *model.Subscription) *model.AppError

UpdateSubscription query

func (*SQLStore) UpdateUser

func (s *SQLStore) UpdateUser(o *model.User) *model.AppError

UpdateUser query

func (*SQLStore) UpdateUserTag

func (s *SQLStore) UpdateUserTag(userID uint64, o *model.Tag) *model.AppError

UpdateUserTag query

Jump to

Keyboard shortcuts

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