Documentation
¶
Index ¶
- func NewClient(baseURL string, configs ...config) *clientImpl
- func WithHTTPClient(httpClient *http.Client) config
- type Client
- type FileClient
- func (f *FileClient) CheckForUpdates(installedVersions map[string]string) (map[string]*modmgr.ModVersion, error)
- func (f *FileClient) DeleteSharedGame(sessionID, hostKey string) error
- func (f *FileClient) GetHealthStatus() (*rest.HealthStatus, error)
- func (f *FileClient) GetJoinGameDownload(sessionID string) (*rest.JoinGameDownloadResponse, error)
- func (f *FileClient) GetLatestModVersion(modID string) (*modmgr.ModVersion, error)
- func (f *FileClient) GetMod(modID string) (*modmgr.Mod, error)
- func (f *FileClient) GetModIDs(limit int, after string, before string) ([]string, error)
- func (f *FileClient) GetModThumbnail(modID string) ([]byte, error)
- func (f *FileClient) GetModVersion(modID string, versionID string) (*modmgr.ModVersion, error)
- func (f *FileClient) GetModVersionIDs(modID string, limit int, after string) ([]string, error)
- func (f *FileClient) GetVersionInfo() (*rest.VersionInfo, error)
- func (f *FileClient) LoadData() error
- func (f *FileClient) ServerBaseURL() string
- func (f *FileClient) ShareGame(aupack []byte, room rest.RoomInfo) (*rest.ShareGameResponse, error)
- func (f *FileClient) UpdateSharedGameExpiration(sessionID, hostKey string) (*rest.ShareGameResponse, error)
- type OfflineClient
- func (c *OfflineClient) CheckForUpdates(installedVersions map[string]string) (map[string]*modmgr.ModVersion, error)
- func (c *OfflineClient) DeleteSharedGame(sessionID, hostKey string) error
- func (c *OfflineClient) GetHealthStatus() (*rest.HealthStatus, error)
- func (c *OfflineClient) GetJoinGameDownload(sessionID string) (*rest.JoinGameDownloadResponse, error)
- func (c *OfflineClient) GetLatestModVersion(modID string) (*modmgr.ModVersion, error)
- func (c *OfflineClient) GetMod(modID string) (*modmgr.Mod, error)
- func (c *OfflineClient) GetModIDs(limit int, after string, before string) ([]string, error)
- func (c *OfflineClient) GetModThumbnail(modID string) ([]byte, error)
- func (c *OfflineClient) GetModVersion(modID string, versionID string) (*modmgr.ModVersion, error)
- func (c *OfflineClient) GetModVersionIDs(modID string, limit int, after string) ([]string, error)
- func (c *OfflineClient) GetVersionInfo() (*rest.VersionInfo, error)
- func (c *OfflineClient) ServerBaseURL() string
- func (c *OfflineClient) ShareGame(aupack []byte, room rest.RoomInfo) (*rest.ShareGameResponse, error)
- func (c *OfflineClient) UpdateSharedGameExpiration(sessionID, hostKey string) (*rest.ShareGameResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHTTPClient ¶
Types ¶
type Client ¶
type Client interface {
ServerBaseURL() string
GetHealthStatus() (*rest.HealthStatus, error)
GetVersionInfo() (*rest.VersionInfo, error)
GetModIDs(limit int, after string, before string) ([]string, error)
GetMod(modID string) (*modmgr.Mod, error)
GetModVersionIDs(modID string, limit int, after string) ([]string, error)
GetModVersion(modID string, versionID string) (*modmgr.ModVersion, error)
GetLatestModVersion(modID string) (*modmgr.ModVersion, error)
GetModThumbnail(modID string) ([]byte, error)
CheckForUpdates(installedVersions map[string]string) (map[string]*modmgr.ModVersion, error)
GetJoinGameDownload(sessionID string) (*rest.JoinGameDownloadResponse, error)
}
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
func NewFileClient ¶
func NewFileClient(file string) (*FileClient, error)
func (*FileClient) CheckForUpdates ¶ added in v1.2.0
func (f *FileClient) CheckForUpdates(installedVersions map[string]string) (map[string]*modmgr.ModVersion, error)
func (*FileClient) DeleteSharedGame ¶ added in v1.6.0
func (f *FileClient) DeleteSharedGame(sessionID, hostKey string) error
func (*FileClient) GetHealthStatus ¶
func (f *FileClient) GetHealthStatus() (*rest.HealthStatus, error)
func (*FileClient) GetJoinGameDownload ¶ added in v1.6.0
func (f *FileClient) GetJoinGameDownload(sessionID string) (*rest.JoinGameDownloadResponse, error)
func (*FileClient) GetLatestModVersion ¶ added in v1.1.0
func (f *FileClient) GetLatestModVersion(modID string) (*modmgr.ModVersion, error)
func (*FileClient) GetModThumbnail ¶ added in v1.5.0
func (f *FileClient) GetModThumbnail(modID string) ([]byte, error)
func (*FileClient) GetModVersion ¶
func (f *FileClient) GetModVersion(modID string, versionID string) (*modmgr.ModVersion, error)
func (*FileClient) GetModVersionIDs ¶ added in v1.2.0
func (*FileClient) GetVersionInfo ¶ added in v1.9.1
func (f *FileClient) GetVersionInfo() (*rest.VersionInfo, error)
func (*FileClient) LoadData ¶
func (f *FileClient) LoadData() error
func (*FileClient) ServerBaseURL ¶ added in v1.6.0
func (f *FileClient) ServerBaseURL() string
func (*FileClient) ShareGame ¶ added in v1.6.0
func (f *FileClient) ShareGame(aupack []byte, room rest.RoomInfo) (*rest.ShareGameResponse, error)
func (*FileClient) UpdateSharedGameExpiration ¶ added in v1.8.1
func (f *FileClient) UpdateSharedGameExpiration(sessionID, hostKey string) (*rest.ShareGameResponse, error)
type OfflineClient ¶
type OfflineClient struct{}
func NewOfflineClient ¶
func NewOfflineClient() *OfflineClient
func (*OfflineClient) CheckForUpdates ¶ added in v1.2.0
func (c *OfflineClient) CheckForUpdates(installedVersions map[string]string) (map[string]*modmgr.ModVersion, error)
func (*OfflineClient) DeleteSharedGame ¶ added in v1.6.0
func (c *OfflineClient) DeleteSharedGame(sessionID, hostKey string) error
func (*OfflineClient) GetHealthStatus ¶
func (c *OfflineClient) GetHealthStatus() (*rest.HealthStatus, error)
func (*OfflineClient) GetJoinGameDownload ¶ added in v1.6.0
func (c *OfflineClient) GetJoinGameDownload(sessionID string) (*rest.JoinGameDownloadResponse, error)
func (*OfflineClient) GetLatestModVersion ¶ added in v1.1.0
func (c *OfflineClient) GetLatestModVersion(modID string) (*modmgr.ModVersion, error)
func (*OfflineClient) GetModThumbnail ¶ added in v1.5.0
func (c *OfflineClient) GetModThumbnail(modID string) ([]byte, error)
func (*OfflineClient) GetModVersion ¶
func (c *OfflineClient) GetModVersion(modID string, versionID string) (*modmgr.ModVersion, error)
func (*OfflineClient) GetModVersionIDs ¶ added in v1.2.0
func (*OfflineClient) GetVersionInfo ¶ added in v1.9.1
func (c *OfflineClient) GetVersionInfo() (*rest.VersionInfo, error)
func (*OfflineClient) ServerBaseURL ¶ added in v1.6.0
func (c *OfflineClient) ServerBaseURL() string
func (*OfflineClient) ShareGame ¶ added in v1.6.0
func (c *OfflineClient) ShareGame(aupack []byte, room rest.RoomInfo) (*rest.ShareGameResponse, error)
func (*OfflineClient) UpdateSharedGameExpiration ¶ added in v1.8.1
func (c *OfflineClient) UpdateSharedGameExpiration(sessionID, hostKey string) (*rest.ShareGameResponse, error)
Click to show internal directories.
Click to hide internal directories.