source

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModSource

type ModSource interface {
	// Identity
	ID() string
	Name() string

	// Authentication
	AuthURL() string
	ExchangeToken(ctx context.Context, code string) (*Token, error)

	// Discovery
	Search(ctx context.Context, query SearchQuery) ([]domain.Mod, error)
	GetMod(ctx context.Context, gameID, modID string) (*domain.Mod, error)
	GetDependencies(ctx context.Context, mod *domain.Mod) ([]domain.ModReference, error)

	// Downloads
	GetModFiles(ctx context.Context, mod *domain.Mod) ([]domain.DownloadableFile, error)
	GetDownloadURL(ctx context.Context, mod *domain.Mod, fileID string) (string, error)

	// Updates
	CheckUpdates(ctx context.Context, installed []domain.InstalledMod) ([]domain.Update, error)
}

ModSource is the interface for mod repositories

type Registry

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

Registry manages available mod sources

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new source registry

func (*Registry) Get

func (r *Registry) Get(id string) (ModSource, error)

Get retrieves a source by ID

func (*Registry) List

func (r *Registry) List() []ModSource

List returns all registered sources

func (*Registry) Register

func (r *Registry) Register(source ModSource)

Register adds a source to the registry

type SearchQuery

type SearchQuery struct {
	GameID   string
	Query    string
	Category string
	Page     int
	PageSize int
}

SearchQuery parameters for searching mods

type Token

type Token struct {
	AccessToken  string
	RefreshToken string
	ExpiresAt    time.Time
}

Token represents an OAuth token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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