store

package
v0.0.146 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 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"
	DeleteUserPath      = userPath + "/delete"
	ChangePasswordPath  = userPath + "/change-password"
	AccountDetailsPath  = userPath + "/details"

	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"
)

Functions

This section is empty.

Types

type AccountDetails added in v0.0.143

type AccountDetails struct {
	Name                    string
	Email                   string
	CookieExpirationDate    time.Time
	UsedSpaceInBytes        int
	ProportionOfSpaceUsedUp float64
}

type AppItemDto added in v0.0.136

type AppItemDto struct {
	Id   string
	Name string
}

type AppNameString

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

type AppStoreClient

type AppStoreClient interface {
	RegisterUser(user, password, email string) error
	ValidateCode(registrationCode string) error
	Login(username, password string) error
	DeleteUser() error
	CreateApp(appName string) (string, error)
	SearchForApps(maintainerSearchTerm, appSearchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)
	ListOwnApps() ([]AppItemDto, error)
	UploadVersion(appId, versionName string, content []byte) (string, error)
	DownloadVersion(versionId string) (*Version, error)
	GetVersions(appId string) ([]LeanVersionDto, error)
	DeleteVersion(versionId string) error
	DeleteApp(appId string) error
	ChangePassword(oldPassword, newPassword string) error
	WipeData()
	Logout() error
}

type AppStoreClientImpl added in v0.0.113

type AppStoreClientImpl struct {
	Parent utils.ComponentClient
}

func (*AppStoreClientImpl) ChangePassword added in v0.0.113

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

func (*AppStoreClientImpl) CreateApp added in v0.0.113

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

func (*AppStoreClientImpl) DeleteApp added in v0.0.113

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

func (*AppStoreClientImpl) DeleteUser added in v0.0.113

func (h *AppStoreClientImpl) DeleteUser() error

func (*AppStoreClientImpl) DeleteVersion added in v0.0.113

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

func (*AppStoreClientImpl) DownloadVersion added in v0.0.113

func (h *AppStoreClientImpl) DownloadVersion(versionId string) (*Version, error)

func (*AppStoreClientImpl) GetAccountDetails added in v0.0.143

func (h *AppStoreClientImpl) GetAccountDetails() (*AccountDetails, error)

func (*AppStoreClientImpl) GetVersions added in v0.0.113

func (h *AppStoreClientImpl) GetVersions(appId string) ([]LeanVersionDto, error)

func (*AppStoreClientImpl) ListOwnApps added in v0.0.113

func (h *AppStoreClientImpl) ListOwnApps() ([]AppItemDto, error)

func (*AppStoreClientImpl) Login added in v0.0.113

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

func (*AppStoreClientImpl) Logout added in v0.0.113

func (h *AppStoreClientImpl) Logout() error

func (*AppStoreClientImpl) RegisterUser added in v0.0.113

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

func (*AppStoreClientImpl) SearchForApps added in v0.0.113

func (h *AppStoreClientImpl) SearchForApps(maintainerSearchTerm, appSearchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)

func (*AppStoreClientImpl) UploadVersion added in v0.0.113

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

func (*AppStoreClientImpl) ValidateCode added in v0.0.113

func (h *AppStoreClientImpl) ValidateCode(registrationCode string) error

func (*AppStoreClientImpl) WipeData added in v0.0.113

func (h *AppStoreClientImpl) WipeData()

type AppWithLatestVersion

type AppWithLatestVersion struct {
	Maintainer        string
	AppId             string
	AppName           string
	LatestVersionId   string
	LatestVersionName string
}

type ChangePasswordForm

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

type LeanVersionDto added in v0.0.134

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

type LoginCredentials

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

type NumberString

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

type RegistrationForm

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

type SearchRequest added in v0.0.137

type SearchRequest struct {
	MaintainerSearchTerm string `validate:"search_term"`
	AppSearchTerm        string `validate:"search_term"`
	ShowUnofficialApps   bool
}

type UserNameString

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

type Version

type Version struct {
	Id                       int
	VersionName              string
	Maintainer               string
	AppName                  string
	Content                  []byte
	VersionCreationTimestamp time.Time
}

type VersionUploadDto added in v0.0.134

type VersionUploadDto struct {
	AppId   string `validate:"number"`
	Version string `validate:"version_name"`
	Content []byte
}

Jump to

Keyboard shortcuts

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