Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeMaintainerPublicKeyPayload(maintainer string, publicKeyRaw []byte) ([]byte, error)
- func SignMaintainerPublicKey(privateKey ed25519.PrivateKey, maintainer string, publicKeyRaw []byte) ([]byte, error)
- func VerifyMaintainerPublicKeySignature(adminPublicKey ed25519.PublicKey, record *MaintainerPublicKeyRecord) (bool, error)
- type AccountDetails
- type AdminEmailRequest
- type AdminEmailSendFailure
- type AdminEmailSendResult
- type AdminMaintainer
- type AdminMaintainerCreateForm
- type AdminMaintainerStorageLimitForm
- type AppNameString
- type AppStoreClient
- type AppStoreClientImpl
- func (h *AppStoreClientImpl) ChangeEmail(email string) error
- func (h *AppStoreClientImpl) ChangePassword(oldPassword, newPassword string) error
- func (h *AppStoreClientImpl) CreateApp(appName string) error
- func (h *AppStoreClientImpl) CreateMaintainerByAdmin(name, email string, publicKeyRaw, publicKeySignature []byte) error
- func (h *AppStoreClientImpl) DeleteApp(appName string) error
- func (h *AppStoreClientImpl) DeleteMaintainerByAdmin(name string) error
- func (h *AppStoreClientImpl) DeleteOwnAccount() error
- func (h *AppStoreClientImpl) DeleteVersionByID(versionId int) error
- func (h *AppStoreClientImpl) DownloadNextVersionForUpdate(userName, appName string, currentVersionCreationTimestamp time.Time) (*NextVersionForUpdateResponse, error)
- func (h *AppStoreClientImpl) DownloadVersionByID(versionId int) (*Version, error)
- func (h *AppStoreClientImpl) GetAccountDetails() (*AccountDetails, error)
- func (h *AppStoreClientImpl) GetEmailConfig() (*u.EmailConfig, error)
- func (h *AppStoreClientImpl) GetMaintainerPublicKeyRecord(maintainer string) (*MaintainerPublicKeyRecord, error)
- func (h *AppStoreClientImpl) ListMaintainersByAdmin() ([]AdminMaintainer, error)
- func (h *AppStoreClientImpl) ListOwnApps() ([]string, error)
- func (h *AppStoreClientImpl) ListVersions(userName, appName string) ([]LeanVersionDto, error)
- func (h *AppStoreClientImpl) Login(username, password string) error
- func (h *AppStoreClientImpl) Logout() error
- func (h *AppStoreClientImpl) SearchForApps(maintainerSearchTerm, appSearchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)
- func (h *AppStoreClientImpl) SendEmailToMaintainersByAdmin(subject, body string) (*AdminEmailSendResult, error)
- func (h *AppStoreClientImpl) SendTestEmailByAdmin(subject, body string) (*AdminEmailSendResult, error)
- func (h *AppStoreClientImpl) SetEmailConfig(emailConfig *u.EmailConfig) error
- func (h *AppStoreClientImpl) SetMaintainerStorageLimitByAdmin(name string, storageLimitInBytes int64) error
- func (h *AppStoreClientImpl) SetVersionMigrationCheckpoint(versionId int, isMigrationCheckpoint bool) error
- func (h *AppStoreClientImpl) SetupInitialPassword(setupToken, password string) error
- func (h *AppStoreClientImpl) UploadVersionAndReturnCreatedVersion(appName, versionName string, creationTimestamp time.Time, ...) (*CreatedVersionResponse, error)
- func (s *AppStoreClientImpl) WipeData()
- type AppTree
- type AppWithLatestVersion
- type ChangePasswordForm
- type CreatedVersionResponse
- type EmailString
- type LeanVersionDto
- type LoginCredentials
- type MaintainerNameString
- type MaintainerPublicKeyRecord
- type NextVersionForUpdateRequest
- type NextVersionForUpdateResponse
- type NumberString
- type SearchRequest
- type SecretString
- type SetupInitialPasswordForm
- type UserNameString
- type Version
- type VersionID
- type VersionMigrationCheckpointRequest
- type VersionSigningCodec
- type VersionSigningCodecImpl
- type VersionSigningService
- type VersionSigningServiceImpl
- type VersionTree
- type VersionUploadDto
Constants ¶
View Source
const VersionContentAlreadyExists = "version content already exists"
Variables ¶
View Source
var ( AppStoreOfficialMaintainerPublicKeyOpenSSH = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKlo+3ABMOUtj4JSvbYVnIDhCqrxkiMvleXudu9Lwc87" ApiPrefix = "/api" WipeDataPath = ApiPrefix + "/wipe-data" LoginPath = userPath + "/login" LogoutPath = userPath + "/logout" DeleteUserPath = userPath + "/delete" ChangePasswordPath = userPath + "/change-password" AccountDetailsPath = userPath + "/details" SetupInitialPasswordPath = userPath + "/setup-password" EmailChangePath = userPath + "/email-change" VersionPath = ApiPrefix + "/versions" VersionUploadPath = VersionPath + "/upload" VersionDeletePath = VersionPath + "/delete" GetVersionsPath = VersionPath + "/list" DownloadPath = VersionPath + "/download" DownloadByIDPath = VersionPath + "/download-by-id" DownloadNextVersionForUpdatePath = VersionPath + "/download-next-for-update" VersionMigrationCheckpointPath = VersionPath + "/migration-checkpoint" AppPath = ApiPrefix + "/apps" AppCreationPath = AppPath + "/create" AppGetListPath = AppPath + "/get-list" AppDeletePath = AppPath + "/delete" SearchAppsPath = AppPath + "/search" EmailConfigPath = ApiPrefix + "/email-config" EmailConfigReadPath = EmailConfigPath + "/read" EmailConfigWritePath = EmailConfigPath + "/write" AdminEmailPath = ApiPrefix + "/admin/email" AdminEmailTestPath = AdminEmailPath + "/test" AdminEmailMaintainersPath = AdminEmailPath + "/maintainers" MaintainerPublicKeyPath = ApiPrefix + "/maintainers/public-key" AdminMaintainerPath = ApiPrefix + "/admin/maintainers" AdminMaintainerCreatePath = AdminMaintainerPath + "/create" AdminMaintainerListPath = AdminMaintainerPath + "/list" AdminMaintainerDeletePath = AdminMaintainerPath + "/delete" AdminMaintainerSetSpacePath = AdminMaintainerPath + "/set-space" )
Functions ¶
func EncodeMaintainerPublicKeyPayload ¶ added in v1.3.8
func SignMaintainerPublicKey ¶ added in v1.3.8
func VerifyMaintainerPublicKeySignature ¶ added in v1.3.8
func VerifyMaintainerPublicKeySignature(adminPublicKey ed25519.PublicKey, record *MaintainerPublicKeyRecord) (bool, error)
Types ¶
type AccountDetails ¶
type AdminEmailRequest ¶ added in v1.3.8
type AdminEmailSendFailure ¶ added in v1.3.8
type AdminEmailSendResult ¶ added in v1.3.8
type AdminEmailSendResult struct {
SentCount int
FailedCount int
Failures []AdminEmailSendFailure
}
type AdminMaintainer ¶ added in v1.3.19
type AdminMaintainerCreateForm ¶ added in v1.3.8
type AdminMaintainerStorageLimitForm ¶ added in v1.3.19
type AppNameString ¶
type AppNameString struct {
Value string `json:"value" validate:"default"`
}
type AppStoreClient ¶
type AppStoreClient interface {
Login(username, password string) error
DeleteOwnAccount() error
CreateApp(appName string) error
SearchForApps(maintainerSearchTerm, appSearchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)
ListOwnApps() ([]string, error)
UploadVersionAndReturnCreatedVersion(appName, versionName string, creationTimestamp time.Time, content, signature []byte) (*CreatedVersionResponse, error)
DownloadVersionByID(versionId int) (*Version, error)
DownloadNextVersionForUpdate(userName, appName string, currentVersionCreationTimestamp time.Time) (*NextVersionForUpdateResponse, error)
ListVersions(userName, appName string) ([]LeanVersionDto, error)
DeleteVersionByID(versionId int) error
SetVersionMigrationCheckpoint(versionId int, isMigrationCheckpoint bool) error
DeleteApp(appName string) error
ChangePassword(oldPassword, newPassword string) error
Logout() error
GetAccountDetails() (*AccountDetails, error)
GetEmailConfig() (*u.EmailConfig, error)
SetEmailConfig(emailConfig *u.EmailConfig) error
ChangeEmail(email string) error
CreateMaintainerByAdmin(name, email string, publicKeyRaw, publicKeySignature []byte) error
ListMaintainersByAdmin() ([]AdminMaintainer, error)
DeleteMaintainerByAdmin(name string) error
SetMaintainerStorageLimitByAdmin(name string, storageLimitInBytes int64) error
GetMaintainerPublicKeyRecord(maintainer string) (*MaintainerPublicKeyRecord, error)
SetupInitialPassword(setupToken, password string) error
SendTestEmailByAdmin(subject, body string) (*AdminEmailSendResult, error)
SendEmailToMaintainersByAdmin(subject, body string) (*AdminEmailSendResult, error)
}
type AppStoreClientImpl ¶
type AppStoreClientImpl struct {
Parent u.ComponentClient
}
func (*AppStoreClientImpl) ChangeEmail ¶ added in v1.3.8
func (h *AppStoreClientImpl) ChangeEmail(email string) error
func (*AppStoreClientImpl) ChangePassword ¶
func (h *AppStoreClientImpl) ChangePassword(oldPassword, newPassword string) error
func (*AppStoreClientImpl) CreateApp ¶
func (h *AppStoreClientImpl) CreateApp(appName string) error
func (*AppStoreClientImpl) CreateMaintainerByAdmin ¶ added in v1.3.8
func (h *AppStoreClientImpl) CreateMaintainerByAdmin(name, email string, publicKeyRaw, publicKeySignature []byte) error
func (*AppStoreClientImpl) DeleteApp ¶
func (h *AppStoreClientImpl) DeleteApp(appName string) error
func (*AppStoreClientImpl) DeleteMaintainerByAdmin ¶ added in v1.3.8
func (h *AppStoreClientImpl) DeleteMaintainerByAdmin(name string) error
func (*AppStoreClientImpl) DeleteOwnAccount ¶
func (h *AppStoreClientImpl) DeleteOwnAccount() error
func (*AppStoreClientImpl) DeleteVersionByID ¶ added in v1.2.35
func (h *AppStoreClientImpl) DeleteVersionByID(versionId int) error
func (*AppStoreClientImpl) DownloadNextVersionForUpdate ¶ added in v1.3.8
func (h *AppStoreClientImpl) DownloadNextVersionForUpdate(userName, appName string, currentVersionCreationTimestamp time.Time) (*NextVersionForUpdateResponse, error)
func (*AppStoreClientImpl) DownloadVersionByID ¶ added in v1.2.35
func (h *AppStoreClientImpl) DownloadVersionByID(versionId int) (*Version, error)
func (*AppStoreClientImpl) GetAccountDetails ¶
func (h *AppStoreClientImpl) GetAccountDetails() (*AccountDetails, error)
func (*AppStoreClientImpl) GetEmailConfig ¶
func (h *AppStoreClientImpl) GetEmailConfig() (*u.EmailConfig, error)
func (*AppStoreClientImpl) GetMaintainerPublicKeyRecord ¶ added in v1.3.8
func (h *AppStoreClientImpl) GetMaintainerPublicKeyRecord(maintainer string) (*MaintainerPublicKeyRecord, error)
func (*AppStoreClientImpl) ListMaintainersByAdmin ¶ added in v1.3.19
func (h *AppStoreClientImpl) ListMaintainersByAdmin() ([]AdminMaintainer, error)
func (*AppStoreClientImpl) ListOwnApps ¶
func (h *AppStoreClientImpl) ListOwnApps() ([]string, error)
func (*AppStoreClientImpl) ListVersions ¶
func (h *AppStoreClientImpl) ListVersions(userName, appName string) ([]LeanVersionDto, error)
func (*AppStoreClientImpl) Login ¶
func (h *AppStoreClientImpl) Login(username, password string) error
func (*AppStoreClientImpl) Logout ¶
func (h *AppStoreClientImpl) Logout() error
func (*AppStoreClientImpl) SearchForApps ¶
func (h *AppStoreClientImpl) SearchForApps(maintainerSearchTerm, appSearchTerm string, showUnofficialApps bool) ([]AppWithLatestVersion, error)
func (*AppStoreClientImpl) SendEmailToMaintainersByAdmin ¶ added in v1.3.8
func (h *AppStoreClientImpl) SendEmailToMaintainersByAdmin(subject, body string) (*AdminEmailSendResult, error)
func (*AppStoreClientImpl) SendTestEmailByAdmin ¶ added in v1.3.8
func (h *AppStoreClientImpl) SendTestEmailByAdmin(subject, body string) (*AdminEmailSendResult, error)
func (*AppStoreClientImpl) SetEmailConfig ¶
func (h *AppStoreClientImpl) SetEmailConfig(emailConfig *u.EmailConfig) error
func (*AppStoreClientImpl) SetMaintainerStorageLimitByAdmin ¶ added in v1.3.19
func (h *AppStoreClientImpl) SetMaintainerStorageLimitByAdmin(name string, storageLimitInBytes int64) error
func (*AppStoreClientImpl) SetVersionMigrationCheckpoint ¶ added in v1.3.8
func (h *AppStoreClientImpl) SetVersionMigrationCheckpoint(versionId int, isMigrationCheckpoint bool) error
func (*AppStoreClientImpl) SetupInitialPassword ¶ added in v1.3.8
func (h *AppStoreClientImpl) SetupInitialPassword(setupToken, password string) error
func (*AppStoreClientImpl) UploadVersionAndReturnCreatedVersion ¶ added in v1.2.35
func (h *AppStoreClientImpl) UploadVersionAndReturnCreatedVersion(appName, versionName string, creationTimestamp time.Time, content, signature []byte) (*CreatedVersionResponse, error)
func (*AppStoreClientImpl) WipeData ¶
func (s *AppStoreClientImpl) WipeData()
type AppWithLatestVersion ¶
type ChangePasswordForm ¶
type CreatedVersionResponse ¶
type EmailString ¶
type EmailString struct {
Value string `json:"value" validate:"email"`
}
type LeanVersionDto ¶
type LoginCredentials ¶
type MaintainerNameString ¶ added in v1.3.8
type MaintainerNameString struct {
Value string `json:"value" validate:"default"`
}
type MaintainerPublicKeyRecord ¶ added in v1.3.8
type NextVersionForUpdateRequest ¶ added in v1.3.8
type NextVersionForUpdateResponse ¶ added in v1.3.8
type NumberString ¶
type NumberString struct {
Value string `json:"value" validate:"number"`
}
type SearchRequest ¶
type SecretString ¶
type SecretString struct {
Value string `json:"value" validate:"secret"`
}
type SetupInitialPasswordForm ¶ added in v1.3.8
type UserNameString ¶
type UserNameString struct {
Value string `json:"value" validate:"number"`
}
type VersionMigrationCheckpointRequest ¶ added in v1.3.8
type VersionSigningCodec ¶
type VersionSigningCodecImpl ¶
type VersionSigningCodecImpl struct{}
func (*VersionSigningCodecImpl) EncodeVersion ¶
func (c *VersionSigningCodecImpl) EncodeVersion(version *Version) ([]byte, error)
type VersionSigningService ¶
type VersionSigningServiceImpl ¶
type VersionSigningServiceImpl struct {
Codec VersionSigningCodec
BytesSigner u.BytesSigner
}
func (*VersionSigningServiceImpl) SignVersion ¶
func (s *VersionSigningServiceImpl) SignVersion(privateKey ed25519.PrivateKey, version *Version) ([]byte, error)
func (*VersionSigningServiceImpl) VerifyVersionSignature ¶
type VersionTree ¶
Click to show internal directories.
Click to hide internal directories.