Documentation ¶
Index ¶
- func AutoMigrate(dbc models.DatabaseConfig) error
- func ConnectMySQL(dbconfig models.DatabaseConfig, gormDebug bool) error
- func CountAccessions() int64
- func CountRepositories() int64
- func CountResources() int64
- func CountUsers() int64
- func CreateRepository(repository *models.Repository) (uint, error)
- func DeleteAccession(id uint) error
- func DeleteEntry(id uuid.UUID) error
- func DeleteRepository(id uint) error
- func DeleteResource(id uint) error
- func DeleteSessions() error
- func DeleteToken(tkn string) error
- func DeleteUser(id uint) error
- func ExpireAPITokensByUserID(userID uint) error
- func ExpireAllTokens() error
- func ExpireAppTokensByUserID(userID uint) error
- func ExpireToken(id uint) error
- func ExpireTokensByUserID(userID uint) error
- func FindAccession(id uint) (models.Accession, error)
- func FindAccessions() ([]models.Accession, error)
- func FindAccessionsByResourceID(id uint) ([]models.Accession, error)
- func FindEntries() ([]models.Entry, error)
- func FindEntriesByAccessionID(id uint) ([]models.Entry, error)
- func FindEntriesByAccessionIDPaginated(id uint, pagination Pagination) ([]models.Entry, error)
- func FindEntriesByRepositoryID(repositoryID uint) ([]models.Entry, error)
- func FindEntriesByRepositoryIDPaginated(repositoryID uint, pagination Pagination) ([]models.Entry, error)
- func FindEntriesByResourceID(id uint) ([]models.Entry, error)
- func FindEntriesByResourceIDPaginated(id uint, pagination Pagination) ([]models.Entry, error)
- func FindEntriesPaginated(pagination Pagination) ([]models.Entry, error)
- func FindEntriesSorted(numRecords int) ([]models.Entry, error)
- func FindEntry(id uuid.UUID) (models.Entry, error)
- func FindEntryByMediaIDAndCollectionID(mediaID uint, ResourceID uint) (uuid.UUID, error)
- func FindEntryIDsByAccessionID(id uint) ([]string, error)
- func FindEntryIDsByRepositoryID(repositoryID uint) ([]string, error)
- func FindEntryIDsByResourceID(id uint) ([]string, error)
- func FindEntryInResource(resourceID int, mediaID int) (string, error)
- func FindMaxMediaIDInResource(resourceID uint) int
- func FindNextMediaCollectionInResource(resourceID uint) (uint, error)
- func FindPaginatedAccessions(pagination Pagination) ([]models.Accession, error)
- func FindPaginatedEntries(pagination Pagination) ([]models.Entry, error)
- func FindPaginatedResources(pagination Pagination) ([]models.Resource, error)
- func FindRedactedUserByEmail(email string) (models.User, error)
- func FindRepositories() ([]models.Repository, error)
- func FindRepository(id uint) (models.Repository, error)
- func FindResource(id uint) (models.Resource, error)
- func FindResources() ([]models.Resource, error)
- func FindResourcesByRepositoryID(repositoryID uint) ([]models.Resource, error)
- func FindToken(token string) (models.Token, error)
- func FindTokenByID(id uint) (models.Token, error)
- func FindTokensByUserID(id uint) ([]models.Token, error)
- func FindUser(id uint) (models.User, error)
- func FindUserByEmail(email string) (models.User, error)
- func FindUserByID(id int) (models.User, error)
- func FindUserEmailByID(id int) (string, error)
- func FindUserIDByToken(token string) (uint, error)
- func FindUsers() ([]models.User, error)
- func GetCountOfEntriesInAccession(accessionID uint) int64
- func GetCountOfEntriesInDB() int64
- func GetCountOfEntriesInRepository(repositoryID uint) int64
- func GetCountOfEntriesInResource(resourceID uint) int64
- func GetDB() *gorm.DB
- func GetEntriesByDateRange(dr DateRange) ([]models.Entry, error)
- func GetEntryIDs() ([]string, error)
- func GetEntryIDsPaginated(pagination Pagination) ([]string, error)
- func GetNumberPagesInResource(resourceID uint) (int, error)
- func GetRedactedUser(id int) (models.User, error)
- func GetRepositoryMap() (map[int]string, error)
- func GetTokens() []models.Token
- func InsertAccession(accession *models.Accession) (uint, error)
- func InsertEntry(entry *models.Entry) error
- func InsertResource(resource *models.Resource) (uint, error)
- func InsertToken(apiToken *models.Token) error
- func InsertUser(user *models.User) (uint, error)
- func IsMediaIDUniqueInResource(mediaID uint, resourceID uint) (bool, error)
- func MigrateDatabase(rollback bool, dbc models.DatabaseConfig) error
- func UpdateAccession(accession *models.Accession) error
- func UpdateEntry(entry *models.Entry) error
- func UpdateRepository(repository *models.Repository) error
- func UpdateResource(resource *models.Resource) error
- func UpdateToken(apiToken *models.Token) error
- func UpdateUser(user *models.User) error
- type DateRange
- type EntryUser
- type EntryUsers
- type Pagination
- type Summaries
- type Summary
- type Totals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
func AutoMigrate(dbc models.DatabaseConfig) error
func ConnectMySQL ¶
func ConnectMySQL(dbconfig models.DatabaseConfig, gormDebug bool) error
func CountAccessions ¶
func CountAccessions() int64
func CountRepositories ¶
func CountRepositories() int64
func CountResources ¶
func CountResources() int64
func CountUsers ¶
func CountUsers() int64
func CreateRepository ¶
func CreateRepository(repository *models.Repository) (uint, error)
func DeleteAccession ¶
func DeleteEntry ¶
func DeleteRepository ¶
func DeleteResource ¶
func DeleteSessions ¶ added in v1.0.6
func DeleteSessions() error
func DeleteToken ¶ added in v1.0.6
func DeleteUser ¶
func ExpireAPITokensByUserID ¶ added in v1.0.5
func ExpireAllTokens ¶ added in v1.0.5
func ExpireAllTokens() error
func ExpireAppTokensByUserID ¶ added in v1.0.5
func ExpireToken ¶ added in v1.0.4
func ExpireTokensByUserID ¶ added in v1.0.5
func FindAccessions ¶
func FindEntries ¶
func FindEntriesByAccessionIDPaginated ¶ added in v1.0.7
func FindEntriesByAccessionIDPaginated(id uint, pagination Pagination) ([]models.Entry, error)
func FindEntriesByRepositoryID ¶ added in v1.0.5
func FindEntriesByRepositoryIDPaginated ¶ added in v1.0.5
func FindEntriesByRepositoryIDPaginated(repositoryID uint, pagination Pagination) ([]models.Entry, error)
func FindEntriesByResourceIDPaginated ¶ added in v1.0.5
func FindEntriesByResourceIDPaginated(id uint, pagination Pagination) ([]models.Entry, error)
func FindEntriesPaginated ¶ added in v1.0.5
func FindEntriesPaginated(pagination Pagination) ([]models.Entry, error)
func FindEntryIDsByAccessionID ¶ added in v1.0.5
func FindEntryIDsByRepositoryID ¶ added in v1.0.5
func FindEntryIDsByResourceID ¶ added in v1.0.5
func FindPaginatedAccessions ¶
func FindPaginatedAccessions(pagination Pagination) ([]models.Accession, error)
func FindPaginatedEntries ¶
func FindPaginatedEntries(pagination Pagination) ([]models.Entry, error)
func FindPaginatedResources ¶
func FindPaginatedResources(pagination Pagination) ([]models.Resource, error)
func FindRedactedUserByEmail ¶ added in v1.0.5
func FindRepositories ¶
func FindRepositories() ([]models.Repository, error)
func FindRepository ¶
func FindRepository(id uint) (models.Repository, error)
func FindResources ¶
func FindUserEmailByID ¶
func FindUserIDByToken ¶ added in v1.0.6
func GetCountOfEntriesInDB ¶
func GetCountOfEntriesInDB() int64
func GetCountOfEntriesInRepository ¶ added in v1.0.5
func GetEntriesByDateRange ¶ added in v1.0.8
func GetEntryIDs ¶ added in v1.0.5
func GetEntryIDsPaginated ¶ added in v1.0.5
func GetEntryIDsPaginated(pagination Pagination) ([]string, error)
func GetRepositoryMap ¶
func InsertEntry ¶
func InsertToken ¶ added in v1.0.4
func MigrateDatabase ¶
func MigrateDatabase(rollback bool, dbc models.DatabaseConfig) error
func UpdateAccession ¶
func UpdateEntry ¶
func UpdateRepository ¶
func UpdateRepository(repository *models.Repository) error
func UpdateResource ¶
func UpdateToken ¶ added in v1.0.4
func UpdateUser ¶
Types ¶
type DateRange ¶
type EntryUsers ¶
func FindEntryUsers ¶
func FindEntryUsers(createUserID int, modUserID int) (EntryUsers, error)
type Pagination ¶
type Summaries ¶
func GetSummaryByAccession ¶
func GetSummaryByDateRange ¶
func GetSummaryByRepository ¶ added in v1.0.5
func GetSummaryByResource ¶
func GetSummaryByYear ¶
Click to show internal directories.
Click to hide internal directories.