domains

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsDomain

type AccountsDomain struct {
	// contains filtered or unexported fields
}

func NewAccountsDomain

func NewAccountsDomain(deps *dependencies.Dependencies) *AccountsDomain

func (*AccountsDomain) CheckToken

func (d *AccountsDomain) CheckToken(ctx context.Context, userJWT string) (*model.Account, error)

func (*AccountsDomain) CreateTokenForAccount

func (d *AccountsDomain) CreateTokenForAccount(account *model.Account, expiration time.Time) (string, error)

func (*AccountsDomain) GetAccountFromCredentials

func (d *AccountsDomain) GetAccountFromCredentials(ctx context.Context, username, password string) (*model.Account, error)

type ArchiverDomain

type ArchiverDomain struct {
	// contains filtered or unexported fields
}

func NewArchiverDomain

func NewArchiverDomain(deps *dependencies.Dependencies) *ArchiverDomain

func (*ArchiverDomain) DownloadBookmarkArchive

func (d *ArchiverDomain) DownloadBookmarkArchive(book model.BookmarkDTO) (*model.BookmarkDTO, error)

func (*ArchiverDomain) GetBookmarkArchive

func (d *ArchiverDomain) GetBookmarkArchive(book *model.BookmarkDTO) (*warc.Archive, error)

type BookmarksDomain

type BookmarksDomain struct {
	// contains filtered or unexported fields
}

func NewBookmarksDomain

func NewBookmarksDomain(deps *dependencies.Dependencies) *BookmarksDomain

func (*BookmarksDomain) GetBookmark

func (d *BookmarksDomain) GetBookmark(ctx context.Context, id model.DBID) (*model.BookmarkDTO, error)

func (*BookmarksDomain) HasArchive

func (d *BookmarksDomain) HasArchive(b *model.BookmarkDTO) bool

func (*BookmarksDomain) HasEbook

func (d *BookmarksDomain) HasEbook(b *model.BookmarkDTO) bool

func (*BookmarksDomain) HasThumbnail

func (d *BookmarksDomain) HasThumbnail(b *model.BookmarkDTO) bool

type JWTClaim

type JWTClaim struct {
	jwt.RegisteredClaims

	Account *model.Account
}

type StorageDomain

type StorageDomain struct {
	// contains filtered or unexported fields
}

func NewStorageDomain

func NewStorageDomain(deps *dependencies.Dependencies, fs afero.Fs) *StorageDomain

func (*StorageDomain) DirExists

func (d *StorageDomain) DirExists(name string) bool

DirExists checks if a directory exists in storage.

func (*StorageDomain) FS

func (d *StorageDomain) FS() afero.Fs

FS returns the filesystem used by this domain.

func (*StorageDomain) FileExists

func (d *StorageDomain) FileExists(name string) bool

FileExists checks if a file exists in storage.

func (*StorageDomain) Stat

func (d *StorageDomain) Stat(name string) (fs.FileInfo, error)

Stat returns the FileInfo structure describing file.

func (*StorageDomain) WriteData

func (d *StorageDomain) WriteData(dst string, data []byte) error

WriteData writes bytes data to a file in storage. CAUTION: This function will overwrite existing file.

func (*StorageDomain) WriteFile

func (d *StorageDomain) WriteFile(dst string, tmpFile *os.File) error

WriteFile writes a file to storage.

Jump to

Keyboard shortcuts

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