Documentation
¶
Index ¶
- Constants
- Variables
- type LatestVersionLogic
- func (l *LatestVersionLogic) GetLatestAlphaVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *LatestVersionLogic) GetLatestBetaVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *LatestVersionLogic) GetLatestStableVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *LatestVersionLogic) UpdateLatestVersion(ctx context.Context, tx *ent.Tx, resID string, channel latestversion.Channel, ...) error
- type ResourceLogic
- type StorageLogic
- func (l *StorageLogic) BuildVersionPatchStorageDirPath(resID string, verID int, os, arch string) string
- func (l *StorageLogic) BuildVersionPatchStoragePath(resID string, verID, oldVerID int, os, arch string) string
- func (l *StorageLogic) BuildVersionResourceStorageDirPath(resID string, verID int, os, arch string) string
- func (l *StorageLogic) BuildVersionResourceStoragePath(resID string, verID int, os, arch string) string
- func (l *StorageLogic) BuildVersionStorageDirPath(resID string, verID int, os, arch string) string
- func (l *StorageLogic) CheckStorageExist(ctx context.Context, verID int, os, arch string) (bool, error)
- func (l *StorageLogic) ClearOldStorages(ctx context.Context, resID string, channel version.Channel, latestVerID int) error
- func (l *StorageLogic) CreateFullUpdateStorage(ctx context.Context, tx *ent.Tx, verID int, ...) (*ent.Storage, error)
- func (l *StorageLogic) CreateIncrementalUpdateStorage(ctx context.Context, tx *ent.Tx, target, current int, ...) (*ent.Storage, error)
- func (l *StorageLogic) GetFullUpdateStorage(ctx context.Context, versionId int, os, arch string) (*ent.Storage, error)
- func (l *StorageLogic) GetIncrementalUpdateStorage(ctx context.Context, targerVerID, currentVerID int, os, arch string) (*ent.Storage, error)
- func (l *StorageLogic) SetPackageSHA256(ctx context.Context, storageID int, sha256 string) error
- type VersionLogic
- func (l *VersionLogic) Create(ctx context.Context, param CreateVersionParam) (*ent.Version, error)
- func (l *VersionLogic) CreateIncrementalUpdatePackage(ctx context.Context, info ActualUpdateProcessInfo) (UpdatePackage, error)
- func (l *VersionLogic) CreateVersion(ctx context.Context, resID, channel, name string) (*ent.Version, error)
- func (l *VersionLogic) ExistNameWithOSAndArch(ctx context.Context, param ExistVersionNameWithOSAndArchParam) (bool, error)
- func (l *VersionLogic) GetCacheGroup() *cache.VersionCacheGroup
- func (l *VersionLogic) GetIncrementalUpdatePackage(ctx context.Context, info ActualUpdateProcessInfo) (UpdatePackage, error)
- func (l *VersionLogic) GetLatestAlphaVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *VersionLogic) GetLatestBetaVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *VersionLogic) GetLatestStableVersion(ctx context.Context, resID string) (*ent.Version, error)
- func (l *VersionLogic) GetRedisClient() *redis.Client
- func (l *VersionLogic) GetUpdateInfo(ctx context.Context, oriented bool, cdk string, param ProcessUpdateParam) (url, packageSHA256, updateType string, err error)
- func (l *VersionLogic) GetVersionByName(ctx context.Context, param GetVersionByNameParam) (*ent.Version, error)
- func (l *VersionLogic) GetVersionChannel(channel string) version.Channel
- func (l *VersionLogic) GetVersionNumber(ctx context.Context, resID string) (uint64, error)
- func (l *VersionLogic) StorePatchInfo(ctx context.Context, cacheKey string, p UpdatePackage, e string) error
- func (l *VersionLogic) UpdateCustomData(ctx context.Context, param UpdateReleaseNoteSummaryParam) error
- func (l *VersionLogic) UpdateReleaseNote(ctx context.Context, param UpdateReleaseNoteDetailParam) error
Constants ¶
View Source
const ( FullUpdateType = "full" IncrementalUpdateType = "incremental" )
Variables ¶
View Source
var (
StorageInfoNotFound = errors.New("storage info not found")
)
Functions ¶
This section is empty.
Types ¶
type LatestVersionLogic ¶ added in v0.3.0
type LatestVersionLogic struct {
// contains filtered or unexported fields
}
func NewLatestVersionLogic ¶ added in v0.3.0
func NewLatestVersionLogic( logger *zap.Logger, latestVersionRepo *repo.LatestVersion, verComparator *vercomp.VersionComparator, ) *LatestVersionLogic
func (*LatestVersionLogic) GetLatestAlphaVersion ¶ added in v0.3.0
func (*LatestVersionLogic) GetLatestBetaVersion ¶ added in v0.3.0
func (*LatestVersionLogic) GetLatestStableVersion ¶ added in v0.3.0
func (*LatestVersionLogic) UpdateLatestVersion ¶ added in v0.3.0
type ResourceLogic ¶
type ResourceLogic struct {
// contains filtered or unexported fields
}
func NewResourceLogic ¶
func NewResourceLogic(logger *zap.Logger, resourceRepo *repo.Resource) *ResourceLogic
type StorageLogic ¶
type StorageLogic struct {
RootDir string
// contains filtered or unexported fields
}
func NewStorageLogic ¶
func NewStorageLogic(logger *zap.Logger, storageRepo *repo.Storage) *StorageLogic
func (*StorageLogic) BuildVersionPatchStorageDirPath ¶ added in v0.3.0
func (l *StorageLogic) BuildVersionPatchStorageDirPath(resID string, verID int, os, arch string) string
func (*StorageLogic) BuildVersionPatchStoragePath ¶ added in v0.3.0
func (l *StorageLogic) BuildVersionPatchStoragePath(resID string, verID, oldVerID int, os, arch string) string
func (*StorageLogic) BuildVersionResourceStorageDirPath ¶ added in v0.3.0
func (l *StorageLogic) BuildVersionResourceStorageDirPath(resID string, verID int, os, arch string) string
func (*StorageLogic) BuildVersionResourceStoragePath ¶ added in v0.3.0
func (l *StorageLogic) BuildVersionResourceStoragePath(resID string, verID int, os, arch string) string
func (*StorageLogic) BuildVersionStorageDirPath ¶ added in v0.3.0
func (l *StorageLogic) BuildVersionStorageDirPath(resID string, verID int, os, arch string) string
func (*StorageLogic) CheckStorageExist ¶ added in v0.3.0
func (*StorageLogic) ClearOldStorages ¶ added in v0.3.1
func (*StorageLogic) CreateFullUpdateStorage ¶ added in v0.3.0
func (*StorageLogic) CreateIncrementalUpdateStorage ¶ added in v0.3.0
func (*StorageLogic) GetFullUpdateStorage ¶ added in v0.3.0
func (*StorageLogic) GetIncrementalUpdateStorage ¶ added in v0.4.0
func (*StorageLogic) SetPackageSHA256 ¶ added in v0.4.0
type VersionLogic ¶
type VersionLogic struct {
// contains filtered or unexported fields
}
func NewVersionLogic ¶
func NewVersionLogic( logger *zap.Logger, repo *repo.Repo, versionRepo *repo.Version, storageRepo *repo.Storage, latestVersionLogic *LatestVersionLogic, storageLogic *StorageLogic, rdb *redis.Client, sync *redsync.Redsync, cacheGroup *cache.VersionCacheGroup, ) *VersionLogic
func (*VersionLogic) CreateIncrementalUpdatePackage ¶ added in v0.3.0
func (l *VersionLogic) CreateIncrementalUpdatePackage(ctx context.Context, info ActualUpdateProcessInfo) (UpdatePackage, error)
func (*VersionLogic) CreateVersion ¶ added in v0.3.0
func (*VersionLogic) ExistNameWithOSAndArch ¶ added in v0.4.0
func (l *VersionLogic) ExistNameWithOSAndArch(ctx context.Context, param ExistVersionNameWithOSAndArchParam) (bool, error)
func (*VersionLogic) GetCacheGroup ¶ added in v0.3.0
func (l *VersionLogic) GetCacheGroup() *cache.VersionCacheGroup
func (*VersionLogic) GetIncrementalUpdatePackage ¶ added in v0.4.0
func (l *VersionLogic) GetIncrementalUpdatePackage(ctx context.Context, info ActualUpdateProcessInfo) (UpdatePackage, error)
func (*VersionLogic) GetLatestAlphaVersion ¶ added in v0.3.0
func (*VersionLogic) GetLatestBetaVersion ¶ added in v0.3.0
func (*VersionLogic) GetLatestStableVersion ¶ added in v0.3.0
func (*VersionLogic) GetRedisClient ¶ added in v0.4.0
func (l *VersionLogic) GetRedisClient() *redis.Client
func (*VersionLogic) GetUpdateInfo ¶ added in v0.3.0
func (*VersionLogic) GetVersionByName ¶ added in v0.4.0
func (*VersionLogic) GetVersionChannel ¶ added in v0.3.0
func (l *VersionLogic) GetVersionChannel(channel string) version.Channel
func (*VersionLogic) GetVersionNumber ¶ added in v0.3.0
func (*VersionLogic) StorePatchInfo ¶ added in v0.3.0
func (*VersionLogic) UpdateCustomData ¶ added in v0.4.0
func (l *VersionLogic) UpdateCustomData(ctx context.Context, param UpdateReleaseNoteSummaryParam) error
func (*VersionLogic) UpdateReleaseNote ¶ added in v0.4.0
func (l *VersionLogic) UpdateReleaseNote(ctx context.Context, param UpdateReleaseNoteDetailParam) error
Click to show internal directories.
Click to hide internal directories.