Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var S3Data models.ConfigS3 = models.ConfigS3{}
Functions ¶
Types ¶
type AuthService ¶
type AuthService interface {
ReadUser() (models.User, error)
CreateUser(payload models.RegisterPayload) error
UpdateUser(payload models.User) error
ReadUserWithId(id string) (models.User, error)
UpdateOTP(user models.User) error
EnablingOTP(user models.User) error
}
func NewAuthService ¶
func NewAuthService(logger *slog.Logger, filename string) AuthService
type PublicLinkManager ¶
type PublicLinkManager interface {
CreatePublicLink(payload models.PublicLink) error
ReadPublicLinks() []models.PublicLink
UpdatePublicLink(id string, updated models.PublicLink) error
DeletePublicLink(id string) error
CheckIfRootPublic(bucket, path string) bool
CheckSecurity(bucket, path, accessKey string) models.Security
SearchPublicLinks(query string) []models.PublicLink
GetRootByLink(link string) (models.PublicLink, error)
SaveToFile() error
LoadFromFile() error
IsLinkDuplicate(link, id string) bool
}
func NewDataPublic ¶
func NewDataPublic(logger *slog.Logger, filename string) PublicLinkManager
type S3Service ¶
type S3Service interface {
IsS3ConfigEmpty() bool
InputS3Config(cfg models.ConfigS3) string
ListPageFiles(ctx context.Context, bucket string, prefix string) ([]string, []string, error)
ListBucket(ctx context.Context) ([]string, error)
GetDownloadObject(ctx context.Context, bucket string, prefix string) (string, error)
DownloadFilesAsZip(ctx context.Context, bucket, prefix string) (io.Reader, string, error)
CreateFolder(ctx context.Context, bucket, content, folderPath string) error
DeleteObject(ctx context.Context, bucket, path string) error
RenameObject(ctx context.Context, bucket, oldPath, newPath string) error
UploadFile(ctx context.Context, bucket, basePath string, file *multipart.FileHeader) error
ReadConfig(ctx context.Context) models.ConfigS3
ListFolder(ctx context.Context, bucket string, prefix string) ([]string, error)
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.