api

package
v1.2.1-0...-1897428 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalMods

func GetGlobalMods(w http.ResponseWriter, r *http.Request)

GetGlobalMods returns all available mods

func GetLocalMods

func GetLocalMods(w http.ResponseWriter, r *http.Request)

GetLocalMods returns all installed mods

func Install

func Install(w http.ResponseWriter, r *http.Request)

Install a mod via api request

func Uninstall

func Uninstall(w http.ResponseWriter, r *http.Request)

Uninstall a mod via api request

func Update

func Update(w http.ResponseWriter, r *http.Request)

Update a mod via api request

Types

type GlobalModsResponse

type GlobalModsResponse struct {
	Success bool                                    `json:"success"`
	Message string                                  `json:"message,omitempty"`
	Mods    map[string]ccmodupdater.PackageMetadata `json:"mods"`
}

GlobalModsResponse contains a list of available mods

type InstallRequest

type InstallRequest struct {
	Game  *string  `json:"game"`
	Names []string `json:"names"`
}

InstallRequest for incoming installation requests

type InstallResponse

type InstallResponse struct {
	Success bool            `json:"success"`
	Message string          `json:"message,omitempty"`
	Stats   *internal.Stats `json:"stats,omitempty"`
}

InstallResponse for installation requests

type LocalModsRequest

type LocalModsRequest struct {
	Game *string `json:"game"`
}

LocalModsRequest for incoming installed mod list requests

type LocalModsResponse

type LocalModsResponse struct {
	Success bool                           `json:"success"`
	Message string                         `json:"message,omitempty"`
	Mods    []ccmodupdater.PackageMetadata `json:"mods"`
}

LocalModsResponse contains a list of installed mods

type UninstallRequest

type UninstallRequest struct {
	Game  *string  `json:"game"`
	Names []string `json:"names"`
}

UninstallRequest for incoming uninstallation requests

type UninstallResponse

type UninstallResponse struct {
	Success bool            `json:"success"`
	Message string          `json:"message,omitempty"`
	Stats   *internal.Stats `json:"stats,omitempty"`
}

UninstallResponse for uninstallation requests

type UpdateRequest

type UpdateRequest struct {
	Game  *string  `json:"game"`
	Names []string `json:"names"`
}

UpdateRequest for incoming update requests

type UpdateResponse

type UpdateResponse struct {
	Success bool            `json:"success"`
	Message string          `json:"message,omitempty"`
	Stats   *internal.Stats `json:"stats,omitempty"`
}

UpdateResponse for update requests

Jump to

Keyboard shortcuts

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