Backend: Run "make fmt" with Go v1.19
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
33f2c6bbf0
commit
b072a18a17
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -20,7 +19,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package main
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package acl provides access control lists for authorization checking of user actions.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package acl
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ const (
|
|||
// GET /api/v1/accounts/:id
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// id: string Account ID as returned by the API
|
||||
func GetAccount(router *gin.RouterGroup) {
|
||||
router.GET("/accounts/:id", func(c *gin.Context) {
|
||||
|
@ -63,6 +64,7 @@ func GetAccount(router *gin.RouterGroup) {
|
|||
// GET /api/v1/accounts/:id/folders
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// id: string Account ID as returned by the API
|
||||
func GetAccountFolders(router *gin.RouterGroup) {
|
||||
router.GET("/accounts/:id/folders", func(c *gin.Context) {
|
||||
|
@ -121,6 +123,7 @@ func GetAccountFolders(router *gin.RouterGroup) {
|
|||
// GET /api/v1/accounts/:id/share
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// id: string Account ID as returned by the API
|
||||
func ShareWithAccount(router *gin.RouterGroup) {
|
||||
router.POST("/accounts/:id/share", func(c *gin.Context) {
|
||||
|
@ -230,6 +233,7 @@ func CreateAccount(router *gin.RouterGroup) {
|
|||
// PUT /api/v1/accounts/:id
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// id: string Account ID as returned by the API
|
||||
func UpdateAccount(router *gin.RouterGroup) {
|
||||
router.PUT("/accounts/:id", func(c *gin.Context) {
|
||||
|
@ -301,6 +305,7 @@ func UpdateAccount(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/accounts/:id
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// id: string Account ID as returned by the API
|
||||
func DeleteAccount(router *gin.RouterGroup) {
|
||||
router.DELETE("/accounts/:id", func(c *gin.Context) {
|
||||
|
|
|
@ -239,6 +239,7 @@ func DeleteAlbum(router *gin.RouterGroup) {
|
|||
// POST /api/v1/albums/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Album UID
|
||||
func LikeAlbum(router *gin.RouterGroup) {
|
||||
router.POST("/albums/:uid/like", func(c *gin.Context) {
|
||||
|
@ -277,6 +278,7 @@ func LikeAlbum(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/albums/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Album UID
|
||||
func DislikeAlbum(router *gin.RouterGroup) {
|
||||
router.DELETE("/albums/:uid/like", func(c *gin.Context) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package api provides REST API request handlers.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package api
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ const (
|
|||
// GET /api/v1/albums/:uid/t/:token/:size
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string album uid
|
||||
// token: string security token (see config)
|
||||
// size: string thumb type, see photoprism.ThumbnailTypes
|
||||
|
@ -138,6 +139,7 @@ func AlbumCover(router *gin.RouterGroup) {
|
|||
// GET /api/v1/labels/:uid/t/:token/:size
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string label uid
|
||||
// token: string security token (see config)
|
||||
// size: string thumb type, see photoprism.ThumbnailTypes
|
||||
|
|
|
@ -37,6 +37,7 @@ func DownloadName(c *gin.Context) entity.DownloadName {
|
|||
// GET /api/v1/dl/:hash
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// hash: string The file hash as returned by the files/photos endpoint
|
||||
func GetDownload(router *gin.RouterGroup) {
|
||||
router.GET("/dl/:hash", func(c *gin.Context) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import (
|
|||
// DELETE /api/v1/photos/:uid/files/:file_uid
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Photo UID as returned by the API
|
||||
// file_uid: string File UID as returned by the API
|
||||
func DeleteFile(router *gin.RouterGroup) {
|
||||
|
|
|
@ -24,6 +24,7 @@ const (
|
|||
// GET /api/v1/folders/t/:hash/:token/:size
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string folder uid
|
||||
// token: string url security token, see config
|
||||
// size: string thumb type, see thumb.Sizes
|
||||
|
|
|
@ -59,6 +59,7 @@ func UpdateLabel(router *gin.RouterGroup) {
|
|||
// POST /api/v1/labels/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Label UID
|
||||
func LikeLabel(router *gin.RouterGroup) {
|
||||
router.POST("/labels/:uid/like", func(c *gin.Context) {
|
||||
|
@ -99,6 +100,7 @@ func LikeLabel(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/labels/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Label UID
|
||||
func DislikeLabel(router *gin.RouterGroup) {
|
||||
router.DELETE("/labels/:uid/like", func(c *gin.Context) {
|
||||
|
|
|
@ -223,7 +223,7 @@ func TestUpdatePhotoLink(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO Fully assert once functionality exists
|
||||
// TODO Fully assert once functionality exists
|
||||
func TestDeletePhotoLink(t *testing.T) {
|
||||
app, router, _ := NewApiTest()
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ func findFileMarker(c *gin.Context) (file *entity.File, marker *entity.Marker, e
|
|||
// PUT /api/v1/markers/:marker_uid
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Photo UID as returned by the API
|
||||
// file_uid: string File UID as returned by the API
|
||||
// id: int Marker ID as returned by the API
|
||||
|
@ -157,6 +158,7 @@ func UpdateMarker(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/markers/:marker_uid/subject
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Photo UID as returned by the API
|
||||
// file_uid: string File UID as returned by the API
|
||||
// id: int Marker ID as returned by the API
|
||||
|
|
|
@ -162,6 +162,7 @@ func GetPhotoDownload(router *gin.RouterGroup) {
|
|||
// GET /api/v1/photos/:uid/yaml
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
func GetPhotoYaml(router *gin.RouterGroup) {
|
||||
router.GET("/photos/:uid/yaml", func(c *gin.Context) {
|
||||
|
@ -197,6 +198,7 @@ func GetPhotoYaml(router *gin.RouterGroup) {
|
|||
// POST /api/v1/photos/:uid/approve
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
func ApprovePhoto(router *gin.RouterGroup) {
|
||||
router.POST("/photos/:uid/approve", func(c *gin.Context) {
|
||||
|
@ -232,6 +234,7 @@ func ApprovePhoto(router *gin.RouterGroup) {
|
|||
// POST /api/v1/photos/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
func LikePhoto(router *gin.RouterGroup) {
|
||||
router.POST("/photos/:uid/like", func(c *gin.Context) {
|
||||
|
@ -267,6 +270,7 @@ func LikePhoto(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/photos/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
func DislikePhoto(router *gin.RouterGroup) {
|
||||
router.DELETE("/photos/:uid/like", func(c *gin.Context) {
|
||||
|
@ -302,6 +306,7 @@ func DislikePhoto(router *gin.RouterGroup) {
|
|||
// POST /api/v1/photos/:uid/files/:file_uid/primary
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
// file_uid: string File UID as returned by the API
|
||||
func PhotoPrimary(router *gin.RouterGroup) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import (
|
|||
// POST /api/v1/photos/:uid/label
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
func AddPhotoLabel(router *gin.RouterGroup) {
|
||||
router.POST("/photos/:uid/label", func(c *gin.Context) {
|
||||
|
@ -93,6 +94,7 @@ func AddPhotoLabel(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/photos/:uid/label/:id
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
// id: int LabelId as returned by the API
|
||||
func RemovePhotoLabel(router *gin.RouterGroup) {
|
||||
|
@ -157,6 +159,7 @@ func RemovePhotoLabel(router *gin.RouterGroup) {
|
|||
// PUT /api/v1/photos/:uid/label/:id
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string PhotoUID as returned by the API
|
||||
// id: int LabelId as returned by the API
|
||||
func UpdatePhotoLabel(router *gin.RouterGroup) {
|
||||
|
|
|
@ -22,6 +22,7 @@ import (
|
|||
// POST /api/v1/photos/:uid/files/:file_uid/unstack
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Photo UID as returned by the API
|
||||
// file_uid: string File UID as returned by the API
|
||||
func PhotoUnstack(router *gin.RouterGroup) {
|
||||
|
|
|
@ -99,6 +99,7 @@ func UpdateSubject(router *gin.RouterGroup) {
|
|||
// POST /api/v1/subjects/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Subject UID
|
||||
func LikeSubject(router *gin.RouterGroup) {
|
||||
router.POST("/subjects/:uid/like", func(c *gin.Context) {
|
||||
|
@ -133,6 +134,7 @@ func LikeSubject(router *gin.RouterGroup) {
|
|||
// DELETE /api/v1/subjects/:uid/like
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// uid: string Subject UID
|
||||
func DislikeSubject(router *gin.RouterGroup) {
|
||||
router.DELETE("/subjects/:uid/like", func(c *gin.Context) {
|
||||
|
|
|
@ -21,6 +21,7 @@ import (
|
|||
// GET /api/v1/t/:thumb/:token/:size
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// thumb: string sha1 file hash plus optional crop area
|
||||
// token: string url security token, see config
|
||||
// size: string thumb type, see thumb.Sizes
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
// GET /api/v1/videos/:hash/:token/:type
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// hash: string The photo or video file hash as returned by the search API
|
||||
// type: string Video format
|
||||
func GetVideo(router *gin.RouterGroup) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package auto provides workers for background indexing and import operations.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package auto
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package classify encapsulates image classification using TensorFlow.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package classify
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package commands provides photoprism CLI (sub-)commands.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package commands
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package config provides global options, command-line flags, and user settings.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package config
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package crop provides image crop data structures and helpers.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package crop
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ func TestAccount_Update(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestAccount_Save(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
account := Account{AccName: "DeleteAccount", AccOwner: "Delete", AccURL: "test.com", AccType: "test", AccKey: "123", AccUser: "testuser", AccPass: "testpass",
|
||||
|
|
|
@ -143,7 +143,7 @@ func TestNewDetails(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestDetails_Create(t *testing.T) {
|
||||
t.Run("error", func(t *testing.T) {
|
||||
details := Details{PhotoID: 0}
|
||||
|
@ -161,7 +161,7 @@ func TestDetails_Create(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestDetails_Save(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
details := Details{PhotoID: 123678955432, UpdatedAt: time.Date(2020, 2, 1, 0, 0, 0, 0, time.UTC)}
|
||||
|
|
|
@ -245,7 +245,7 @@ func TestMarker_InvalidArea(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestMarker_Save(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
m := NewMarker(FileFixtures.Get("exampleFileName.jpg"), testArea, "lt9k3pw1wowuy3c4", SrcImage, MarkerLabel, 100, 65)
|
||||
|
|
|
@ -43,7 +43,7 @@ func TestPassword_InvalidPasswordPassword(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestPassword_Create(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
p := Password{}
|
||||
|
|
|
@ -57,7 +57,7 @@ func TestFirstOrCreatePhotoAlbum(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestPhotoAlbum_Save(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
p := PhotoAlbum{}
|
||||
|
|
|
@ -214,7 +214,7 @@ func TestSubject_Update(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
//TODO fails on mariadb
|
||||
// TODO fails on mariadb
|
||||
func TestSubject_Updates(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
m := NewSubject("Update Me", SubjPerson, SrcAuto)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package event provides a publish-subscribe event hub and a global logger.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package event
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package face provides face recognition.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package face
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package ffmpeg provides FFmpeg video transcoding related types and functions.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package ffmpeg
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package form contains tagged structs for input value validation.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package form
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package hub provides privacy-preserving reverse geocoding and other backend services.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package hub
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package places provides global location information to enrich metadata with location details.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package places
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package i18n provides translatable notification and error messages.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package i18n
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package maps provides a location lookup abstraction including a normalized list of countries.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package maps
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package meta provides XMP and Exif metadata parsing and normalization.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package meta
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package migrate provides database schema migrations.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package migrate
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package mutex provides concurrency control for index workers and database operations.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package mutex
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package nsfw provides detection of images that are "not safe for work" based on various categories.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package nsfw
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package photoprism provides the core functionality of PhotoPrism®.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package photoprism
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
//TODO find duplicates
|
||||
// TODO find duplicates
|
||||
func TestDuplicates(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
if files, err := Duplicates(10, 0, ""); err != nil {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
//TODO test non empty case
|
||||
// TODO test non empty case
|
||||
func TestErrors(t *testing.T) {
|
||||
t.Run("not existing", func(t *testing.T) {
|
||||
errors, err := Errors(1000, 0, "notexistingErrorString")
|
||||
|
|
|
@ -88,7 +88,7 @@ func TestOrphanPhotos(t *testing.T) {
|
|||
assert.IsType(t, entity.Photos{}, result)
|
||||
}
|
||||
|
||||
//TODO How to verify?
|
||||
// TODO How to verify?
|
||||
func TestFixPrimaries(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
err := FixPrimaries()
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package query provides frequently used database queries for use in commands and API.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package query
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package remote provides detection of remote services for file sharing and synchronization.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package remote
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package webdav provides WebDAV file sharing and synchronization.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package webdav
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package search provides search queries to find photos, albums, labels, and subjects.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package search
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package server provides REST and web server routing, request handling and logging.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package server
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package service provides a registry for common services.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package service
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package session provides session storage and management.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package session
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package thumb provides JPEG resampling and thumbnail generation.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package thumb
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package viewer provides photo viewer data structures and utility functions.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package viewer
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package workers provides index, sync, and metadata optimization background workers.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package workers
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package capture provides profiling functions for testing and debugging.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package capture
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package clean provides validation, sanitation, and normalization of input values.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package clean
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package colors provides types and functions for color classification.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package colors
|
||||
|
||||
|
|
2
pkg/env/env.go
vendored
2
pkg/env/env.go
vendored
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package env provides runtime environment information.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package env
|
||||
|
|
|
@ -40,12 +40,12 @@ var ErrSkipFiles = errors.New("fastwalk: skip remaining files in directory")
|
|||
// If fastWalk returns filepath.SkipDir, the directory is skipped.
|
||||
//
|
||||
// Unlike filepath.Walk:
|
||||
// * file stat calls must be done by the user.
|
||||
// - file stat calls must be done by the user.
|
||||
// The only provided metadata is the file type, which does not include
|
||||
// any permission bits.
|
||||
// * multiple goroutines stat the filesystem concurrently. The provided
|
||||
// - multiple goroutines stat the filesystem concurrently. The provided
|
||||
// walkFn must be safe for concurrent use.
|
||||
// * fastWalk can follow symlinks if walkFn returns the TraverseLink
|
||||
// - fastWalk can follow symlinks if walkFn returns the TraverseLink
|
||||
// sentinel error. It is the walkFn's responsibility to prevent
|
||||
// fastWalk from going into symlink cycles.
|
||||
func Walk(root string, walkFn func(path string, typ os.FileMode) error) error {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package fs provides filesystem related constants and functions.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package fs
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package geo provides earth geometry functions and constants.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package geo
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package list provides a string slice abstraction.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package list
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package media provides general content types and maps them to file formats.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package media
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package pluscode provides an abstraction for Google's Open Location Code package.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package pluscode
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package projection provides visual projection types and methods.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package projection
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package report provides rendering of report results, for example as Markdown.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package report
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package rnd provides random token generation and validation.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package rnd
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package s2 encapsulates Google's S2 library.
|
||||
|
||||
See https://s2geometry.io/
|
||||
|
@ -24,7 +23,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package s2
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package txt provides text and linguistics related functionality.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,7 +21,6 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package txt
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
|
||||
Package video provides video file related types and functions.
|
||||
|
||||
Copyright (c) 2018 - 2022 PhotoPrism UG. All rights reserved.
|
||||
|
@ -22,6 +21,5 @@ want to support our work, or just want to say hello.
|
|||
|
||||
Additional information can be found in our Developer Guide:
|
||||
<https://docs.photoprism.app/developer-guide/>
|
||||
|
||||
*/
|
||||
package video
|
||||
|
|
Loading…
Reference in a new issue