store

package
v0.0.108 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: 0BSD Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApiPrefix    = "/api"
	WipeDataPath = ApiPrefix + "/wipe-data"

	RegistrationPath    = userPath + "/registration"
	EmailValidationPath = userPath + "/validate"
	LoginPath           = userPath + "/login"
	LogoutPath          = userPath + "/logout"
	AuthCheckPath       = userPath + "/auth-check"
	DeleteUserPath      = userPath + "/delete"
	ChangePasswordPath  = userPath + "/change-password"

	VersionPath       = ApiPrefix + "/versions"
	VersionUploadPath = VersionPath + "/upload"
	VersionDeletePath = VersionPath + "/delete"
	GetVersionsPath   = VersionPath + "/list"
	DownloadPath      = VersionPath + "/download"

	AppPath         = ApiPrefix + "/apps"
	AppCreationPath = AppPath + "/create"
	AppGetListPath  = AppPath + "/get-list"
	AppDeletePath   = AppPath + "/delete"
	SearchAppsPath  = AppPath + "/search"

	DefaultValidationCode = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
)

Functions

This section is empty.

Types

type App

type App struct {
	Maintainer string `json:"user"`
	Name       string `json:"name"`
	Id         string `json:"id"`
}

type AppNameString

type AppNameString struct {
	Value string `json:"value" validate:"app_name"`
}

type AppSearchRequest

type AppSearchRequest struct {
	SearchTerm         string `json:"search_term" validate:"search_term"`
	ShowUnofficialApps bool   `json:"show_unofficial_apps"`
}

type AppStoreClient

type AppStoreClient struct {
	Parent utils.ComponentClient
}

func (*AppStoreClient) ChangePassword

func (h *AppStoreClient) ChangePassword(oldPassword, newPassword string) error

func (*AppStoreClient) CheckAuth

func (h *AppStoreClient) CheckAuth() error

func (*AppStoreClient) CreateApp

func (h *AppStoreClient) CreateApp(appName string) (string, error)

func (*AppStoreClient) DeleteApp

func (h *AppStoreClient) DeleteApp(appId string) error

func (*AppStoreClient) DeleteUser

func (h *AppStoreClient) DeleteUser() error

func (*AppStoreClient) DeleteVersion

func (h *AppStoreClient) DeleteVersion(versionId string) error

func (*AppStoreClient) DownloadVersion

func (h *AppStoreClient) DownloadVersion(versionId string) (*FullVersionInfo, error)

func (*AppStoreClient) GetVersions

func (h *AppStoreClient) GetVersions(appId string) ([]Version, error)

func (*AppStoreClient) ListOwnApps

func (h *AppStoreClient) ListOwnApps() ([]App, error)

func (*AppStoreClient) Login

func (h *AppStoreClient) Login(username, password string) error

func (*AppStoreClient) Logout

func (h *AppStoreClient) Logout() error

func (*AppStoreClient) RegisterAndValidateUser

func (h *AppStoreClient) RegisterAndValidateUser(user, password, email string) error

func (*AppStoreClient) RegisterUser

func (h *AppStoreClient) RegisterUser(user, password, email string) error

func (*AppStoreClient) SearchForApps

func (h *AppStoreClient) SearchForApps(searchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)

func (*AppStoreClient) UploadVersion

func (h *AppStoreClient) UploadVersion(appId, versionName string, content []byte) (string, error)

func (*AppStoreClient) ValidateCode

func (h *AppStoreClient) ValidateCode() error

func (*AppStoreClient) WipeData

func (h *AppStoreClient) WipeData()

type AppWithLatestVersion

type AppWithLatestVersion struct {
	Maintainer        string `json:"maintainer"`
	AppId             string `json:"app_id"`
	AppName           string `json:"app_name"`
	LatestVersionId   string `json:"latest_version_id"`
	LatestVersionName string `json:"latest_version_name"`
}

type ChangePasswordForm

type ChangePasswordForm struct {
	OldPassword string `json:"old_password" validate:"password"`
	NewPassword string `json:"new_password" validate:"password"`
}

type FullVersionInfo

type FullVersionInfo struct {
	Id                       int       `json:"id"`
	VersionName              string    `json:"version_name"`
	Maintainer               string    `json:"maintainer"`
	AppName                  string    `json:"app_name"`
	Content                  []byte    `json:"content"`
	VersionCreationTimestamp time.Time `json:"version_creation_timestamp"`
}

type LoginCredentials

type LoginCredentials struct {
	User     string `json:"user" validate:"user_name"`
	Password string `json:"password" validate:"password"`
}

type NumberString

type NumberString struct {
	Value string `json:"value" validate:"number"`
}

type RegistrationForm

type RegistrationForm struct {
	User     string `json:"user" validate:"user_name"`
	Password string `json:"password" validate:"password"`
	Email    string `json:"email" validate:"email"`
}

type UserNameString

type UserNameString struct {
	Value string `json:"value" validate:"number"`
}

type Version

type Version struct {
	Name              string    `json:"name"`
	Id                string    `json:"id"`
	CreationTimestamp time.Time `json:"creation_timestamp"`
}

type VersionUpload

type VersionUpload struct {
	AppId   string `json:"appId" validate:"number"`
	Version string `json:"version" validate:"version_name"`
	Content []byte `json:"content"`
}

Jump to

Keyboard shortcuts

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