mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Moved everything out of internal
This commit is contained in:
19
api/urlbuilders/gallery.go
Normal file
19
api/urlbuilders/gallery.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package urlbuilders
|
||||
|
||||
import "strconv"
|
||||
|
||||
type galleryURLBuilder struct {
|
||||
BaseURL string
|
||||
GalleryID string
|
||||
}
|
||||
|
||||
func NewGalleryURLBuilder(baseURL string, galleryID int) galleryURLBuilder {
|
||||
return galleryURLBuilder{
|
||||
BaseURL: baseURL,
|
||||
GalleryID: strconv.Itoa(galleryID),
|
||||
}
|
||||
}
|
||||
|
||||
func (b galleryURLBuilder) GetGalleryImageUrl(fileIndex int) string {
|
||||
return b.BaseURL + "/gallery/" + b.GalleryID + "/" + strconv.Itoa(fileIndex)
|
||||
}
|
||||
Reference in New Issue
Block a user