ngdp

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This flag is enabled if files are retrieved from local storage using the CASC format
	OptUseCASContainer = 1 << iota
	// This flag is enabled if files are retrieved over the network (if OptUseCASContainer is not set, or if the file was not retrieved from CASC)
	OptUseTACTNetwork
)

Variables

This section is empty.

Functions

func DefaultDownloader

func DefaultDownloader(url string) (io.ReadCloser, error)

Types

type Agent

type Agent struct {
	Region string
	Locale i18n.Locale
	// A base URL for the NGDP entry point
	HostServer string
	// Callback for customizing how clients connect to the CDN
	DownloadFn func(url string) (io.ReadCloser, error)
}

Agent defines the user's preferences

func DefaultAgent

func DefaultAgent() *Agent

func (*Agent) OpenOnline

func (ag *Agent) OpenOnline(programID string) (*Client, error)

OpenOnline open a remote NGDP volume using the set CDN server Without setting additional options, the client will not touch the disk and will read directly from HTTP to memory.

type BuildConfig

type BuildConfig struct {
	Root                    Hash     `ccfg:"root"`
	Install                 []Hash   `ccfg:"install"`
	InstallSize             []uint64 `ccfg:"install-size"`
	Download                []Hash   `ccfg:"download"`
	DownloadSize            []uint64 `ccfg:"download-size"`
	Size                    []Hash   `ccfg:"size"`
	SizeSize                []uint64 `ccfg:"size-size"`
	Encoding                []Hash   `ccfg:"encoding"`
	EncodingSize            []uint64 `ccfg:"encoding-size"`
	Patch                   Hash     `ccfg:"patch"`
	PatchSize               uint64   `ccfg:"patch-size"`
	PatchConfig             Hash     `ccfg:"patch-config"`
	BuildName               string   `ccfg:"build-name"`
	BuildUID                string   `ccfg:"build-uid"`
	BuildProduct            string   `ccfg:"build-product"`
	BuildPlayBuildInstaller string   `ccfg:"build-playbuild-installer"`
	BuildPartialPriority    []string `ccfg:"build-partial-priority"`
}

type CDN

type CDN struct {
	Region     string   `ccfg:"Name"`
	Path       string   `ccfg:"Path"`
	Hosts      []string `ccfg:"Hosts"`
	Servers    []string `ccfg:"Servers"`
	ConfigPath string   `ccfg:"ConfigPath"`
}

type Client

type Client struct {
	*Agent
	Opt         uint64
	Dir         string
	CDN         *CDN
	Build       Hash
	BuildConfig BuildConfig
}

func (*Client) Init

func (cl *Client) Init() error

type Hash

type Hash [16]byte

func (Hash) String

func (h Hash) String() string

type Version

type Version struct {
	Region        string
	BuildConfig   Hash
	CDNConfig     Hash
	KeyRing       Hash
	BuildId       uint32
	VersionsName  string
	ProductConfig Hash
}

Directories

Path Synopsis
Package ccfg handles CASC and NGDP config text files this package shouldn't be used for general text encoding
Package ccfg handles CASC and NGDP config text files this package shouldn't be used for general text encoding

Jump to

Keyboard shortcuts

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