test

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Provider adapters.JSONProvider[Metadata] = `memory:///test`

Variables

This section is empty.

Functions

func SonarrCustomListFromIDs

func SonarrCustomListFromIDs(tb testing.TB, ids ...string) entities.CustomList

Types

type HTTPClient

type HTTPClient struct {
	Data map[string]string
}

func (*HTTPClient) Get

func (client *HTTPClient) Get(url string) (*http.Response, error)

type MemoryFS

type MemoryFS map[string][]byte

func (MemoryFS) Open

func (mfs MemoryFS) Open(path string) (fs.File, error)

type MemoryFile

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

func (*MemoryFile) Close

func (fd *MemoryFile) Close() error

func (*MemoryFile) IsDir

func (fd *MemoryFile) IsDir() bool

func (*MemoryFile) ModTime

func (fd *MemoryFile) ModTime() time.Time

func (*MemoryFile) Mode

func (fd *MemoryFile) Mode() fs.FileMode

func (*MemoryFile) Name

func (fd *MemoryFile) Name() string

func (*MemoryFile) Read

func (fd *MemoryFile) Read(b []byte) (int, error)

func (*MemoryFile) Size

func (fd *MemoryFile) Size() int64

func (*MemoryFile) Stat

func (fd *MemoryFile) Stat() (fs.FileInfo, error)

func (*MemoryFile) Sys

func (fd *MemoryFile) Sys() any

type Metadata

type Metadata struct {
	SourceID uint64 `json:"anilist_id,omitempty"`
	TargetID uint64 `json:"thetvdb_id,omitempty"`
}

func (Metadata) GetSourceID

func (metadata Metadata) GetSourceID() string

func (Metadata) GetTargetID

func (metadata Metadata) GetTargetID() string

type Tracker

type Tracker struct {
	UserIds    map[string]int
	MediaLists map[int][]entities.SourceID
}

func (*Tracker) Close

func (tracker *Tracker) Close() error

func (*Tracker) GetMediaListIDs

func (tracker *Tracker) GetMediaListIDs(ctx context.Context, userId string) ([]entities.SourceID, error)

func (*Tracker) GetUserID

func (tracker *Tracker) GetUserID(ctx context.Context, name string) (string, error)

Jump to

Keyboard shortcuts

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